:root {
  color-scheme: dark;
  --app-height: 100svh;
  --app-width: 100vw;
  --app-bottom-inset: 0px;
  --app-safe-top: env(safe-area-inset-top, 0px);
  --app-safe-right: env(safe-area-inset-right, 0px);
  --app-safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--app-bottom-inset));
  --app-safe-left: env(safe-area-inset-left, 0px);
  --bg: #10110f;
  --ink: #f7f1df;
  --text: #f4efe4;
  --muted: #a8a195;
  --soft: #d8d0bf;
  --panel: rgba(28, 29, 27, 0.88);
  --panel-solid: #1c1d1b;
  --panel-2: #242622;
  --panel-3: #2f312c;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --green: #23a35f;
  --green-2: #59d98b;
  --gold: #d5a832;
  --coral: #d85d54;
  --teal: #4aa6a0;
  --blue: #497fae;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
  --radius: 8px;
  --footer-height: 78px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  min-height: 100%;
}

html {
  background: #0d0e0c;
}

body {
  margin: 0;
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(35, 163, 95, 0.16), transparent 28%),
    linear-gradient(240deg, rgba(216, 93, 84, 0.12), transparent 26%),
    linear-gradient(180deg, #151612, #0d0e0c);
  color: var(--text);
}

#app {
  position: fixed;
  inset: 0;
  width: auto;
  height: auto;
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(35, 163, 95, 0.08), transparent 35%),
    linear-gradient(300deg, rgba(74, 166, 160, 0.08), transparent 28%),
    rgba(12, 13, 11, 0.98);
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
}

.modal-root > * {
  pointer-events: auto;
}

.modal-slot {
  display: contents;
}

.modal-slot.is-floating-player {
  display: contents;
}

.modal-slot.is-player-keepalive {
  position: fixed;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  display: block;
  overflow: hidden;
  pointer-events: none;
}

.modal-slot.is-player-keepalive .attachment-viewer-backdrop {
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  overflow: hidden !important;
  clip-path: inset(50%);
  pointer-events: none !important;
}

.modal-root:empty {
  display: none;
}

.toast-root {
  position: fixed;
  inset: 0;
  z-index: 1400;
  overflow: hidden;
  pointer-events: none;
}

.toast-root:empty {
  display: none;
}

.chat-materials-root {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
}

.chat-materials-root > * {
  pointer-events: auto;
}

.chat-materials-root:empty {
  display: none;
}

#screen-float-root {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
}

#screen-float-root.screen-layer-expanded,
#screen-float-root:has(.screen-float.expanded) {
  z-index: 130;
}

#screen-float-root.screen-layer-expanded::before,
#screen-float-root:has(.screen-float.expanded)::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  pointer-events: auto;
}

#screen-float-root .screen-float,
#screen-float-root .screen-dock,
#screen-float-root .activity-dock-stack,
#screen-float-root .music-dock,
#screen-float-root .music-float,
#screen-float-root .active-voice-dock {
  pointer-events: auto;
}

.activity-region {
  display: contents;
}

.activity-dock-stack[hidden] {
  display: none !important;
}

.screen-media-parking {
  position: fixed;
  left: -2px;
  top: -2px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.boot {
  min-height: 100%;
  display: grid;
  place-items: center;
}

.boot-mark,
.brand-badge,
.server-home,
.workspace-button,
.avatar,
.mini-avatar {
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 850;
}

.boot-mark {
  width: 76px;
  height: 76px;
  border-radius: var(--radius);
  background: rgba(18, 20, 17, 0.9);
  border: 1px solid rgba(89, 217, 139, 0.28);
  box-shadow: var(--shadow);
  letter-spacing: 0;
}

.logo-mark,
.logo-image {
  display: block;
}

.logo-mark {
  width: 100%;
  height: 100%;
}

.logo-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
  user-select: none;
}

.button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--text);
  background: var(--panel-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 13px;
  font-weight: 800;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button svg {
  width: 18px;
  height: 18px;
}

.button.primary {
  background: linear-gradient(135deg, var(--green), #2fbd70);
  box-shadow: 0 10px 26px rgba(35, 163, 95, 0.22);
}

.button.primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--green-2), var(--green));
}

.button.ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
}

.button.danger {
  background: linear-gradient(135deg, #b93834, var(--coral));
  color: #fff5f2;
  border-color: rgba(255, 168, 160, 0.35);
  box-shadow: 0 10px 26px rgba(216, 93, 84, 0.22);
}

.button.self-delete {
  color: #f4d19a;
  border-color: rgba(222, 169, 87, 0.42);
  background: linear-gradient(135deg, rgba(125, 86, 34, 0.38), rgba(78, 58, 29, 0.56));
  box-shadow: 0 8px 22px rgba(111, 77, 30, 0.16);
}

.button.self-delete:hover:not(:disabled) {
  color: #ffe2b4;
  border-color: rgba(240, 190, 111, 0.58);
  background: linear-gradient(135deg, rgba(145, 99, 38, 0.5), rgba(91, 66, 31, 0.68));
}

.button.icon {
  width: 40px;
  min-height: 40px;
  padding: 0;
}

.button.compact {
  min-height: 34px;
  padding: 0 11px;
  border-radius: 9px;
  font-size: 13px;
}

.button.icon.active,
.button.active {
  background: rgba(89, 217, 139, 0.16);
  color: #c7ffd8;
  border-color: rgba(89, 217, 139, 0.38);
}

.button.loading svg {
  animation: spin 900ms linear infinite;
}

.input,
.textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(8, 9, 8, 0.58);
  color: var(--text);
  border-radius: var(--radius);
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.input {
  height: 46px;
  padding: 0 13px;
}

.textarea {
  resize: none;
  min-height: 46px;
  max-height: 130px;
  padding: 13px 98px 13px 14px;
}

.composer-input {
  overflow-y: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.35;
  cursor: text;
}

.composer-input:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
  pointer-events: none;
}

.composer-input[contenteditable="false"] {
  opacity: 0.55;
  cursor: not-allowed;
}

.input:focus,
.textarea:focus,
.composer-input:focus {
  background: rgba(8, 9, 8, 0.78);
  border-color: rgba(89, 217, 139, 0.72);
  box-shadow: 0 0 0 3px rgba(89, 217, 139, 0.15);
}

.input.has-error,
.textarea.has-error {
  border-color: rgba(255, 126, 116, 0.56);
  box-shadow: 0 0 0 3px rgba(216, 93, 84, 0.11);
}

.auth-screen {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(360px, 460px) minmax(420px, 1fr);
  gap: 52px;
  align-items: center;
  padding: 52px clamp(28px, 6vw, 86px);
  background:
    radial-gradient(circle at 18% 18%, rgba(35, 163, 95, 0.12), transparent 30%),
    linear-gradient(145deg, #10120f, #181916 52%, #0f100e);
}

.auth-atmosphere {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.signal-grid {
  position: absolute;
  inset: -20%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  transform: perspective(700px) rotateX(58deg) translateY(12%);
  animation: gridDrift 34s linear infinite;
  opacity: 0.36;
  will-change: transform;
}

.signal-ribbon {
  position: absolute;
  height: 2px;
  width: 74vw;
  left: 16vw;
  border-radius: 999px;
  filter: drop-shadow(0 0 14px rgba(89, 217, 139, 0.28));
  transform-origin: left center;
  animation: ribbonFlow 12s cubic-bezier(0.42, 0, 0.18, 1) infinite;
  will-change: transform, opacity;
}

.ribbon-a {
  top: 24%;
  background: linear-gradient(90deg, transparent, var(--green-2), transparent);
  transform: rotate(-10deg);
}

.ribbon-b {
  top: 52%;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  animation-delay: -1.6s;
  transform: rotate(6deg);
}

.ribbon-c {
  top: 76%;
  background: linear-gradient(90deg, transparent, var(--coral), transparent);
  animation-delay: -3s;
  transform: rotate(-4deg);
}

.auth-card {
  position: relative;
  z-index: 2;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(36, 38, 34, 0.9), rgba(19, 20, 18, 0.92)),
    rgba(28, 29, 27, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
  animation: authRise 900ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(89, 217, 139, 0.8), rgba(213, 168, 50, 0.5), rgba(216, 93, 84, 0.55));
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}

.brand-badge {
  width: 50px;
  height: 50px;
  border-radius: var(--radius);
  padding: 7px;
  background:
    linear-gradient(145deg, rgba(89, 217, 139, 0.22), rgba(213, 168, 50, 0.16)),
    rgba(12, 14, 12, 0.88);
  border: 1px solid rgba(89, 217, 139, 0.28);
  box-shadow: 0 16px 36px rgba(35, 163, 95, 0.2);
}

.brand-title {
  margin: 0;
  font-size: 26px;
  letter-spacing: 0;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.field-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.field-head > span:first-child {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.field-error {
  min-width: 0;
  flex: 1 1 auto;
  color: #ffaaa2;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-align: right;
  text-transform: lowercase;
  white-space: nowrap;
}

.auth-submit {
  margin-top: 4px;
  min-height: 46px;
}

.auth-switch {
  color: var(--soft);
  background: transparent;
  border: 0;
  padding: 0;
  justify-self: center;
  font-weight: 750;
}

.auth-switch.muted {
  color: var(--muted);
}

.auth-verification {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  column-gap: 18px;
  row-gap: 12px;
  align-items: start;
}

.auth-code-orbit {
  position: relative;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  color: #c7ffd8;
  border-radius: 50%;
  border: 1px solid rgba(89, 217, 139, 0.28);
  background:
    radial-gradient(circle at 50% 50%, rgba(89, 217, 139, 0.2), transparent 58%),
    rgba(12, 14, 12, 0.82);
  box-shadow:
    inset 0 0 26px rgba(89, 217, 139, 0.08),
    0 18px 44px rgba(35, 163, 95, 0.18);
  align-self: start;
}

.auth-code-orbit svg {
  width: 30px;
  height: 30px;
}

.auth-code-orbit span {
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  border: 1px solid transparent;
  border-top-color: rgba(89, 217, 139, 0.8);
  border-right-color: rgba(213, 168, 50, 0.5);
  animation: spin 3.8s linear infinite;
}

.auth-verification-title {
  align-self: center;
  margin: 0;
  font-size: 22px;
  letter-spacing: 0;
}

.auth-verification-intro {
  grid-column: 1 / -1;
  margin: -2px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.auth-code-form,
.auth-email-change-form,
.auth-reset-request-form,
.auth-reset-confirm-form {
  grid-column: 1 / -1;
  gap: 12px;
}

.auth-code-input {
  height: 56px;
  text-align: center;
  font-size: 24px;
  font-weight: 850;
  letter-spacing: 0.18em;
}

.auth-verification-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 2px;
}

.auth-showcase {
  position: relative;
  z-index: 2;
  min-height: 590px;
  animation: authRise 1100ms 120ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.call-window {
  position: absolute;
  inset: 40px 7% 44px 2%;
  display: grid;
  grid-template-rows: 52px minmax(0, 1fr) 82px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(17, 18, 16, 0.8);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  animation: floatPanel 13s cubic-bezier(0.45, 0, 0.2, 1) infinite;
  will-change: transform;
}

.call-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--line);
}

.call-toolbar strong {
  margin-left: 8px;
  color: rgba(247, 241, 223, 0.7);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.call-toolbar span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
}

.call-toolbar span:nth-child(2) {
  background: var(--gold);
}

.call-toolbar span:nth-child(3) {
  background: var(--coral);
}

.call-surface {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(74, 166, 160, 0.22), transparent 48%),
    linear-gradient(180deg, #2a2c26, #11120f);
}

.auth-lounge-stage {
  min-width: 0;
  min-height: 0;
  background:
    radial-gradient(circle at 28% 18%, rgba(89, 217, 139, 0.16), transparent 32%),
    linear-gradient(135deg, rgba(35, 163, 95, 0.11), rgba(213, 168, 50, 0.035) 48%, rgba(7, 8, 7, 0.94));
}

.auth-lounge-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.auth-lounge-status {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(247, 241, 223, 0.78);
  font-size: 10px;
  font-weight: 950;
  pointer-events: none;
}

.auth-lounge-status span,
.auth-lounge-status b {
  height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(89, 217, 139, 0.22);
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(7, 10, 8, 0.58);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(12px);
}

.auth-lounge-status b {
  color: #caffda;
  border-color: rgba(89, 217, 139, 0.34);
}

.auth-lounge-status svg {
  width: 14px;
  height: 14px;
}

.call-surface::before,
.call-surface::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(247, 241, 223, 0.45), transparent);
  animation: scanLine 7.5s cubic-bezier(0.42, 0, 0.2, 1) infinite;
}

.call-surface::before {
  top: 28%;
}

.call-surface::after {
  top: 68%;
  animation-delay: -1.8s;
}

.screen-pulse {
  position: absolute;
  inset: 18%;
  border: 1px solid rgba(89, 217, 139, 0.32);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(35, 163, 95, 0.2), transparent),
    repeating-linear-gradient(0deg, transparent, transparent 18px, rgba(255, 255, 255, 0.035) 19px);
  animation: screenGlow 7s cubic-bezier(0.42, 0, 0.2, 1) infinite;
}

.live-pill {
  position: absolute;
  top: 18px;
  right: 18px;
  height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(89, 217, 139, 0.36);
  border-radius: var(--radius);
  background: rgba(12, 15, 12, 0.72);
  color: #caffda;
  font-weight: 850;
  font-size: 12px;
}

.live-pill svg {
  width: 16px;
  height: 16px;
}

.call-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 18px;
  background: rgba(9, 10, 9, 0.72);
  border-top: 1px solid var(--line);
}

.wave-bars {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wave-bars span {
  width: 7px;
  height: calc(12px + (var(--i) % 6) * 5px);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--green-2), var(--gold));
  animation: wave 900ms ease-in-out infinite;
  animation-delay: calc(var(--i) * -70ms);
}

.call-actions {
  display: flex;
  gap: 10px;
}

.call-actions div {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
}

.call-actions svg {
  width: 20px;
  height: 20px;
}

.floating-chat {
  display: none;
  position: absolute;
  z-index: 3;
  display: none;
  align-items: center;
  gap: 10px;
  min-width: 190px;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(28, 29, 27, 0.76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.floating-chat b {
  display: block;
  font-size: 13px;
}

.floating-chat span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.chat-one {
  top: 95px;
  right: 0;
  animation: floatPanel 12s cubic-bezier(0.45, 0, 0.2, 1) infinite reverse;
}

.chat-two {
  bottom: 98px;
  left: 0;
  animation: floatPanel 13.5s cubic-bezier(0.45, 0, 0.2, 1) infinite;
}

.mini-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--coral);
}

.mini-avatar.green {
  background: var(--green);
}

@media (prefers-reduced-motion: reduce) {
  .signal-grid,
  .signal-ribbon,
  .auth-showcase,
  .call-window,
  .call-surface::before,
  .call-surface::after,
  .screen-pulse,
  .wave-bars span,
  .chat-one,
  .chat-two {
    animation: none;
  }

  .signal-grid,
  .signal-ribbon,
  .call-window {
    will-change: auto;
  }

  .attachment-draft-grid {
    scroll-behavior: auto !important;
  }
}

.app-shell {
  position: absolute;
  inset: 0;
  width: 100%;
  height: auto;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 76px 300px minmax(0, 1fr) 280px;
  background:
    linear-gradient(120deg, rgba(35, 163, 95, 0.08), transparent 35%),
    linear-gradient(300deg, rgba(74, 166, 160, 0.08), transparent 28%),
    rgba(12, 13, 11, 0.98);
}

.app-shell.no-right-panel {
  grid-template-columns: 76px 300px minmax(0, 1fr);
}

.mobile-drawer {
  display: contents;
}

.server-rail {
  min-width: 0;
  padding: 12px 10px;
  background: rgba(9, 10, 9, 0.92);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.server-home,
.workspace-button {
  width: 50px;
  height: 50px;
  border: 1px solid transparent;
  border-radius: var(--radius);
}

.server-home {
  position: relative;
  isolation: isolate;
  padding: 7px;
  background:
    linear-gradient(145deg, rgba(35, 163, 95, 0.24), rgba(213, 168, 50, 0.14)),
    #171a15;
  box-shadow: 0 12px 28px rgba(35, 163, 95, 0.22);
  transition:
    box-shadow 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.server-home:hover,
.server-home.active {
  transform: translateY(-1px);
  border-color: rgba(213, 168, 50, 0.72);
  background:
    linear-gradient(145deg, rgba(35, 163, 95, 0.34), rgba(213, 168, 50, 0.22)),
    #20241d;
  box-shadow:
    0 0 0 1px rgba(213, 168, 50, 0.12),
    0 16px 34px rgba(35, 163, 95, 0.24);
}

.server-stack {
  display: grid;
  gap: 10px;
  width: 100%;
  justify-items: center;
}

.workspace-button {
  position: relative;
  overflow: visible;
  isolation: isolate;
  display: grid;
  place-items: center;
  background: var(--panel-2);
  color: var(--soft);
  transition:
    box-shadow 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.workspace-initials {
  position: relative;
  z-index: 1;
  max-width: 34px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-avatar {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(35, 163, 95, 0.22), rgba(213, 168, 50, 0.1)),
    rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.workspace-avatar img,
.space-avatar img,
.room-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.clickable-avatar {
  cursor: zoom-in;
}

.clickable-avatar:hover {
  filter: brightness(1.08);
}

.workspace-button:hover,
.workspace-button.active {
  transform: translateY(-1px);
  background: #30332d;
  border-color: rgba(213, 168, 50, 0.72);
}

.workspace-button.has-unread {
  border-color: rgba(213, 168, 50, 0.42);
}

.workspace-button.has-screen {
  border-color: rgba(89, 217, 139, 0.56);
  box-shadow:
    0 0 0 1px rgba(89, 217, 139, 0.1),
    0 14px 30px rgba(35, 163, 95, 0.16);
}

.rail-unread {
  position: absolute;
  top: -5px;
  right: -5px;
  z-index: 4;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(9, 10, 9, 0.98);
  background: linear-gradient(135deg, #f1c84c, #ffe083);
  color: #15130a;
  font-size: 10px;
  line-height: 1;
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(213, 168, 50, 0.24);
}

.rail-live,
.rail-voice {
  position: absolute;
  right: -4px;
  bottom: -4px;
  z-index: 3;
  border: 2px solid rgba(9, 10, 9, 0.98);
}

.rail-live {
  width: 21px;
  height: 21px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #06140c;
  background: linear-gradient(135deg, #6cf4a2, #23a35f);
  box-shadow: 0 0 20px rgba(89, 217, 139, 0.32);
}

.rail-live svg {
  width: 12px;
  height: 12px;
  stroke-width: 2.7;
}

.rail-live::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 10px;
  border: 1px solid rgba(89, 217, 139, 0.3);
  animation: rail-live-pulse 1.8s ease-out infinite;
  pointer-events: none;
}

.rail-voice {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(35, 163, 95, 0.96);
  box-shadow: 0 0 16px rgba(35, 163, 95, 0.28);
}

.rail-voice i {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: rgba(224, 255, 236, 0.92);
}

@keyframes rail-live-pulse {
  from {
    opacity: 0.65;
    transform: scale(0.72);
  }
  to {
    opacity: 0;
    transform: scale(1.5);
  }
}

.server-rail-actions {
  margin-top: auto;
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 8px;
}

.rail-action {
  margin-top: 0;
  background: rgba(35, 163, 95, 0.16);
  border-color: rgba(35, 163, 95, 0.28);
}

.admin-console-rail-action {
  color: #b9f4c6;
  background: linear-gradient(145deg, rgba(89, 217, 139, 0.2), rgba(89, 217, 139, 0.055));
  font-size: 15px;
  font-weight: 950;
}

.admin-console-rail-action:hover,
.admin-console-rail-action:focus-visible {
  border-color: rgba(103, 223, 135, 0.52);
  color: #e0ffe7;
  background: rgba(77, 170, 100, 0.24);
}

.space-panel,
.people-panel {
  min-width: 0;
  background: var(--panel);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(20px);
}

.space-panel {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.space-panel.home-panel {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.space-panel-footer {
  min-width: 0;
  min-height: 0;
  display: grid;
  align-content: end;
}

.mobile-panel-activity {
  display: none;
}

.mobile-panel-activity[hidden] {
  display: none !important;
}

.space-header {
  position: relative;
  z-index: 30;
  min-height: 74px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  overflow: visible;
  background: var(--panel);
}

.space-header > .space-title {
  min-width: 0;
  overflow: hidden;
}

.space-title {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.workspace-info-trigger {
  max-width: 100%;
  padding: 0;
  border: 0;
  display: block;
  border-radius: 13px;
  overflow: hidden;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.workspace-info-trigger:hover {
  color: #baf6c7;
}

.workspace-info-trigger:focus-visible {
  outline: 2px solid rgba(89, 217, 139, 0.72);
  outline-offset: 4px;
}

.space-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(35, 163, 95, 0.26), rgba(213, 168, 50, 0.14)),
    rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(89, 217, 139, 0.18);
}

.workspace-name {
  margin: 0;
  font-size: 18px;
  line-height: 1.18;
  letter-spacing: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.space-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.space-actions {
  min-width: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 34px;
  align-items: center;
  gap: 6px;
}

.space-actions .button {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
}

.space-actions .button svg {
  width: 16px;
  height: 16px;
}

.workspace-action-overflow {
  position: relative;
  display: block;
  width: 34px;
  height: 34px;
}

.workspace-action-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  width: 210px;
  padding: 6px;
  border: 1px solid rgba(89, 217, 139, 0.28);
  border-radius: 11px;
  display: grid;
  gap: 3px;
  background: rgba(18, 20, 17, 0.99);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
}

.workspace-action-menu[hidden] {
  display: none;
}

.workspace-action-menu button {
  min-width: 0;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  color: var(--text);
  text-align: left;
  background: transparent;
}

.workspace-action-menu button:hover:not(:disabled),
.workspace-action-menu button:focus-visible {
  background: rgba(89, 217, 139, 0.1);
}

.workspace-action-menu button.danger {
  color: #ffb9b3;
}

.workspace-action-menu button:disabled {
  opacity: 0.42;
}

.workspace-action-menu svg {
  width: 16px;
  height: 16px;
}

.workspace-action-menu span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.button.danger-soft {
  color: #ffb9b3;
  border-color: rgba(216, 93, 84, 0.28);
}

.button.danger-soft:hover:not(:disabled) {
  background: rgba(216, 93, 84, 0.14);
  color: #ffe1dd;
}

.voice-card {
  --voice-card-control-row: 40px;
  width: calc(100% - 28px);
  box-sizing: border-box;
  min-width: 0;
  margin: 14px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(35, 163, 95, 0.16), transparent 58%),
    rgba(255, 255, 255, 0.045);
}

.voice-card.connected {
  border-color: rgba(89, 217, 139, 0.35);
  box-shadow: 0 14px 40px rgba(35, 163, 95, 0.12);
}

.voice-card.reconnecting {
  border-color: rgba(213, 168, 50, 0.42);
  box-shadow: 0 14px 40px rgba(213, 168, 50, 0.08);
}

.voice-card.reconnecting .voice-dot {
  background: var(--gold);
  animation: liveDot 1.25s ease-in-out infinite;
}

.voice-card.voice-locked {
  border-color: rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 58%),
    rgba(255, 255, 255, 0.035);
}

.voice-card.voice-unavailable {
  border-color: rgba(213, 168, 50, 0.22);
  background:
    linear-gradient(135deg, rgba(213, 168, 50, 0.1), transparent 58%),
    rgba(255, 255, 255, 0.035);
}

.voice-unavailable-mark {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(213, 168, 50, 0.2);
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: rgba(240, 215, 126, 0.86);
  background: rgba(213, 168, 50, 0.08);
}

.voice-unavailable-mark svg {
  width: 15px;
  height: 15px;
}

.voice-card.voice-unavailable .voice-occupants {
  overflow: hidden;
}

.voice-card.voice-unavailable .voice-occupants > span {
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.voice-unavailable-summary {
  min-width: 0;
  width: 100%;
  height: var(--voice-card-control-row);
  min-height: var(--voice-card-control-row);
  padding: 5px 10px;
  border: 1px solid rgba(213, 168, 50, 0.2);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(247, 241, 223, 0.9);
  background: rgba(213, 168, 50, 0.07);
}

.voice-unavailable-summary-icon {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: rgba(240, 215, 126, 0.86);
  background: rgba(213, 168, 50, 0.1);
}

.voice-unavailable-summary-icon svg {
  width: 14px;
  height: 14px;
}

.voice-unavailable-summary > span:last-child {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.voice-unavailable-summary strong,
.voice-unavailable-summary small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.voice-unavailable-summary strong {
  font-size: 11px;
  line-height: 1.05;
}

.voice-unavailable-summary small {
  color: rgba(238, 235, 222, 0.52);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.05;
}

.voice-unavailable-note {
  grid-column: 1 / -1;
  min-width: 0;
  height: var(--voice-card-control-row);
  min-height: var(--voice-card-control-row);
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(238, 235, 222, 0.56);
  background: rgba(255, 255, 255, 0.025);
  font-size: 10px;
  font-weight: 800;
}

.voice-unavailable-note svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  color: rgba(240, 215, 126, 0.72);
}

.voice-unavailable-note span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.voice-card-top {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.voice-card-top > div:first-child {
  min-width: 0;
  overflow: hidden;
}

.voice-card-top strong {
  display: block;
  max-width: 100%;
  margin-top: 4px;
  font-size: 17px;
  line-height: 1.18;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.eyebrow,
.section-title {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.voice-dot {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #6e6d68;
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.04);
}

.voice-dot.online {
  background: var(--green-2);
  box-shadow: 0 0 0 8px rgba(89, 217, 139, 0.08);
  animation: liveDot 1.8s ease-in-out infinite;
}

.voice-status-cluster {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 14px;
}

.voice-duration {
  color: rgba(238, 235, 222, 0.46);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.voice-occupants {
  min-width: 0;
  min-height: 30px;
  margin: -2px 0 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}

.voice-occupants:not(.empty) {
  max-height: 102px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.voice-occupants.empty {
  color: var(--muted);
}

.voice-occupants.empty span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
}

.voice-occupants.empty svg {
  width: 15px;
  height: 15px;
}

.voice-audio-unblock {
  width: 100%;
  min-height: 34px;
  margin: 0 0 9px;
  border: 1px solid rgba(213, 168, 50, 0.28);
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #f3d889;
  background: rgba(213, 168, 50, 0.08);
  font-size: 11px;
  font-weight: 900;
}

.voice-audio-unblock svg {
  width: 15px;
  height: 15px;
}

.voice-occupant {
  --voice-level: 0;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  height: 30px;
  padding: 3px 8px 3px 3px;
  border: 1px solid rgba(89, 217, 139, 0.16);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(35, 163, 95, 0.09);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.voice-occupant.speaking {
  border-color: rgba(89, 217, 139, 0.52);
  background:
    linear-gradient(90deg, rgba(35, 163, 95, 0.24), rgba(35, 163, 95, 0.1)),
    rgba(35, 163, 95, 0.12);
  box-shadow: 0 0 calc(8px + var(--voice-level) * 14px) rgba(35, 211, 112, 0.13);
}

.voice-avatar-wrap {
  position: relative;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
}

.voice-occupant .avatar {
  position: relative;
  z-index: 1;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  font-size: 10px;
}

.voice-avatar-waves {
  position: absolute;
  inset: -5px;
  z-index: 0;
  pointer-events: none;
  border-radius: 999px;
}

.voice-avatar-waves i {
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(89, 217, 139, 0.62);
  border-radius: inherit;
  opacity: 0;
  transform: scale(0.88);
}

.voice-avatar-waves i:nth-child(2) {
  inset: 2px;
  border-color: rgba(213, 168, 50, 0.48);
  animation-delay: 160ms;
}

.voice-avatar-waves i:nth-child(3) {
  inset: 0;
  border-color: rgba(89, 217, 139, 0.28);
  animation-delay: 320ms;
}

.voice-occupant.speaking .voice-avatar-waves i {
  animation: voiceAvatarWave 980ms ease-out infinite;
  opacity: calc(0.18 + var(--voice-level) * 0.52);
}

.voice-occupant b {
  flex: 1 1 0;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
}

.voice-self-badge {
  flex: 0 0 auto;
  padding: 2px 6px;
  border: 1px solid rgba(120, 235, 158, 0.22);
  border-radius: 999px;
  color: rgba(193, 248, 211, 0.86);
  background: rgba(55, 178, 103, 0.12);
  font-size: 8px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
}

.voice-participant-volume-button {
  flex: 0 0 auto;
  min-width: 24px;
  height: 24px;
  margin: 0 -4px 0 1px;
  padding: 0 5px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: rgba(238, 235, 222, 0.64);
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: color 140ms ease, background 140ms ease, opacity 140ms ease, transform 140ms ease;
}

.voice-participant-volume-button:hover,
.voice-participant-volume-button:focus-visible,
.voice-participant-volume-button.adjusted {
  color: #dffbe7;
  background: rgba(89, 217, 139, 0.16);
}

.voice-participant-volume-button.muted {
  color: #ffb1aa;
  background: rgba(216, 93, 84, 0.14);
}

.voice-participant-volume-button svg {
  width: 13px;
  height: 13px;
}

.voice-participant-volume-button span {
  font-size: 8px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.voice-card:not(.voice-unavailable) .voice-occupants:not(.empty) {
  max-height: none;
  overflow: visible;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  scrollbar-width: none;
}

.voice-card:not(.voice-unavailable) .voice-occupants .voice-occupant {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  padding: 3px;
  justify-content: center;
}

.voice-card:not(.voice-unavailable) .voice-occupants .voice-occupant > b,
.voice-card:not(.voice-unavailable) .voice-occupants .voice-self-badge,
.voice-card:not(.voice-unavailable) .voice-occupants .voice-role-mark,
.voice-card:not(.voice-unavailable) .voice-occupants .voice-participant-volume-button {
  display: none;
}

.voice-card:not(.voice-unavailable) .voice-occupants .voice-occupant:focus-visible {
  outline: 2px solid rgba(89, 217, 139, 0.58);
  outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
  .voice-occupant.adjustable .voice-participant-volume-button:not(.adjusted) {
    opacity: 0;
    transform: scale(0.88);
  }

  .voice-occupant.adjustable:hover .voice-participant-volume-button,
  .voice-occupant.adjustable:focus-within .voice-participant-volume-button {
    opacity: 1;
    transform: scale(1);
  }
}

.voice-role-mark {
  width: 17px;
  height: 17px;
  margin-left: -2px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: rgba(247, 241, 223, 0.58);
  background: rgba(255, 255, 255, 0.045);
}

.voice-role-mark.role-host {
  color: #f0d77e;
}

.voice-role-mark.role-speaker {
  color: var(--green-2);
}

.voice-role-mark svg {
  width: 10px;
  height: 10px;
}

.voice-join {
  min-width: 0;
  min-height: var(--voice-card-control-row);
  width: 100%;
}

.voice-mini-actions {
  min-width: 0;
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.voice-mini-actions .button {
  min-width: 0;
  min-height: var(--voice-card-control-row);
  width: 100%;
}

.button.icon.screen-audio-missing,
.button.icon.screen-audio-missing.active {
  color: #f4cf7a;
  border-color: rgba(232, 178, 67, 0.56);
  background: linear-gradient(135deg, rgba(153, 104, 29, 0.34), rgba(91, 67, 29, 0.44));
  box-shadow:
    inset 0 0 0 1px rgba(255, 225, 153, 0.07),
    0 7px 18px rgba(105, 70, 20, 0.15);
}

@media (hover: hover) and (pointer: fine) {
  .button.icon.screen-audio-missing:hover {
    color: #ffe4a3;
    border-color: rgba(244, 195, 91, 0.72);
    background: linear-gradient(135deg, rgba(169, 116, 34, 0.42), rgba(105, 75, 30, 0.5));
  }
}

.voice-local-mic {
  --voice-local-level: 0;
  position: relative;
  isolation: isolate;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.voice-local-mic.microphone-state-off {
  color: #f3b1aa;
  border-color: rgba(225, 105, 92, 0.58);
  background: linear-gradient(135deg, rgba(178, 58, 51, 0.42), rgba(104, 39, 36, 0.48));
  box-shadow:
    inset 0 0 0 1px rgba(255, 173, 164, 0.08),
    0 7px 18px rgba(111, 35, 31, 0.16);
}

.voice-local-mic.microphone-state-on {
  color: #bdf3ca;
  border-color: rgba(89, 217, 139, 0.4);
  background: rgba(35, 163, 95, 0.16);
  box-shadow: inset 0 0 0 1px rgba(89, 217, 139, 0.045);
}

.voice-local-mic.microphone-state-pending {
  color: rgba(247, 241, 223, 0.72);
  border-color: rgba(247, 241, 223, 0.16);
  background: rgba(247, 241, 223, 0.055);
}

.voice-local-mic > svg {
  position: relative;
  z-index: 2;
  transition: color 180ms ease, filter 180ms ease;
}

.voice-local-mic::before,
.voice-local-mic::after {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 999px;
  content: "";
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.7);
}

.voice-local-mic::before {
  width: 31px;
  height: 31px;
  border: 1px solid rgba(61, 188, 108, 0.42);
  background: radial-gradient(circle, rgba(35, 117, 65, 0.34) 0 38%, rgba(22, 83, 46, 0.12) 39% 58%, transparent 60%);
  box-shadow: 0 0 16px rgba(31, 142, 74, 0.2);
}

.voice-local-mic::after {
  width: 20px;
  height: 20px;
  background: rgba(34, 126, 68, 0.22);
  filter: blur(4px);
}

.voice-local-mic.voice-is-speaking:not(:disabled)::before {
  opacity: calc(0.34 + (var(--voice-local-level) * 0.5));
  animation: voiceLocalMicWave 1.5s ease-out infinite;
}

.voice-local-mic.voice-is-speaking:not(:disabled)::after {
  opacity: calc(0.3 + (var(--voice-local-level) * 0.55));
  transform: translate(-50%, -50%) scale(calc(0.82 + (var(--voice-local-level) * 0.28)));
}

.voice-local-mic.voice-is-speaking:not(:disabled) > svg {
  color: #83e49f;
  filter: drop-shadow(0 0 5px rgba(77, 208, 119, 0.52));
}

@keyframes voiceLocalMicWave {
  0% { transform: translate(-50%, -50%) scale(0.72); }
  58% { opacity: calc(0.24 + (var(--voice-local-level) * 0.32)); }
  100% { transform: translate(-50%, -50%) scale(calc(1.05 + (var(--voice-local-level) * 0.28))); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .voice-local-mic.voice-is-speaking:not(:disabled)::before {
    animation: none;
    transform: translate(-50%, -50%) scale(1);
  }

  .voice-occupant.speaking .voice-avatar-waves i,
  .quality-orbit span,
  .stream-settings-panel::before {
    animation: none;
  }
}

.voice-microphone-gain-button {
  min-width: 0;
  min-height: 34px;
  margin-top: 8px;
  padding: 0 11px;
  border: 1px solid rgba(89, 217, 139, 0.2);
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: rgba(227, 249, 233, 0.88);
  background: rgba(89, 217, 139, 0.075);
  font: inherit;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.voice-microphone-gain-button:hover,
.voice-microphone-gain-button:focus-visible,
.voice-microphone-gain-button[aria-expanded="true"] {
  outline: 0;
  color: #effff3;
  border-color: rgba(89, 217, 139, 0.42);
  background: rgba(89, 217, 139, 0.13);
}

.voice-microphone-gain-button.unavailable {
  color: rgba(247, 241, 223, 0.56);
  border-color: rgba(247, 241, 223, 0.11);
  background: rgba(247, 241, 223, 0.035);
}

.voice-microphone-gain-button.microphone-off:not(.unavailable) {
  color: rgba(247, 241, 223, 0.68);
  border-color: rgba(225, 105, 92, 0.24);
  background: rgba(225, 105, 92, 0.06);
}

.voice-microphone-gain-button.microphone-off:not(.unavailable):hover,
.voice-microphone-gain-button.microphone-off:not(.unavailable):focus-visible,
.voice-microphone-gain-button.microphone-off:not(.unavailable)[aria-expanded="true"] {
  color: rgba(255, 248, 239, 0.9);
  border-color: rgba(225, 105, 92, 0.4);
  background: rgba(225, 105, 92, 0.11);
}

.voice-microphone-gain-state-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  display: inline-grid;
  place-items: center;
}

.voice-microphone-gain-state-icon[hidden],
.voice-microphone-gain-muted-status[hidden] {
  display: none;
}

.voice-microphone-gain-button svg {
  width: 14px;
  height: 14px;
}

.voice-microphone-gain-button.microphone-off:not(.unavailable) .voice-microphone-gain-state-icon {
  color: #ef8c81;
}

.voice-microphone-gain-button b {
  color: rgba(247, 241, 223, 0.32);
}

.voice-microphone-gain-button output {
  color: var(--green-2);
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.voice-microphone-gain-button.unavailable output {
  color: rgba(247, 241, 223, 0.58);
}

.voice-microphone-gain-button.microphone-off:not(.unavailable) output {
  color: rgba(247, 241, 223, 0.76);
}

.voice-microphone-gain-muted-status {
  min-width: 0;
  padding: 2px 5px;
  border: 1px solid rgba(225, 105, 92, 0.22);
  border-radius: 999px;
  color: #f2aaa2;
  background: rgba(225, 105, 92, 0.11);
  font-size: 8px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0.02em;
}

.voice-microphone-gain-button.unavailable .voice-microphone-gain-muted-status {
  color: rgba(247, 241, 223, 0.58);
  border-color: rgba(247, 241, 223, 0.1);
  background: rgba(247, 241, 223, 0.04);
}

.voice-card > .voice-microphone-gain-button {
  width: 100%;
}

.voice-speaker-request {
  width: 100%;
  min-height: 38px;
  margin: 0 0 9px;
  gap: 8px;
}

.voice-speaker-request.pending {
  color: #f0d77e;
  border-color: rgba(213, 168, 50, 0.28);
  background: rgba(213, 168, 50, 0.08);
}

.voice-moderation {
  min-width: 0;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 9px;
}

.voice-moderation-group {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.voice-moderation-group > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.voice-moderation-person {
  min-width: 0;
  min-height: 34px;
  padding: 3px 4px 3px 5px;
  border-radius: 10px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.035);
}

.voice-moderation-person .avatar {
  width: 25px;
  height: 25px;
  font-size: 9px;
}

.voice-moderation-person b {
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.voice-moderation-person .button {
  width: 29px;
  min-width: 29px;
  min-height: 29px;
  padding: 0;
}

.voice-watch-room {
  width: 100%;
  margin-top: 9px;
}

.nav-zone {
  min-height: 0;
  overflow-y: auto;
  padding: 4px 12px 14px;
  display: grid;
  align-content: start;
  gap: 20px;
}

.section-title {
  margin: 0 0 8px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.section-heading .section-title {
  margin: 0;
}

.channel-create-hint {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}

.channel-create-hint.restricted > .button {
  opacity: 0.48;
}

.channel-create-hint.restricted::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 30;
  width: max-content;
  max-width: min(260px, calc(100vw - 28px));
  padding: 7px 9px;
  border: 1px solid rgba(142, 255, 180, 0.16);
  border-radius: 8px;
  color: rgba(247, 241, 223, 0.9);
  background: #101410;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.46);
  font-size: 10.5px;
  font-weight: 750;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 120ms ease, transform 120ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .channel-create-hint.restricted:hover::after,
  .channel-create-hint.restricted:focus-within::after {
    opacity: 1;
    transform: translateY(0);
  }
}

.button.tiny {
  width: 28px;
  min-height: 28px;
}

.button.tiny svg {
  width: 15px;
  height: 15px;
}

.nav-list {
  display: grid;
  gap: 5px;
}

.channel-row {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid transparent;
  border-radius: var(--radius);
}

.channel-row:hover,
.channel-row.active {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.08);
}

.channel-row:hover .nav-item,
.channel-row.active .nav-item {
  color: var(--text);
}

.channel-row.voice-self {
  border-color: rgba(89, 217, 139, 0.22);
  background:
    linear-gradient(90deg, rgba(35, 163, 95, 0.12), rgba(255, 255, 255, 0.045)),
    rgba(255, 255, 255, 0.03);
}

.channel-row .nav-item {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
}

.channel-row .nav-item:hover {
  border-color: transparent;
  background: transparent;
}

.channel-row.context-menu-enabled .nav-item {
  -webkit-touch-callout: none;
}

.channel-row.context-press-pending,
.channel-row.context-menu-active {
  border-color: rgba(139, 232, 165, 0.38);
  background:
    linear-gradient(90deg, rgba(89, 217, 139, 0.12), rgba(255, 255, 255, 0.045)),
    rgba(255, 255, 255, 0.035);
}

.channel-voice-indicator {
  min-width: 24px;
  height: 22px;
  padding: 0 6px;
  border: 1px solid rgba(89, 217, 139, 0.18);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: rgba(186, 244, 200, 0.86);
  background: rgba(35, 163, 95, 0.1);
}

.channel-voice-indicator i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--green-2);
  box-shadow: 0 0 0 4px rgba(89, 217, 139, 0.08);
}

.channel-voice-indicator svg {
  width: 13px;
  height: 13px;
}

.channel-voice-indicator b {
  color: rgba(238, 235, 222, 0.74);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.channel-voice-indicator.self {
  border-color: rgba(89, 217, 139, 0.4);
  background: rgba(35, 163, 95, 0.18);
  box-shadow: 0 0 0 1px rgba(89, 217, 139, 0.08);
}

.channel-create {
  height: 38px;
  margin-bottom: 6px;
  padding: 0 5px 0 10px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(89, 217, 139, 0.3);
  border-radius: var(--radius);
  background: rgba(8, 9, 8, 0.48);
}

.channel-create.has-error {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  border-color: rgba(255, 126, 116, 0.48);
  box-shadow: 0 0 0 2px rgba(216, 93, 84, 0.08);
}

.channel-create svg {
  width: 16px;
  height: 16px;
  color: var(--green-2);
}

.channel-create input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.channel-create input::placeholder {
  color: var(--muted);
}

.channel-create-error {
  color: #ffaaa2;
  font-size: 10px;
  font-weight: 900;
  text-transform: lowercase;
  white-space: nowrap;
}

.nav-list.compact {
  gap: 4px;
}

.nav-item,
.dm-item {
  min-width: 0;
  width: 100%;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  text-align: left;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.nav-item:hover,
.nav-item.active,
.dm-item:hover,
.dm-item.active {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.08);
}

.nav-item svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

.nav-item span,
.dm-item span {
  min-width: 0;
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dm-item {
  padding: 6px 8px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto 12px;
  align-items: center;
}

.dm-item .avatar {
  width: 30px;
  height: 30px;
  font-size: 11px;
}

.personal-chat-icon,
.home-space-icon {
  box-sizing: border-box;
  border: 1px solid rgba(89, 217, 139, 0.3);
  place-items: center;
  color: #baf4c8;
  background:
    linear-gradient(135deg, rgba(35, 163, 95, 0.24), rgba(255, 255, 255, 0.04)),
    rgba(16, 30, 22, 0.72);
}

.personal-chat-icon,
.home-space-icon {
  display: grid;
}

.personal-chat-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: var(--radius);
}

.home-space-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

.personal-chat-icon svg {
  display: block;
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}

.home-space-icon svg {
  display: block;
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

.title-icon .personal-chat-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.home-nav {
  padding-top: 14px;
}

.home-dialog-list {
  gap: 6px;
}

.home-dm-item {
  min-height: 50px;
  grid-template-columns: 30px minmax(0, 1fr) auto auto 12px;
}

.home-saved-item,
.contact-result {
  min-width: 0;
  width: 100%;
  min-height: 50px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  text-align: left;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.home-saved-item:hover,
.home-saved-item.active,
.contact-result:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.08);
}

.home-saved-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #baf4c8;
  border: 1px solid rgba(89, 217, 139, 0.28);
  background:
    linear-gradient(135deg, rgba(35, 163, 95, 0.24), rgba(213, 168, 50, 0.08)),
    rgba(16, 30, 22, 0.72);
}

.home-saved-icon svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.2;
}

.home-dm-item time,
.home-saved-item time {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.home-dm-meta {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.dm-item .home-dm-name-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  overflow: visible;
  text-overflow: clip;
}

.dm-item .home-dm-name-row > b {
  flex: 0 1 auto;
  min-width: 0;
}

.dm-item .home-dm-name-row > .display-name-signal-marker {
  flex: 0 0 16px;
  display: inline-grid;
  overflow: visible;
}

.home-dm-meta b,
.home-dm-meta small {
  min-width: 0;
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.home-dm-meta b {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.home-dm-meta small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.home-dialog-preview {
  min-height: 18px;
  line-height: 18px;
}

.home-dialog-preview .dialog-preview-emote {
  display: inline-grid;
  width: 18px;
  height: 18px;
  margin: 0 1px;
  vertical-align: -4px;
  place-items: center;
}

.home-dialog-preview .dialog-preview-emote img {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.home-dialog-preview .dialog-preview-emote.fallback {
  color: var(--text);
  font-size: 14px;
  line-height: 1;
}

.home-dialog-preview img.emoji {
  width: 16px;
  height: 16px;
  margin: 0 1px;
  vertical-align: -3px;
}

.contact-search-card {
  display: grid;
  gap: 8px;
}

.contact-search-box {
  min-width: 0;
  min-height: 42px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 8px;
  padding: 0 6px 0 12px;
  border: 1px solid rgba(89, 217, 139, 0.24);
  border-radius: var(--radius);
  background: rgba(8, 10, 8, 0.5);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.contact-search-box > svg,
.contact-search-box > i {
  width: 17px;
  height: 17px;
  color: var(--green-2);
}

.contact-search-box input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-weight: 750;
}

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

.contact-search-results {
  display: grid;
  gap: 5px;
}

.contact-requests-section.hidden {
  display: none;
}

.contact-requests-head {
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.contact-requests-head .section-title {
  margin: 0;
}

.contact-requests-head > b {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border: 1px solid rgba(89, 217, 139, 0.2);
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: #caffd5;
  background: rgba(89, 217, 139, 0.1);
  font-size: 10px;
  font-weight: 900;
}

.contact-request-list {
  display: grid;
  gap: 5px;
}

.contact-request-item {
  min-width: 0;
  min-height: 50px;
  padding: 6px 7px;
  border: 1px solid rgba(89, 217, 139, 0.13);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 30px 30px;
  align-items: center;
  gap: 7px;
  background:
    linear-gradient(135deg, rgba(89, 217, 139, 0.075), rgba(255, 255, 255, 0.018)),
    rgba(8, 10, 8, 0.38);
}

.contact-request-item .avatar {
  width: 30px;
  height: 30px;
  font-size: 11px;
}

.contact-request-avatar {
  display: contents;
}

.contact-request-user {
  min-width: 0;
  border: 0;
  padding: 0;
  display: grid;
  gap: 2px;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.contact-request-user b,
.contact-request-user small {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.contact-request-user b {
  font-size: 12px;
  font-weight: 900;
}

.contact-request-user small {
  color: var(--muted);
  font-size: 10px;
}

.contact-request-accept {
  color: #caffd5;
  border-color: rgba(89, 217, 139, 0.22);
  background: rgba(89, 217, 139, 0.1);
}

.contact-request-decline {
  color: rgba(247, 241, 223, 0.6);
}

.contact-requests-more {
  min-height: 30px;
  border: 0;
  padding: 3px 6px;
  color: var(--green-2);
  background: transparent;
  font-size: 11px;
  font-weight: 850;
  text-align: left;
}

.contact-request-retry {
  width: 100%;
  cursor: pointer;
  text-align: left;
}

.contact-result {
  grid-template-columns: 30px minmax(0, 1fr) 12px 30px;
}

.contact-result .avatar {
  width: 30px;
  height: 30px;
  font-size: 11px;
}

.contact-result-status {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--green-2);
  background: rgba(89, 217, 139, 0.08);
  border: 1px solid rgba(89, 217, 139, 0.16);
}

.contact-result-status svg {
  width: 15px;
  height: 15px;
}

.contact-profile-button {
  width: 30px;
  min-height: 30px;
  border-radius: 9px;
}

.contact-result .presence {
  justify-self: center;
  margin-left: 0;
}

.home-empty-note {
  min-height: 42px;
  padding: 10px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.045);
}

.home-empty-note.loading svg {
  width: 15px;
  height: 15px;
  animation: spin 900ms linear infinite;
}

.home-empty-note.error {
  color: #ffb2a8;
  border-color: rgba(216, 93, 84, 0.25);
  background: rgba(216, 93, 84, 0.08);
}

.dm-item .unread-badge {
  margin-left: 0;
}

.dm-item .presence {
  margin-left: 0;
  justify-self: center;
}

.empty-list {
  padding: 9px 10px;
  color: var(--muted);
  font-size: 13px;
}

.user-strip {
  min-height: var(--footer-height);
  height: var(--footer-height);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px 40px;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: rgba(9, 10, 9, 0.38);
  overflow: hidden;
}

.profile-trigger {
  min-width: 0;
  width: 100%;
  border: 0;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px;
  color: var(--text);
  text-align: left;
  background: transparent;
}

.user-strip > .button {
  width: 40px;
  min-width: 40px;
}

.profile-trigger:hover {
  background: rgba(255, 255, 255, 0.055);
}

.avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: var(--radius);
  font-size: 12px;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.avatar.deleted-account-avatar {
  display: grid;
  place-items: center;
  border: 1px solid rgba(197, 203, 198, 0.12);
  color: rgba(221, 224, 219, 0.58);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015)),
    #343834 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.avatar.deleted-account-avatar svg {
  width: 48%;
  height: 48%;
  stroke-width: 1.8;
}

.deleted-account-name {
  color: rgba(205, 209, 203, 0.58) !important;
  filter: none !important;
}

.message-author.deleted-account-name {
  cursor: default;
}

.deleted-account-profile {
  cursor: default;
}

.direct-profile-hero.deleted-account-profile,
.direct-profile-hero.deleted-account-profile:hover {
  border-color: rgba(197, 203, 198, 0.12);
  background:
    linear-gradient(145deg, rgba(197, 203, 198, 0.055), transparent),
    rgba(255, 255, 255, 0.025);
}

.member-profile-hit.deleted-account-profile:hover {
  background: transparent;
}

.user-meta {
  min-width: 0;
  flex: 1;
}

.profile-trigger .user-meta,
.profile-trigger .user-name,
.profile-trigger .user-sub {
  display: block;
}

.user-name {
  font-weight: 850;
  font-size: 13px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.user-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chat-panel {
  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 74px auto auto minmax(0, 1fr) auto;
  background: rgba(18, 19, 17, 0.74);
}

.chat-header {
  position: relative;
  z-index: 30;
  grid-row: 1;
  min-width: 0;
  min-height: 74px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  overflow: visible;
  background: rgba(18, 19, 17, 0.98);
}

.chat-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-title-copy {
  min-width: 0;
}

.chat-title-name-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

.chat-title-name-row h1 {
  min-width: 0;
}

.chat-title-name-button {
  display: block;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  line-height: inherit;
  text-align: left;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  appearance: none;
  cursor: pointer;
  transition: color 140ms ease;
  -webkit-tap-highlight-color: transparent;
}

.chat-title-name-button:hover {
  color: var(--green-2);
}

.chat-title-name-button:focus-visible {
  border-radius: 5px;
  outline: 2px solid rgba(145, 223, 157, 0.72);
  outline-offset: 3px;
}

.chat-title-presence {
  width: 8px;
  height: 8px;
  margin-left: 1px;
}

.chat-title-presence.online {
  box-shadow: 0 0 0 3px rgba(89, 217, 139, 0.1);
}

.title-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--gold);
}

.title-icon svg {
  width: 24px;
  height: 24px;
}

.title-icon .avatar {
  width: 42px;
  height: 42px;
}

.chat-title h1 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.header-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-nav-toggle,
.mobile-members-toggle,
.mobile-panel-close,
.mobile-backdrop {
  display: none;
}

.notification-button {
  position: relative;
}

.notification-button > * {
  pointer-events: none;
}

.notification-icon-slot {
  display: inline-grid;
  place-items: center;
}

.notification-icon-slot[hidden],
.notification-dot[hidden],
.header-menu-badge[hidden] {
  display: none;
}

.notification-button.attention {
  color: #caffda;
  border-color: rgba(89, 217, 139, 0.42);
}

.header-menu-wrap {
  position: relative;
  display: inline-flex;
}

.header-more-button.active {
  color: #caffda;
  border-color: rgba(89, 217, 139, 0.38);
  background: rgba(89, 217, 139, 0.08);
}

.header-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 45;
  min-width: 170px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(23, 24, 21, 0.96);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(16px);
}

.header-menu button {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  background: transparent;
  font-size: 13px;
  font-weight: 850;
  text-align: left;
}

.header-menu button:hover {
  background: rgba(255, 255, 255, 0.06);
}

.header-menu button.danger {
  color: #ffb3ad;
}

.header-menu button.danger:hover {
  background: rgba(199, 82, 74, 0.13);
}

.header-menu-separator {
  display: block;
  height: 1px;
  margin: 6px 4px;
  background: rgba(255, 255, 255, 0.08);
}

.header-menu svg {
  width: 16px;
  height: 16px;
}

.header-menu-badge {
  min-width: 18px;
  height: 18px;
  margin-left: auto;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: var(--coral);
  font-size: 10px;
  line-height: 1;
}

.notification-dot {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--coral);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.screen-float {
  position: fixed;
  left: 92px;
  bottom: 18px;
  z-index: 30;
  width: min(480px, calc(100vw - 120px));
  display: grid;
  grid-template-rows: 42px auto;
  border: 1px solid rgba(89, 217, 139, 0.32);
  border-radius: var(--radius);
  background: rgba(8, 9, 8, 0.94);
  box-shadow: var(--shadow);
  overflow: clip;
  backdrop-filter: blur(16px);
}

.screen-dock {
  position: fixed;
  left: 90px;
  bottom: calc(var(--footer-height) + 10px);
  z-index: 31;
  width: min(270px, calc(100vw - 108px));
  min-height: 48px;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(89, 217, 139, 0.26);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(35, 163, 95, 0.14), rgba(8, 9, 8, 0.94) 64%),
    rgba(8, 9, 8, 0.94);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
}

.activity-dock-stack {
  position: fixed;
  left: 90px;
  bottom: calc(var(--footer-height) + 10px);
  z-index: 31;
  width: min(272px, calc(100vw - 108px));
  display: grid;
  gap: 8px;
  transition: left 180ms ease, bottom 180ms ease;
}

#screen-float-root.music-float-docked .activity-dock-stack {
  left: var(--music-float-stack-left, 8px);
  bottom: var(--music-float-stack-bottom, calc(var(--footer-height) + 150px));
}

.activity-dock-stack.voice-expanded {
  width: min(344px, calc(100vw - 108px));
}

.activity-dock-stack .screen-dock {
  position: static;
  left: auto;
  bottom: auto;
  width: 100%;
}

.screen-dock-live {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--green-2);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.screen-live-meta {
  min-width: 34px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 4px;
}

.screen-viewer-count {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: rgba(134, 229, 160, 0.8);
  font-size: 10px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.screen-viewer-count svg {
  width: 13px;
  height: 13px;
  color: var(--green-2);
  filter: drop-shadow(0 0 5px rgba(89, 217, 139, 0.24));
}

.screen-viewer-count b {
  font-size: inherit;
  font-weight: 900;
}

.screen-dock-live i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--green-2);
  box-shadow: 0 0 0 4px rgba(89, 217, 139, 0.12);
}

.screen-dock > strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  line-height: 1.1;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.screen-dock-actions,
.screen-volume,
.screen-audio-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.screen-dock-actions .button,
.screen-volume .button {
  width: 36px;
  min-width: 36px;
  min-height: 36px;
}

.screen-dock-actions .screen-watch-cta {
  width: auto;
  min-width: 92px;
  min-height: 32px;
  padding: 0 11px;
  gap: 6px;
  border-radius: 8px;
  font-size: 11px;
}

.screen-dock-actions .screen-watch-cta svg {
  width: 15px;
  height: 15px;
}

.screen-watch-joining .screen-watch-cta svg {
  animation: spin 900ms linear infinite;
}

.screen-dock.screen-watch-available,
.screen-dock.screen-watch-joining {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.screen-dock-actions svg,
.screen-volume svg {
  width: 15px;
  height: 15px;
}

.screen-volume {
  min-width: 36px;
  padding: 0;
  border: 0;
  background: transparent;
}

.screen-volume.dock {
  min-width: 36px;
  max-width: 36px;
}

.screen-volume.mobile {
  min-width: 36px;
  max-width: 36px;
}

.screen-volume.mobile input[type="range"]:not(.media-volume-range) {
  width: 50px;
}

.screen-volume.disabled {
  opacity: 0.46;
}

.screen-volume input[type="range"]:not(.media-volume-range) {
  width: 66px;
  height: 18px;
  margin: 0;
  accent-color: var(--green-2);
}

.screen-volume.dock input[type="range"]:not(.media-volume-range) {
  width: 42px;
}

.screen-volume input[type="range"]:not(.media-volume-range):disabled {
  opacity: 0.5;
}

.screen-audio-state {
  min-width: 58px;
  max-width: 72px;
  min-height: 30px;
  box-sizing: border-box;
  padding: 3px 7px 3px 4px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  font: inherit;
  text-align: left;
}

button.screen-audio-state {
  appearance: none;
  cursor: pointer;
}

.screen-audio-state-icon {
  width: 20px;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.05);
}

.screen-audio-state-icon svg {
  width: 12px;
  height: 12px;
}

.screen-audio-state-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.screen-audio-state-copy strong {
  overflow: hidden;
  font-size: 8px;
  line-height: 1.15;
  letter-spacing: 0;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.screen-audio-state.success {
  border-color: rgba(89, 217, 139, 0.3);
  color: var(--green-2);
  background: rgba(35, 163, 95, 0.1);
}

.screen-audio-state.success .screen-audio-state-icon {
  color: var(--green-2);
  background: rgba(89, 217, 139, 0.1);
}

.screen-audio-state.warning,
.screen-audio-state.muted {
  border-color: rgba(216, 93, 84, 0.32);
  color: #ffaaa2;
  background: rgba(201, 83, 74, 0.09);
}

.screen-audio-state.warning .screen-audio-state-icon {
  color: #ffaaa2;
  background: rgba(201, 83, 74, 0.12);
}

.screen-audio-state.muted .screen-audio-state-icon {
  color: var(--muted);
}

.screen-audio-state.pending .screen-audio-state-icon {
  color: #f0c96a;
  background: rgba(240, 201, 106, 0.1);
}

.screen-audio-state.pending {
  border-color: rgba(240, 201, 106, 0.3);
  color: #f0c96a;
  background: rgba(240, 201, 106, 0.07);
}

.screen-audio-state.pending .screen-audio-state-icon svg {
  animation: spin 900ms linear infinite;
}

.screen-audio-state.action:hover {
  border-color: rgba(89, 217, 139, 0.42);
  background: rgba(35, 163, 95, 0.13);
}

.screen-audio-state.pending.action:hover {
  border-color: rgba(240, 201, 106, 0.42);
  background: rgba(240, 201, 106, 0.11);
}

.screen-audio-state.action:active {
  transform: translateY(1px);
}

.screen-view-tools {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 5;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(7, 10, 7, 0.76);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
  opacity: 0.18;
  transition: opacity 160ms ease, transform 160ms ease;
}

.screen-float-media:hover .screen-view-tools,
.screen-view-tools:focus-within,
.screen-float.expanded .screen-view-tools {
  opacity: 1;
}

.screen-view-tools .button {
  width: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 9px;
}

.screen-float-media.screen-fit-actual {
  display: block;
  overscroll-behavior: contain;
}

.screen-float-media.screen-fit-actual .screen-video {
  margin: auto;
}

.screen-float:fullscreen,
.screen-float:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  border: 0;
  border-radius: 0;
  background: #050705;
}

.screen-float:fullscreen .screen-float-media,
.screen-float:-webkit-full-screen .screen-float-media {
  max-height: none;
}

.screen-audio-state.dock {
  min-width: 58px;
  max-width: 72px;
}

.screen-audio-state.mobile {
  width: auto;
  max-width: 72px;
  min-height: 30px;
}

.active-voice-dock {
  width: 100%;
  min-height: 54px;
  box-sizing: border-box;
  padding: 8px;
  border: 1px solid rgba(89, 217, 139, 0.28);
  border-radius: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  background:
    linear-gradient(135deg, rgba(35, 163, 95, 0.16), rgba(8, 9, 8, 0.95) 66%),
    rgba(8, 9, 8, 0.95);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
}

.active-voice-dock.expanded {
  min-height: 102px;
  align-items: start;
  border-color: rgba(89, 217, 139, 0.5);
}

.active-voice-dock.connected {
  border-color: rgba(89, 217, 139, 0.46);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(89, 217, 139, 0.08) inset;
}

.active-voice-main {
  position: relative;
  min-width: 0;
  min-height: 38px;
  padding: 0 22px 0 0;
  border: 0;
  display: grid;
  gap: 3px;
  color: inherit;
  text-align: left;
  background: transparent;
}

.active-voice-main:hover strong {
  color: #fff;
}

.active-voice-live {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--green-2);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.active-voice-live i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--green-2);
  box-shadow: 0 0 0 4px rgba(89, 217, 139, 0.12);
}

.active-voice-dock.connecting .active-voice-live i {
  animation: liveDot 1.4s ease-in-out infinite;
}

.active-voice-main strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.1;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.active-voice-main small {
  min-width: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}

.active-voice-main small b {
  color: rgba(247, 241, 223, 0.36);
  font-size: 10px;
}

.active-voice-chevron {
  position: absolute;
  right: 0;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  display: grid;
  place-items: center;
  color: rgba(247, 241, 223, 0.58);
  border-radius: 7px;
}

.active-voice-main:hover .active-voice-chevron {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.active-voice-chevron svg {
  width: 15px;
  height: 15px;
}

.active-voice-avatars {
  min-width: 0;
  display: flex;
  align-items: center;
  padding-left: 4px;
  pointer-events: none;
}

.active-voice-avatars .avatar {
  width: 24px;
  height: 24px;
  margin-left: -7px;
  border: 2px solid rgba(8, 9, 8, 0.94);
  border-radius: 999px;
  font-size: 10px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.28);
}

.active-voice-avatars .avatar:first-child {
  margin-left: 0;
}

.active-voice-extra {
  width: 24px;
  height: 24px;
  margin-left: -7px;
  border: 2px solid rgba(8, 9, 8, 0.94);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: rgba(247, 241, 223, 0.92);
  font-size: 9px;
  font-weight: 900;
  background: rgba(89, 217, 139, 0.18);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.28);
}

.active-voice-actions {
  grid-column: 1 / -1;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  gap: 6px;
  padding-top: 2px;
}

.active-voice-participants {
  grid-column: 1 / -1;
  min-width: 0;
  max-height: min(40vh, 320px);
  overflow-y: auto;
  display: grid;
  gap: 5px;
  padding: 3px 1px;
  scrollbar-width: thin;
}

.active-voice-participants .voice-occupant,
.mobile-header-voice-participants .voice-occupant {
  width: 100%;
  height: 38px;
  box-sizing: border-box;
  padding: 5px 6px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
}

.active-voice-participants .voice-occupant > b,
.mobile-header-voice-participants .voice-occupant > b {
  flex: 1 1 auto;
}

.active-voice-actions .button {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  border-radius: 10px;
}

.active-voice-actions svg {
  width: 15px;
  height: 15px;
}

.music-float {
  --music-art-hue: 138;
  position: fixed;
  z-index: 34;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid rgba(113, 239, 157, 0.3);
  border-radius: 20px;
  color: var(--text);
  background:
    radial-gradient(circle at 12% -10%, rgba(108, 255, 163, 0.16), transparent 38%),
    radial-gradient(circle at 100% 88%, rgba(33, 155, 93, 0.12), transparent 42%),
    linear-gradient(145deg, rgba(21, 27, 22, 0.98), rgba(6, 9, 7, 0.985));
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.52),
    0 0 0 1px rgba(255, 255, 255, 0.025) inset,
    0 1px 0 rgba(255, 255, 255, 0.08) inset;
  backdrop-filter: blur(24px) saturate(1.25);
  transition: width 220ms ease, height 260ms ease, border-color 180ms ease, box-shadow 180ms ease;
  container-type: size;
}

.music-float.playing {
  border-color: rgba(113, 239, 157, 0.56);
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.56),
    0 0 42px rgba(55, 211, 112, 0.09),
    0 0 0 1px rgba(255, 255, 255, 0.035) inset;
}

.music-float.dragging,
.music-float.resizing {
  transition: none;
  user-select: none;
  box-shadow: 0 38px 100px rgba(0, 0, 0, 0.66), 0 0 48px rgba(69, 225, 126, 0.14);
}

.music-float-header {
  position: relative;
  z-index: 6;
  height: 38px;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) repeat(3, 28px);
  align-items: center;
  gap: 7px;
  padding: 5px 8px 5px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  background: linear-gradient(90deg, rgba(92, 222, 140, 0.06), rgba(255, 255, 255, 0.012));
  cursor: grab;
  touch-action: none;
}

.music-float.dragging .music-float-header {
  cursor: grabbing;
}

.music-float-header > strong {
  color: rgba(247, 241, 223, 0.74);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.16em;
  white-space: nowrap;
}

.music-float-header > strong em {
  color: var(--green-2);
  font-style: normal;
}

.music-float-status {
  min-width: 0;
  overflow: hidden;
  color: rgba(247, 241, 223, 0.34);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: right;
  text-transform: uppercase;
  white-space: nowrap;
}

.music-float-signal {
  height: 12px;
  display: inline-flex;
  align-items: end;
  gap: 2px;
}

.music-float-signal i {
  width: 2px;
  height: 35%;
  border-radius: 999px;
  background: var(--green-2);
  opacity: 0.42;
}

.music-float-signal i:nth-child(2) { height: 72%; }
.music-float-signal i:nth-child(3) { height: 100%; }
.music-float-signal i:nth-child(4) { height: 55%; }

.music-float.playing .music-float-signal i {
  opacity: 1;
  animation: music-float-signal 900ms ease-in-out infinite alternate;
}

.music-float.playing .music-float-signal i:nth-child(2) { animation-delay: -420ms; }
.music-float.playing .music-float-signal i:nth-child(3) { animation-delay: -160ms; }
.music-float.playing .music-float-signal i:nth-child(4) { animation-delay: -620ms; }

@keyframes music-float-signal {
  from { transform: scaleY(0.35); }
  to { transform: scaleY(1); }
}

.music-float-tool {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: rgba(247, 241, 223, 0.48);
  background: transparent;
}

.music-float-tool:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.055);
}

.music-float-tool.accent {
  color: var(--green-2);
  background: rgba(89, 217, 139, 0.08);
}

.music-float-tool svg {
  width: 12px;
  height: 12px;
}

.music-float-compact-body {
  height: calc(100% - 38px);
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 52px 46px minmax(0, 1fr) 30px auto;
  grid-template-areas: "art play main volume time";
  align-items: center;
  gap: 5px;
  padding: 7px 10px 9px;
}

.music-float-compact-body.has-navigation {
  grid-template-columns: 52px 26px 46px 26px minmax(0, 1fr) 30px auto;
  grid-template-areas: "art prev play next main volume time";
}

.music-float.compact {
  max-width: min(360px, calc(100vw - 24px));
}

.music-float-artwork {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: rgba(245, 255, 248, 0.92);
  background:
    radial-gradient(
      circle at 33% 25%,
      hsl(var(--music-art-accent) 72% 63% / 0.62),
      transparent 42%
    ),
    linear-gradient(
      145deg,
      hsl(var(--music-art-hue) 38% 28%),
      hsl(var(--music-art-accent) 32% 12%)
    );
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.music-float-artwork::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.15), transparent 32%, transparent 68%, rgba(255, 255, 255, 0.05));
  pointer-events: none;
}

.music-float-artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.music-float-artwork > i svg {
  width: 34%;
  height: 34%;
}

.music-float-artwork.compact-art {
  grid-area: art;
  width: 52px;
  height: 52px;
  border-radius: 14px;
}

.music-float .music-dock-play {
  flex: 0 0 auto;
}

.music-float-compact-body .music-dock-play {
  grid-area: play;
  width: 46px;
  height: 46px;
}

.music-float-compact-body .music-dock-head {
  display: grid;
  gap: 2px;
}

.music-float-compact-body .music-dock-main { grid-area: main; }
.music-float-compact-body .music-volume { grid-area: volume; }

.music-float-compact-body .music-dock-head strong,
.music-float-compact-body .music-dock-head small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-float-compact-body .music-dock-head strong {
  font-size: 13px;
}

.music-float-compact-body .music-dock-head small {
  color: rgba(247, 241, 223, 0.42);
  font-size: 9px;
}

.music-float-time {
  grid-area: time;
  color: rgba(247, 241, 223, 0.42);
  font-size: 9px;
  white-space: nowrap;
}

.music-float-compact-step {
  width: 26px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: rgba(247, 241, 223, 0.5);
  background: rgba(255, 255, 255, 0.035);
}

.music-float-prev { grid-area: prev; }
.music-float-next { grid-area: next; }

.music-float-compact-step:hover {
  color: var(--green-2);
  background: rgba(89, 217, 139, 0.1);
}

.music-float-compact-step svg {
  width: 13px;
  height: 13px;
}

.music-float-expanded-body {
  height: calc(100% - 38px);
  min-height: 0;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto minmax(118px, 1fr) 34px;
  gap: 12px;
  padding: 14px 16px 12px;
}

.music-float-stage {
  position: relative;
  min-height: 0;
  display: grid;
  grid-template-columns: clamp(140px, 31cqw, 280px) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto auto;
  grid-template-areas:
    "visual copy"
    "visual timeline"
    "visual transport";
  align-items: center;
  column-gap: clamp(16px, 3cqw, 28px);
  row-gap: 9px;
  padding: 4px 2px 2px;
  isolation: isolate;
}

.music-float-visual {
  position: relative;
  z-index: 1;
  grid-area: visual;
  width: 100%;
  aspect-ratio: 1;
  align-self: center;
}

.music-float-visual::before {
  content: "";
  position: absolute;
  inset: -17%;
  z-index: 0;
  border-radius: 42%;
  background:
    conic-gradient(from 80deg, transparent 0 18%, hsla(var(--music-art-hue), 92%, 72%, 0.26) 24%, transparent 32% 68%, hsla(calc(var(--music-art-hue) + 72), 82%, 66%, 0.2) 76%, transparent 84%),
    radial-gradient(circle, hsla(var(--music-art-hue), 82%, 58%, 0.2), transparent 64%);
  filter: blur(15px);
  opacity: 0.62;
  transform: rotate(-12deg) scale(0.94);
  pointer-events: none;
}

.music-float-artwork.hero {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  border-radius: clamp(20px, 3cqw, 30px);
  box-shadow:
    0 28px 60px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.13) inset;
}

.music-float-orbit {
  position: absolute;
  inset: -8%;
  z-index: 1;
  border-radius: 34%;
  border: 1px solid rgba(120, 245, 164, 0.1);
  transform: rotate(-5deg);
  pointer-events: none;
}

.music-float-orbit::before,
.music-float-orbit::after {
  content: "";
  position: absolute;
  border-radius: 38%;
  border: 1px solid rgba(166, 255, 197, 0.09);
}

.music-float-orbit::before {
  inset: 7% -5%;
  transform: rotate(23deg);
}

.music-float-orbit::after {
  inset: -4% 10%;
  border-color: rgba(213, 168, 50, 0.1);
  transform: rotate(-28deg);
}

.music-float-orbit i {
  position: absolute;
  border-radius: 999px;
  background: rgba(183, 255, 207, 0.55);
  box-shadow: 0 0 18px rgba(89, 217, 139, 0.72);
}

.music-float-orbit i:nth-child(1) { top: 1%; left: 31%; width: 4px; height: 4px; }
.music-float-orbit i:nth-child(2) { right: 0; bottom: 28%; width: 3px; height: 3px; }
.music-float-orbit i:nth-child(3) { bottom: 2%; left: 24%; width: 2px; height: 2px; }

.music-float.playing .music-float-orbit {
  animation: music-float-orbit 18s linear infinite;
}

.music-float.playing .music-float-visual::before {
  animation: music-float-aurora 7s ease-in-out infinite alternate;
}

.music-float.playing .music-float-artwork.hero {
  animation: music-float-art-breathe 5.4s ease-in-out infinite;
}

@keyframes music-float-orbit {
  to { transform: rotate(355deg); }
}

@keyframes music-float-aurora {
  from { opacity: 0.45; transform: rotate(-12deg) scale(0.9); }
  to { opacity: 0.82; transform: rotate(8deg) scale(1.06); }
}

@keyframes music-float-art-breathe {
  0%, 100% { box-shadow: 0 28px 60px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(255, 255, 255, 0.13) inset; }
  50% { box-shadow: 0 32px 72px rgba(0, 0, 0, 0.5), 0 0 32px hsla(var(--music-art-hue), 82%, 62%, 0.16), 0 0 0 1px rgba(255, 255, 255, 0.18) inset; }
}

.music-float-now-glow {
  position: absolute;
  left: -4%;
  top: 8%;
  z-index: -1;
  width: 42%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: hsla(var(--music-art-hue), 84%, 60%, 0.28);
  filter: blur(36px);
  pointer-events: none;
}

.music-float-copy {
  grid-area: copy;
  min-width: 0;
  display: grid;
  align-self: end;
  gap: 7px;
  padding-bottom: 2px;
}

.music-float-copy > span {
  color: var(--green-2);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.music-float-copy strong,
.music-float-copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-float-copy strong {
  display: -webkit-box;
  color: #fffdf5;
  font-size: clamp(22px, 4.2cqw, 38px);
  line-height: 1.05;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.music-float-copy small {
  color: rgba(247, 241, 223, 0.5);
  font-size: 12px;
  white-space: nowrap;
}

.music-float-timeline {
  grid-area: timeline;
  display: grid;
  gap: 6px;
}

.music-float-timeline .music-dock-progress {
  height: 16px;
  padding: 5px 0;
  border-radius: 999px;
  background-clip: content-box;
}

.music-float-timeline > div:last-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: rgba(247, 241, 223, 0.38);
  font-size: 9px;
}

.music-float-timeline b {
  min-width: 0;
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-float-transport {
  grid-area: transport;
  display: grid;
  grid-template-columns: 32px 40px 58px 40px 32px 30px;
  align-items: center;
  justify-content: start;
  gap: 4px;
}

.music-float-round,
.music-float-primary {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: rgba(247, 241, 223, 0.78);
  background: rgba(255, 255, 255, 0.035);
}

.music-float-round.small {
  width: 32px;
  height: 32px;
  color: rgba(247, 241, 223, 0.38);
}

.music-float-round:hover,
.music-float-round.active {
  color: var(--green-2);
  border-color: rgba(89, 217, 139, 0.26);
  background: rgba(89, 217, 139, 0.09);
}

.music-float-primary {
  width: 58px;
  height: 58px;
  border: 0;
  color: #07150b;
  background: linear-gradient(145deg, #c0ffd5, #59d98b 62%, #2eae68);
  box-shadow: 0 14px 32px rgba(48, 198, 105, 0.28), 0 1px 0 rgba(255, 255, 255, 0.56) inset;
}

.music-float .music-dock-play.music-float-primary {
  width: 58px;
  height: 58px;
}

.music-float-primary svg { width: 23px; height: 23px; }
.music-float-round svg { width: 16px; height: 16px; }
.music-float-round.small svg { width: 13px; height: 13px; }

.music-float-queue {
  min-height: 0;
  overflow: hidden;
  display: block;
  padding: 2px 0;
}

.music-float-queue-list {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 3px 5px 3px 2px;
  mask-image: linear-gradient(to bottom, transparent 0, #000 8px, #000 calc(100% - 8px), transparent 100%);
  scrollbar-width: thin;
  scrollbar-color: rgba(89, 217, 139, 0.22) transparent;
}

.music-float-queue-track {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  border: 0;
  border-radius: 11px;
  color: var(--text);
  text-align: left;
  background: transparent;
}

.music-float-queue-track:hover {
  background: rgba(255, 255, 255, 0.045);
}

.music-float-queue-track.current {
  box-shadow: inset 3px 0 0 rgba(113, 239, 157, 0.76);
  background: linear-gradient(90deg, rgba(89, 217, 139, 0.14), rgba(89, 217, 139, 0.035));
}

.music-float-artwork.queue-art {
  width: 40px;
  height: 40px;
  border-radius: 11px;
}

.music-float-queue-track > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.music-float-queue-track strong,
.music-float-queue-track small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-float-queue-track strong { font-size: 12px; }
.music-float-queue-track small { color: rgba(247, 241, 223, 0.42); font-size: 10px; }
.music-float-queue-track > em { color: rgba(247, 241, 223, 0.25); font-size: 9px; font-style: normal; text-align: center; }

.music-float-playing-bars {
  height: 14px;
  display: inline-flex;
  align-items: end;
  justify-content: center;
  gap: 2px;
}

.music-float-playing-bars b {
  width: 2px;
  height: 50%;
  border-radius: 99px;
  background: var(--green-2);
  animation: music-float-signal 700ms ease-in-out infinite alternate;
}

.music-float-playing-bars b:nth-child(2) { height: 100%; animation-delay: -250ms; }
.music-float-playing-bars b:nth-child(3) { height: 72%; animation-delay: -460ms; }
.music-float:not(.playing) .music-float-playing-bars b { animation-play-state: paused; }

.music-float-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  color: rgba(247, 241, 223, 0.34);
}

.music-float-footer > span {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.music-float-footer > span svg { width: 12px; height: 12px; color: var(--green-2); }
.music-float-footer > span b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.music-float-footer > small { font-size: 8px; white-space: nowrap; }

.music-float-crossfade {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.music-float-crossfade > span {
  color: rgba(247, 241, 223, 0.38);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.music-float-crossfade > div {
  display: inline-grid;
  grid-template-columns: repeat(4, minmax(25px, auto));
  gap: 2px;
  padding: 2px;
  border: 1px solid rgba(113, 239, 157, 0.1);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.16);
}

.music-float-crossfade button {
  min-width: 25px;
  height: 22px;
  padding: 0 5px;
  border: 0;
  border-radius: 6px;
  color: rgba(247, 241, 223, 0.44);
  background: transparent;
  font-size: 8px;
  font-weight: 850;
}

.music-float-crossfade button:hover,
.music-float-crossfade button.active {
  color: #d8ffe4;
  background: rgba(89, 217, 139, 0.15);
  box-shadow: 0 0 0 1px rgba(113, 239, 157, 0.14) inset;
}

.music-float-resize {
  position: absolute;
  right: 3px;
  bottom: 3px;
  z-index: 8;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  display: grid;
  place-items: center;
  color: rgba(113, 239, 157, 0.34);
  background: transparent;
  cursor: nwse-resize;
  touch-action: none;
}

.music-float-resize:hover { color: var(--green-2); }
.music-float-resize svg { width: 11px; height: 11px; }

.music-float button[data-tooltip] {
  position: relative;
}

.music-float button[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 7px);
  z-index: 40;
  max-width: 150px;
  padding: 5px 7px;
  border: 1px solid rgba(113, 239, 157, 0.18);
  border-radius: 7px;
  color: rgba(247, 241, 223, 0.88);
  background: rgba(8, 13, 9, 0.94);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.42);
  font-size: 9px;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 3px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.music-float-header button[data-tooltip]::after {
  top: calc(100% + 6px);
  bottom: auto;
  transform: translate(-50%, -3px);
}

.music-float button[data-tooltip]:hover::after,
.music-float button[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

@container (max-width: 355px) {
  .music-float-expanded-body { padding-inline: 10px; }
  .music-float-transport { gap: 4px; }
  .music-float-crossfade > span { display: none; }
}

@container (max-width: 560px) {
  .music-float-stage {
    grid-template-columns: clamp(120px, 36cqw, 180px) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "visual copy"
      "visual timeline"
      "transport transport";
    column-gap: 13px;
  }

  .music-float-transport {
    justify-content: center;
    margin-top: 2px;
  }

  .music-float-copy strong { font-size: clamp(18px, 6cqw, 25px); }
  .music-float-copy small { font-size: 10px; }
}

@container (min-height: 700px) {
  .music-float-queue-track { padding-block: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .music-float,
  .activity-dock-stack,
  .music-float-orbit,
  .music-float-visual::before,
  .music-float-artwork.hero,
  .music-float-signal i,
  .music-float-playing-bars b {
    animation: none !important;
    transition: none !important;
  }

  .media-volume-popover {
    transition: none !important;
  }
}

.music-dock {
  width: 100%;
  min-height: 54px;
  box-sizing: border-box;
  padding: 8px;
  border: 1px solid rgba(89, 217, 139, 0.24);
  border-radius: 12px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 30px 30px;
  align-items: center;
  gap: 7px;
  background:
    linear-gradient(135deg, rgba(35, 163, 95, 0.16), rgba(8, 9, 8, 0.94) 66%),
    rgba(8, 9, 8, 0.94);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(16px);
}

.music-dock.has-nav {
  grid-template-columns: 24px 34px 24px minmax(0, 1fr) 30px 30px;
}

.music-dock.has-car-mode {
  grid-template-columns: 34px minmax(0, 1fr) 30px 30px 30px;
}

.music-dock.has-nav.has-car-mode {
  grid-template-columns: 24px 34px 24px minmax(0, 1fr) 30px 30px 30px;
}

.music-dock.has-share {
  grid-template-columns: 34px minmax(0, 1fr) 30px 30px 30px;
}

.music-dock.has-nav.has-share {
  grid-template-columns: 24px 34px 24px minmax(0, 1fr) 30px 30px 30px;
}

.music-dock.has-car-mode.has-share {
  grid-template-columns: 34px minmax(0, 1fr) 30px 30px 30px 30px;
}

.music-dock.has-nav.has-car-mode.has-share {
  grid-template-columns: 24px 34px 24px minmax(0, 1fr) 30px 30px 30px 30px;
}

.music-float.has-car-mode .music-float-header {
  grid-template-columns: auto auto minmax(0, 1fr) repeat(4, 28px);
}

.music-float.has-share .music-float-header {
  grid-template-columns: auto auto minmax(0, 1fr) repeat(4, 28px);
}

.music-float.has-car-mode.has-share .music-float-header {
  grid-template-columns: auto auto minmax(0, 1fr) repeat(5, 28px);
}

.music-car-mode-entry {
  color: #b8efbc;
  border-color: rgba(143, 224, 151, 0.24);
  background: rgba(97, 184, 108, 0.08);
}

.music-share-current {
  color: #b8efc5;
  border-color: rgba(143, 224, 167, 0.24);
  background: rgba(97, 184, 125, 0.08);
}

.music-dock > .music-share-current {
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  border-radius: 9px;
}

.music-dock.playing {
  border-color: rgba(89, 217, 139, 0.48);
  background:
    linear-gradient(135deg, rgba(35, 163, 95, 0.22), rgba(8, 9, 8, 0.94) 68%),
    rgba(8, 9, 8, 0.94);
}

.music-dock-step {
  width: 24px;
  height: 24px;
  border: 1px solid rgba(89, 217, 139, 0.22);
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: rgba(247, 241, 223, 0.78);
  background: rgba(255, 255, 255, 0.035);
}

.music-dock-step:hover:not(:disabled) {
  color: var(--text);
  border-color: rgba(89, 217, 139, 0.42);
  background: rgba(89, 217, 139, 0.1);
}

.music-dock-step:disabled {
  opacity: 0.32;
}

.music-dock-step svg {
  width: 13px;
  height: 13px;
}

.music-dock-play {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #0d1810;
  background: var(--green-2);
  box-shadow: 0 10px 22px rgba(35, 163, 95, 0.22);
}

.music-dock-play svg {
  width: 15px;
  height: 15px;
}

.music-dock-main {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.music-dock-head {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.music-dock-head span {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--green-2);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.music-dock-head span svg {
  width: 12px;
  height: 12px;
}

.music-dock-head strong {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  line-height: 1.1;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.music-dock-progress {
  height: 4px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.09);
  cursor: pointer;
}

.music-dock-progress span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green-2), #b8f7ce);
  transform-origin: left center;
}

.music-dock small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
}

.media-volume-control {
  --media-volume-ratio: 80%;
  position: relative;
  z-index: 8;
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
}

.media-volume-trigger {
  position: relative;
  z-index: 2;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 11px;
  display: inline-grid;
  place-items: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: color 140ms ease, border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.media-volume-trigger:hover,
.media-volume-trigger:focus-visible,
.media-volume-control.is-volume-open > .media-volume-trigger,
.media-volume-control:focus-within > .media-volume-trigger {
  color: var(--text);
  border-color: rgba(89, 217, 139, 0.36);
  background: rgba(89, 217, 139, 0.1);
  outline: 0;
}

.media-volume-trigger:active {
  transform: scale(0.94);
}

.media-volume-control.is-muted > .media-volume-trigger {
  color: rgba(247, 241, 223, 0.48);
}

.media-volume-popover {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  z-index: 12;
  box-sizing: border-box;
  width: 174px;
  min-height: 44px;
  padding: 7px 9px 7px 11px;
  border: 1px solid rgba(89, 217, 139, 0.26);
  border-radius: 15px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: center;
  gap: 8px;
  color: var(--text);
  background:
    linear-gradient(145deg, rgba(35, 163, 95, 0.13), rgba(12, 14, 12, 0.98)),
    #0c0e0c;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 5px) scale(0.97);
  transform-origin: center bottom;
  transition: opacity 140ms ease, transform 140ms ease;
}

.media-volume-control::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  width: 184px;
  height: 16px;
  transform: translateX(-50%);
}

.media-volume-control:hover > .media-volume-popover,
.media-volume-control:focus-within > .media-volume-popover,
.media-volume-control.is-volume-open > .media-volume-popover,
.media-volume-control.volume-open > .media-volume-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}

.media-volume-range {
  width: 100%;
  min-width: 0;
  height: 30px;
  margin: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
  touch-action: none;
}

.media-volume-range::-webkit-slider-runnable-track,
.media-volume-sheet input[type="range"]::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--green-2) 0 var(--media-volume-ratio, 80%),
    rgba(247, 241, 223, 0.2) var(--media-volume-ratio, 80%) 100%
  );
}

.media-volume-range::-moz-range-track,
.media-volume-sheet input[type="range"]::-moz-range-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(247, 241, 223, 0.2);
}

.media-volume-range::-moz-range-progress,
.media-volume-sheet input[type="range"]::-moz-range-progress {
  height: 5px;
  border-radius: 999px;
  background: var(--green-2);
}

.media-volume-range::-webkit-slider-thumb,
.media-volume-sheet input[type="range"]::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -6.5px;
  border: 3px solid #eaf9ed;
  border-radius: 50%;
  appearance: none;
  -webkit-appearance: none;
  background: var(--green);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.media-volume-range::-moz-range-thumb,
.media-volume-sheet input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 3px solid #eaf9ed;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.media-volume-range:focus-visible {
  outline: 2px solid rgba(89, 217, 139, 0.48);
  outline-offset: 2px;
  border-radius: 999px;
}

.media-volume-output {
  color: #dffbe7;
  font-size: 11px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.media-volume-system-hint {
  display: none;
  grid-column: 1 / -1;
  color: rgba(247, 241, 223, 0.76);
  font-size: 10px;
  line-height: 1.3;
  text-align: center;
}

.media-volume-control.is-system-volume .media-volume-range,
.media-volume-control.is-system-volume .media-volume-output {
  display: none;
}

.media-volume-control.is-system-volume .media-volume-system-hint {
  display: block;
}

.media-volume-control.is-muted .media-volume-range {
  opacity: 0.54;
}

.media-volume-control.is-expanded {
  width: 100%;
  height: 44px;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 8px;
}

.media-volume-control.is-expanded::before {
  display: none;
}

.media-volume-control.is-expanded > .media-volume-trigger {
  width: 44px;
  min-width: 44px;
  height: 44px;
}

.media-volume-control.is-expanded > .media-volume-popover {
  position: static;
  width: 100%;
  min-height: 44px;
  padding: 4px 7px 4px 10px;
  border: 0;
  opacity: 1;
  pointer-events: auto;
  transform: none;
  background: transparent;
  box-shadow: none;
}

.media-volume-sheet-backdrop {
  display: none;
}

.music-volume {
  position: relative;
  z-index: 5;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.music-volume .button {
  position: relative;
  z-index: 2;
  width: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.music-volume .button:hover,
.music-volume.volume-open .button,
.music-volume:focus-within .button {
  color: var(--text);
  border-color: rgba(89, 217, 139, 0.36);
  background: rgba(89, 217, 139, 0.1);
}

.music-volume.muted .button {
  color: rgba(247, 241, 223, 0.45);
}

.music-volume svg {
  width: 15px;
  height: 15px;
}

/* The compact floating player clips descendants by design. Keep its volume
   surface inside the card instead of letting the generic popover escape above
   the player and collide with the draggable header. */
.music-float.compact .music-float-compact-body .music-volume {
  position: static;
}

.music-float.compact .music-volume.media-volume-control,
.music-float.compact .music-volume > .media-volume-trigger {
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  border-radius: 9px;
}

.music-float.compact .music-volume svg {
  width: 14px;
  height: 14px;
}

.music-float.compact .music-volume::before {
  display: none;
}

.music-float.compact .music-volume > .media-volume-popover {
  right: 10px;
  bottom: 9px;
  left: auto;
  z-index: 20;
  width: 190px;
  max-width: calc(100% - 20px);
  min-height: 46px;
  padding: 7px 10px 7px 12px;
  border-color: rgba(113, 239, 157, 0.4);
  background:
    linear-gradient(145deg, rgba(35, 163, 95, 0.18), rgba(10, 14, 11, 0.985)),
    #0a0e0b;
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.52),
    0 0 0 1px rgba(255, 255, 255, 0.025) inset;
  transform: translateY(5px) scale(0.985);
  transform-origin: right center;
}

.music-float.compact .music-volume:hover > .media-volume-popover,
.music-float.compact .music-volume:focus-within > .media-volume-popover,
.music-float.compact .music-volume.is-volume-open > .media-volume-popover,
.music-float.compact .music-volume.volume-open > .media-volume-popover {
  transform: translateY(0) scale(1);
}

.screen-float.expanded {
  top: 10px;
  right: 10px;
  bottom: 10px;
  left: 10px;
  z-index: 131;
  width: auto;
  height: auto;
  max-height: none;
  min-height: 0;
  grid-template-rows: 46px minmax(0, 1fr);
}

.screen-float-header {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 8px 7px 12px;
  background: rgba(20, 23, 19, 0.94);
  border-bottom: 1px solid var(--line);
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.screen-float.dragging {
  user-select: none;
}

.screen-float.dragging .screen-float-header {
  cursor: grabbing;
}

.screen-float.expanded .screen-float-header {
  cursor: default;
}

.screen-float-header button {
  cursor: pointer;
}

.screen-float-header span {
  display: block;
  color: var(--green-2);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.screen-float-header .screen-float-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.screen-float-header .screen-viewer-count {
  display: inline-flex;
  color: rgba(134, 229, 160, 0.78);
  text-transform: none;
}

.screen-float-header strong {
  display: block;
  max-width: 250px;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.screen-float-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.screen-float-actions .button {
  width: 30px;
  min-height: 30px;
}

.screen-float-actions svg {
  width: 15px;
  height: 15px;
}

.screen-float-media {
  min-width: 0;
  width: 100%;
  aspect-ratio: var(--screen-aspect, 16 / 9);
  display: grid;
  place-items: center;
  background: #050505;
  overflow: visible;
}

.screen-float.expanded .screen-float-media {
  aspect-ratio: auto;
  align-self: stretch;
  min-height: 0;
  height: auto;
  overflow: hidden;
}

.screen-float-media video {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain !important;
  object-position: center;
  background: #050505;
}

.screen-float.expanded .screen-float-media video {
  width: var(--screen-fit-width, 100%) !important;
  height: var(--screen-fit-height, 100%) !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
}

.screen-float-empty {
  color: var(--muted);
  display: grid;
  place-items: center;
  gap: 8px;
  font-size: 13px;
}

.screen-float-empty svg {
  width: 28px;
  height: 28px;
  color: var(--green-2);
}

.mobile-screen-card,
.mobile-music-card {
  display: none;
}

.messages {
  grid-row: 4;
  min-height: 0;
  padding: 14px 18px 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  scroll-padding-block: 52px 18px;
}

/*
 * Critical Personal shell. The full shelf styles are loaded lazily, but the
 * first frame must already have stable geometry on a cold mobile start.
 */
.messages.personal-library-view {
  padding: 0;
  overflow-x: hidden;
  background: #0e110f;
}

.personal-loading,
.personal-state-page {
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  color: #959d93;
  text-align: center;
}

.personal-loading > span {
  width: 48px;
  height: 48px;
  margin-bottom: 4px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(210, 228, 207, 0.13);
  border-radius: 8px;
  color: #82d497;
  background: #182019;
}

.personal-loading svg {
  width: 24px;
  height: 24px;
  animation: personal-shell-spin 900ms linear infinite;
}

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

.message {
  position: relative;
  width: 100%;
  padding: 1px 8px;
  box-sizing: border-box;
  border-radius: 0;
}

.message.group-start {
  padding-top: 7px;
}

.message.day-start {
  padding-top: 0;
}

.message-row {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: end;
  gap: 8px;
}

.message.mine .message-row {
  grid-template-columns: 36px minmax(0, 1fr);
}

.message .avatar,
.message-avatar-spacer {
  width: 34px;
  height: 34px;
  align-self: end;
  border-radius: 10px;
}

.message-avatar-spacer {
  display: block;
}

.message.pending .message-content {
  opacity: 0.76;
}

.message.pending .message-time {
  color: rgba(233, 226, 210, 0.42);
}

.history-marker {
  align-self: center;
  width: 30px;
  min-height: 24px;
  padding: 0;
  border: 1px solid rgba(89, 217, 139, 0.16);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: rgba(247, 241, 223, 0.58);
  background: rgba(255, 255, 255, 0.035);
  user-select: none;
}

.history-marker[hidden] {
  display: none !important;
}

.history-marker svg {
  width: 14px;
  height: 14px;
  color: var(--green-2);
}

.history-marker.loading svg {
  animation: spin 900ms linear infinite;
}

.new-messages-jump {
  position: absolute;
  right: 22px;
  bottom: 96px;
  z-index: 8;
  min-width: 38px;
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid rgba(89, 217, 139, 0.3);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(35, 163, 95, 0.42), rgba(213, 168, 50, 0.16)),
    rgba(12, 18, 13, 0.92);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
  font-weight: 900;
  cursor: pointer;
  backdrop-filter: blur(14px);
}

.new-messages-jump svg {
  width: 15px;
  height: 15px;
}

.message:hover {
  background: transparent;
}

.message.selected {
  background: transparent;
  box-shadow: none;
}

.message.selected .message-content {
  border-color: rgba(142, 255, 180, 0.98);
  outline: 2px solid rgba(112, 243, 157, 0.86);
  outline-offset: 1px;
  box-shadow:
    inset 3px 0 0 #7ff2a7,
    0 0 0 5px rgba(89, 217, 139, 0.12),
    0 9px 26px rgba(35, 163, 95, 0.26);
  filter: brightness(1.08) saturate(1.08);
}

.message.selected .avatar {
  outline: 3px solid rgba(126, 246, 166, 0.92);
  outline-offset: 2px;
  box-shadow: 0 0 16px rgba(89, 217, 139, 0.3);
}

.message.flash {
  background: transparent;
}

.message.flash .message-content {
  outline: 2px solid transparent;
  outline-offset: 2px;
  animation: messageFlashContent 2400ms ease-out both;
}

.message.flash .avatar {
  animation: messageFlashAvatar 2400ms ease-out both;
}

.message-select-hit {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  background: transparent;
}

.message.selected .message-select-hit,
.message-selection-bar ~ .messages .message-select-hit {
  pointer-events: auto;
}

.message-content {
  position: relative;
  justify-self: start;
  width: fit-content;
  min-width: 0;
  max-width: min(82%, 880px);
  padding: 8px 11px 6px;
  border: 1px solid rgba(247, 241, 223, 0.08);
  border-radius: 8px;
  color: var(--text);
  background:
    linear-gradient(145deg, rgba(130, 99, 55, 0.18) 0%, rgba(43, 45, 40, 0.96) 46%, rgba(29, 34, 38, 0.98) 100%);
  box-shadow:
    inset 0 1px 0 rgba(247, 241, 223, 0.035),
    0 5px 16px rgba(0, 0, 0, 0.14);
}

.message.mine .message-content {
  justify-self: start;
  padding-right: 11px;
  border-color: rgba(89, 217, 139, 0.22);
  background:
    linear-gradient(135deg, rgba(89, 217, 139, 0.15), rgba(36, 48, 35, 0.06) 72%),
    rgba(25, 34, 27, 0.97);
}

.message-content.has-long-text {
  width: fit-content;
  max-width: min(74%, 680px);
}

.message-content.has-long-text > .message-meta {
  width: 100%;
  margin-top: 4px;
}

.message-content.has-collapsible-text {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  column-gap: 12px;
}

.message-content.has-collapsible-text > .message-head,
.message-content.has-collapsible-text > .message-reply-preview,
.message-content.has-collapsible-text > .message-link-previews,
.message-content.has-collapsible-text > .message-attachments,
.message-content.has-collapsible-text > .message-media-caption-row,
.message-content.has-collapsible-text > .message-details-row {
  grid-column: 1 / -1;
}

.message-content.has-collapsible-text > .message-body,
.message-body-collapsed {
  grid-column: 1 / -1;
  position: relative;
  max-height: calc(1.38em * 12);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 82%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 82%, transparent 100%);
}

.message-content.has-collapsible-text.expanded > .message-body {
  max-height: none;
  -webkit-mask-image: none;
  mask-image: none;
}

.message-long-toggle {
  grid-column: 1;
  justify-self: start;
  min-height: 24px;
  margin-top: 5px;
  padding: 0;
  border: 0;
  color: #9ceab2;
  background: transparent;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.message-long-toggle:hover,
.message-long-toggle:focus-visible {
  color: #dfffe7;
}

.message-content.has-collapsible-text > .message-meta {
  grid-column: 2;
  width: auto;
  margin: 5px 0 0;
  white-space: nowrap;
}

.message.group-middle:not(.group-start):not(.mine) .message-content {
  border-top-left-radius: 4px;
}

.message.group-middle:not(.group-end):not(.mine) .message-content {
  border-bottom-left-radius: 4px;
}

.message.mine.group-middle:not(.group-start) .message-content {
  border-top-left-radius: 4px;
}

.message.mine.group-middle:not(.group-end) .message-content {
  border-bottom-left-radius: 4px;
}

.message-content.has-code-block {
  display: inline-grid;
  grid-template-columns: minmax(0, auto);
  width: fit-content;
  max-width: min(94%, 1040px);
  padding: 6px 7px 5px;
}

.message-content.has-code-block .message-code-block {
  width: fit-content;
  max-width: 100%;
  margin: 0;
}

.message-content.has-code-block .message-meta {
  margin-top: 4px;
  padding-right: 2px;
}

.message-content.has-bare-media,
.message.mine .message-content.has-bare-media {
  width: fit-content;
  max-width: min(94%, 430px);
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--text);
  background: transparent;
  box-shadow: none;
}

.message-content.has-bare-media.has-visual-media:not(.has-video-circle),
.message-content.has-captioned-media.has-visual-media {
  width: min(430px, 94%);
}

.message-content.has-bare-media.has-visual-media.has-single-portrait-media:not(.has-video-circle) {
  width: min(300px, 94%);
}

.message-content.has-bare-media.has-visual-media.has-single-square-media:not(.has-video-circle),
.message-content.has-bare-media.has-visual-media.has-single-unknown-media:not(.has-video-circle) {
  width: min(360px, 94%);
}

.message-content.has-bare-media.has-visual-media.has-single-landscape-media:not(.has-video-circle) {
  width: min(430px, 94%);
}

.message-content.has-bare-media.has-audio-media:not(.has-visual-media):not(.has-voice-note) {
  width: min(420px, 94%);
}

.message-content.has-bare-media.has-audio-media.has-voice-note {
  width: min(280px, 94%);
}

.message.mine .message-content.has-voice-note {
  justify-self: start;
  margin-right: auto;
}

.message:not(.mine) .message-content.has-voice-note {
  justify-self: start;
  margin-right: auto;
}

.message-content.has-bare-media.has-document-media {
  width: min(430px, 94%);
}

.message-content.has-bare-media.has-video-circle {
  width: 213px;
}

.message-content.has-bare-media > .message-head {
  margin: 0 28px 5px 2px;
}

.message-content.has-bare-media > .message-attachments,
.message-content.has-captioned-media > .message-attachments,
.message-content.has-grouped-media > .message-attachments {
  width: 100%;
  margin: 0;
}

.message-content.has-bare-media.has-visual-only:not(.has-video-circle) > .message-meta {
  position: absolute;
  right: 7px;
  bottom: 7px;
  z-index: 4;
  min-height: 20px;
  margin: 0;
  padding: 3px 6px;
  border-radius: 999px;
  color: rgba(247, 241, 223, 0.86);
  background: rgba(5, 7, 5, 0.68);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(8px);
}

.message-content.has-bare-media.has-visual-only:not(.has-video-circle) .message-media-caption {
  right: 74px;
}

.message-content.has-bare-media.has-audio-media > .message-meta,
.message-content.has-bare-media.has-video-circle > .message-meta {
  margin-top: 1px;
  padding: 0 2px;
}

.message-content.has-captioned-media,
.message.mine .message-content.has-captioned-media,
.message-content.has-grouped-media,
.message.mine .message-content.has-grouped-media {
  width: min(430px, 94%);
  max-width: min(94%, 430px);
  padding: 0;
  overflow: hidden;
}

.message-content.has-captioned-media.has-voice-note,
.message.mine .message-content.has-captioned-media.has-voice-note {
  width: min(280px, 94%);
  max-width: min(280px, 94%);
}

.message-content.has-captioned-media.has-video-circle,
.message.mine .message-content.has-captioned-media.has-video-circle {
  width: min(213px, 94%);
  max-width: min(213px, 94%);
}

.message-content.has-captioned-media.has-visual-media.has-single-portrait-media {
  width: min(300px, 94%);
}

.message-content.has-captioned-media.has-visual-media.has-single-square-media,
.message-content.has-captioned-media.has-visual-media.has-single-unknown-media {
  width: min(340px, 94%);
}

.message-content.has-captioned-media.has-visual-media.has-single-landscape-media {
  width: min(430px, 94%);
}

.message-content.has-captioned-media > .message-head {
  margin: 0;
  padding: 7px 36px 5px 10px;
}

.message-media-caption-row {
  min-width: 0;
  padding: 6px 9px 5px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 2px 7px;
}

.message-media-caption-text {
  min-width: 0;
  flex: 1 1 210px;
}

.message-media-caption-text > .message-body {
  margin: 0;
}

.message-media-caption-text > .message-footer {
  margin-top: 3px;
}

.message-media-caption-row > .message-meta {
  min-height: 16px;
  margin: 0 0 0 auto;
  padding: 0;
  align-self: flex-end;
}

.message-content.has-grouped-media > .message-meta {
  min-height: 18px;
  margin: 0;
  padding: 4px 8px 5px;
}

.message-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: -1px 26px 3px 0;
  min-width: 0;
}

.message-author-role {
  display: inline-grid;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 6px;
  color: rgba(226, 226, 218, 0.62);
  background: rgba(255, 255, 255, 0.035);
}

.message-author-role.role-owner {
  border-color: rgba(213, 168, 50, 0.28);
  color: #f3d884;
  background: rgba(213, 168, 50, 0.09);
}

.message-author-role.role-admin {
  border-color: rgba(89, 217, 139, 0.24);
  color: #bff4cb;
  background: rgba(89, 217, 139, 0.08);
}

.message-author-role.role-moderator {
  border-color: rgba(105, 164, 232, 0.26);
  color: #b6d9ff;
  background: rgba(86, 143, 211, 0.09);
}

.message-author-role svg {
  width: 11px;
  height: 11px;
  stroke-width: 2.1;
}

.message-author {
  border: 0;
  padding: 0;
  color: #8ee6aa;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  font-family: inherit;
  line-height: inherit;
  text-align: left;
  transition: filter 140ms ease, opacity 140ms ease;
}

.message-author.has-display-name-signal {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.display-name-signal-marker {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: rgba(176, 232, 190, 0.82);
  background: rgba(89, 217, 139, 0.09);
}

.display-name-signal-marker.frequent {
  color: #efc86b;
  background: rgba(213, 168, 50, 0.11);
}

.display-name-signal-marker svg {
  width: 10px;
  height: 10px;
  stroke-width: 2.4;
}

.message-author:hover {
  filter: brightness(1.16);
}

.message-author:active {
  opacity: 0.82;
}

.message-author-accent-0 { color: #8ee6aa; }
.message-author-accent-1 { color: #f0c77b; }
.message-author-accent-2 { color: #7fd8df; }
.message-author-accent-3 { color: #96bdf5; }
.message-author-accent-4 { color: #f2a7b5; }
.message-author-accent-5 { color: #f0aa8c; }
.message-author-accent-6 { color: #9bd7bd; }
.message-author-accent-7 { color: #c7b0f4; }

.message-time {
  color: #969b94;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  line-height: 1.05;
}

.message-content.has-bare-media.has-visual-only:not(.has-video-circle) > .message-meta .message-time {
  color: rgba(247, 241, 223, 0.86);
}

.message-context-trigger {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 8;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  color: #e9f6df;
  background: transparent;
  white-space: nowrap;
  cursor: pointer;
}

.message.mine .message-context-trigger {
  right: auto;
  left: 0;
}

.message-context-trigger:focus-visible {
  top: -31px;
  right: -2px;
  width: auto;
  height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(139, 232, 165, 0.4);
  border-radius: 999px;
  overflow: visible;
  clip-path: none;
  outline: 2px solid rgba(139, 232, 165, 0.24);
  outline-offset: 2px;
  background: rgba(17, 25, 18, 0.98);
  box-shadow: 0 9px 24px rgba(0, 0, 0, 0.28);
  font: inherit;
  font-size: 11px;
  font-weight: 850;
}

.message.mine .message-context-trigger:focus-visible {
  right: auto;
  left: -2px;
}

.message:not(.pending) .message-content {
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    filter 140ms ease;
}

.message.context-press-pending .message-content {
  border-color: rgba(139, 232, 165, 0.34);
  filter: brightness(1.035);
}

.message.context-menu-active .message-content {
  border-color: rgba(139, 232, 165, 0.6);
  box-shadow:
    inset 0 1px 0 rgba(247, 241, 223, 0.055),
    0 0 0 2px rgba(89, 217, 139, 0.17),
    0 15px 38px rgba(0, 0, 0, 0.28),
    0 0 28px rgba(89, 217, 139, 0.08);
  filter: brightness(1.055);
}

.message-body {
  margin-top: 0;
  color: #e9e2d2;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: break-word;
  user-select: text;
  line-height: 1.38;
}

.message-markdown {
  white-space: normal;
}

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

.message-markdown > :last-child {
  margin-bottom: 0;
}

.message-markdown p,
.message-markdown ul,
.message-markdown ol,
.message-markdown blockquote,
.message-markdown table,
.message-markdown hr {
  margin: 0.48em 0;
}

.message-markdown h1,
.message-markdown h2,
.message-markdown h3,
.message-markdown h4,
.message-markdown h5,
.message-markdown h6 {
  margin: 0.68em 0 0.32em;
  color: #f4eddf;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.message-markdown h1 { font-size: 1.28em; }
.message-markdown h2 { font-size: 1.18em; }
.message-markdown h3 { font-size: 1.1em; }
.message-markdown h4,
.message-markdown h5,
.message-markdown h6 { font-size: 1em; }

.message-markdown ul,
.message-markdown ol {
  padding-left: 1.35em;
}

.message-markdown li + li {
  margin-top: 0.18em;
}

.message-markdown blockquote {
  padding: 7px 10px;
  border-left: 3px solid rgba(112, 225, 144, 0.72);
  border-radius: 0 8px 8px 0;
  color: rgba(233, 226, 210, 0.84);
  background: rgba(5, 8, 6, 0.3);
}

.message-markdown a {
  color: #dff7c6;
  text-decoration-color: rgba(135, 232, 159, 0.48);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.message-markdown a:hover {
  color: #8cffb7;
}

.message-markdown code:not(.message-code-block code) {
  padding: 2px 5px;
  border: 1px solid rgba(89, 217, 139, 0.18);
  border-radius: 6px;
  color: #baf8c7;
  background: rgba(7, 11, 8, 0.76);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
}

.message-markdown table {
  width: max-content;
  max-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  display: block;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
}

.message-markdown th,
.message-markdown td {
  min-width: 92px;
  padding: 6px 9px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  vertical-align: top;
}

.message-markdown th {
  color: #f2eddf;
  background: rgba(255, 255, 255, 0.045);
}

.message-markdown tr:last-child td,
.message-markdown tr:last-child th {
  border-bottom: 0;
}

.message-markdown tr > :last-child {
  border-right: 0;
}

.message-markdown-task-item {
  list-style: none;
}

.message-markdown-task-checkbox {
  width: 14px;
  height: 14px;
  margin: 0 5px 0 -19px;
  accent-color: #67d98d;
  vertical-align: -2px;
}

.message-markdown-spoiler {
  padding: 0 3px;
  border-radius: 4px;
  color: transparent;
  background: rgba(221, 226, 216, 0.28);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  cursor: pointer;
  transition: color 110ms ease, background-color 110ms ease;
}

.message-markdown-spoiler.revealed,
.message-markdown-spoiler:focus-visible {
  color: inherit;
  background: rgba(89, 217, 139, 0.13);
  outline: none;
}

.message-markdown-spoiler-preview {
  display: inline-block;
  padding: 0 5px;
  border-radius: 4px;
  color: rgba(229, 232, 225, 0.72);
  background: rgba(221, 226, 216, 0.12);
  font-size: 0.88em;
  font-weight: 750;
}

.message-preview-link,
.message-markdown-link-preview {
  color: rgba(215, 230, 211, 0.82);
  text-decoration: underline;
  text-decoration-color: rgba(173, 194, 170, 0.32);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.message-markdown-image-disabled,
.message-markdown-link-disabled {
  color: rgba(233, 226, 210, 0.72);
}

.message-markdown-image-disabled::before {
  content: "🖼 ";
  opacity: 0.72;
}

.message-markdown hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.message-link {
  color: #dff7c6;
  text-decoration: underline;
  text-decoration-color: rgba(135, 232, 159, 0.48);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.message-link:hover {
  color: #8cffb7;
  text-decoration-color: currentColor;
}

.message-bold {
  font-weight: 900;
  color: #f4eddf;
}

.message-italic {
  color: #eee5d6;
}

.message-strike {
  color: rgba(233, 226, 210, 0.72);
  text-decoration-color: rgba(238, 105, 99, 0.78);
  text-decoration-thickness: 2px;
}

.message-inline-code {
  padding: 2px 6px;
  border: 1px solid rgba(89, 217, 139, 0.2);
  border-radius: 6px;
  color: #baf8c7;
  background: rgba(7, 11, 8, 0.78);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
  white-space: break-spaces;
}

.message-quote {
  width: fit-content;
  max-width: min(640px, 100%);
  margin: 5px 0;
  padding: 7px 10px 7px 12px;
  border-left: 3px solid rgba(118, 232, 148, 0.78);
  border-radius: 0 8px 8px 0;
  white-space: normal;
  color: rgba(233, 226, 210, 0.86);
  background: linear-gradient(90deg, rgba(89, 217, 139, 0.1), rgba(89, 217, 139, 0.025));
}

.message-code-block {
  width: fit-content;
  min-width: min(360px, 100%);
  max-width: min(960px, 100%);
  margin: 5px 0 2px;
  border: 1px solid rgba(89, 217, 139, 0.22);
  border-radius: 10px;
  overflow: hidden;
  white-space: normal;
  background:
    linear-gradient(135deg, rgba(89, 217, 139, 0.08), rgba(255, 204, 77, 0.025)),
    rgba(8, 10, 9, 0.94);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.message-code-block figcaption {
  min-height: 34px;
  padding: 6px 7px 6px 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #95f4ad;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.025);
}

.message-code-block pre {
  margin: 0;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(137, 232, 159, 0.42) rgba(255, 255, 255, 0.04);
}

.message-code-block pre::-webkit-scrollbar {
  height: 8px;
}

.message-code-block pre::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(137, 232, 159, 0.42);
}

.message-code-block code {
  display: block;
  min-width: max-content;
  padding: 10px 12px;
  color: #e8e2d6;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre;
  tab-size: 2;
}

.code-keyword {
  color: #9decae;
  font-weight: 800;
}

.code-key {
  color: #aee7ff;
  font-weight: 800;
}

.code-operator {
  color: rgba(233, 226, 210, 0.58);
}

.code-string {
  color: #ffd77a;
}

.code-number {
  color: #9ed1ff;
}

.code-comment {
  color: rgba(233, 226, 210, 0.46);
  font-style: italic;
}

.message-link-previews {
  width: min(520px, 100%);
  margin-top: 10px;
  display: grid;
  gap: 8px;
  user-select: none;
}

.message-link-previews:has(> .link-preview.generic) {
  width: min(400px, 100%);
}

@media (min-width: 961px),
  (min-width: 821px) and (min-height: 521px),
  (min-width: 821px) and (orientation: portrait) {
  .message-content:has(> .message-link-previews) {
    width: fit-content;
    max-width: min(82%, 544px);
  }

  .message-content:has(> .message-link-previews > .link-preview.generic) {
    max-width: min(82%, 424px);
  }
}

.link-preview {
  border: 1px solid rgba(89, 217, 139, 0.18);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(89, 217, 139, 0.11), rgba(255, 204, 77, 0.045)),
    rgba(16, 19, 16, 0.92);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
}

.link-preview-card {
  width: 100%;
  min-height: 104px;
  padding: 9px;
  display: grid;
  grid-template-columns: 156px minmax(0, 1fr);
  gap: 11px;
  color: var(--text);
  text-align: left;
  background: transparent;
}

.link-preview-thumb {
  position: relative;
  min-width: 0;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 7px;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 204, 77, 0.26), transparent 34%),
    rgba(0, 0, 0, 0.48);
  text-decoration: none;
}

.link-preview-thumb-action {
  cursor: pointer;
}

.link-preview-thumb-action:hover img {
  transform: scale(1.025);
}

.link-preview-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 160ms ease;
}

.link-preview-thumb-fallback {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.link-preview-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(210, 34, 34, 0.94);
  box-shadow: 0 10px 26px rgba(210, 34, 34, 0.28);
  transform: translate(-50%, -50%);
}

.link-preview-play svg,
.link-preview-thumb-fallback svg {
  width: 18px;
  height: 18px;
}

.link-preview-info {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 4px;
}

.link-preview-provider {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #87e89f;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.link-preview-provider-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ff3b3b;
  box-shadow: 0 0 16px rgba(255, 59, 59, 0.5);
}

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

.link-preview-info strong {
  color: #f4f0e6;
  font-size: 14px;
  font-weight: 850;
  white-space: nowrap;
}

.link-preview-info small {
  color: rgba(233, 226, 210, 0.66);
  font-size: 12px;
  white-space: nowrap;
}

.link-preview-description {
  max-height: 36px;
  color: rgba(233, 226, 210, 0.48);
  font-size: 11px;
  line-height: 1.35;
}

.link-preview-actions {
  margin-top: 5px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.link-preview-inline-action,
.link-preview-external {
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #f4f0e6;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.055);
  cursor: pointer;
  transition:
    color 150ms ease,
    background 150ms ease,
    border-color 150ms ease;
}

.link-preview-inline-action {
  padding: 0 10px;
}

.link-preview-external {
  padding: 0 11px;
}

.link-preview-inline-action:hover,
.link-preview-external:hover {
  color: #8cffb7;
  border-color: rgba(89, 217, 139, 0.34);
  background: rgba(89, 217, 139, 0.09);
}

.link-preview-inline-action svg,
.link-preview-external svg {
  width: 14px;
  height: 14px;
}

.link-preview-player {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #050505;
}

.link-preview-player iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  display: block;
  background: #050505;
}

.message-link-previews:has(> .link-preview.yandex-music) {
  width: min(430px, 100%);
}

@media (min-width: 961px),
  (min-width: 821px) and (min-height: 521px),
  (min-width: 821px) and (orientation: portrait) {
  .message-content:has(> .message-link-previews > .link-preview.yandex-music) {
    max-width: min(82%, 454px);
  }
}

.link-preview.yandex-music {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-width: 0;
  border-color: rgba(255, 219, 77, 0.24);
  border-radius: 10px;
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 220, 64, 0.18), transparent 36%),
    linear-gradient(135deg, rgba(30, 31, 23, 0.97), rgba(12, 16, 13, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 14px 34px rgba(0, 0, 0, 0.3);
}

.yandex-music-preview-ambient {
  position: absolute;
  inset: -28%;
  z-index: -1;
  overflow: hidden;
  opacity: 0.14;
  pointer-events: none;
  mask-image: linear-gradient(90deg, #000, transparent 88%);
}

.yandex-music-preview-ambient img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: blur(24px) saturate(1.25);
  transform: scale(1.12);
}

.yandex-music-preview-ambient.image-error img {
  opacity: 0;
}

.yandex-music-preview-card {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: 104px;
  padding: 9px;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.yandex-music-preview-artwork {
  position: relative;
  width: 86px;
  height: 86px;
  min-width: 0;
  padding: 0;
  border: 1px solid rgba(255, 242, 180, 0.13);
  border-radius: 9px;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #fff;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 221, 68, 0.34), transparent 42%),
    #181b16;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
}

.yandex-music-preview-artwork img,
.yandex-music-player-artwork img,
.yandex-music-player-ambient img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  opacity: 0;
  transition: opacity 160ms ease, transform 180ms ease;
}

.yandex-music-preview-artwork.image-ready img,
.yandex-music-player-artwork.image-ready img,
.yandex-music-player-ambient.image-ready img {
  opacity: 1;
}

.yandex-music-preview-artwork.image-error img,
.yandex-music-player-artwork.image-error img,
.yandex-music-player-ambient.image-error img {
  opacity: 0;
}

.yandex-music-preview-artwork:hover img {
  transform: scale(1.035);
}

.yandex-music-preview-artwork:focus-visible,
.yandex-music-preview-listen:focus-visible,
.yandex-music-preview-external:focus-visible,
.yandex-music-player-tool:focus-visible {
  outline: 2px solid rgba(255, 222, 78, 0.92);
  outline-offset: 2px;
}

.yandex-music-preview-artwork-fallback {
  color: rgba(255, 228, 100, 0.86);
}

.yandex-music-preview-artwork-fallback svg {
  width: 28px;
  height: 28px;
}

.yandex-music-preview-play {
  position: absolute;
  right: 7px;
  bottom: 7px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #14120a;
  background: #ffe34f;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.38);
}

.yandex-music-preview-play svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.yandex-music-preview-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 4px;
}

.yandex-music-preview-provider {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 232, 126, 0.8);
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.055em;
  line-height: 1.2;
  text-transform: uppercase;
}

.yandex-music-preview-provider > span {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  display: inline-grid;
  place-items: center;
  color: #171108;
  background: #ffe34f;
  box-shadow: 0 4px 12px rgba(255, 212, 52, 0.14);
  font-size: 11px;
  font-weight: 950;
  text-transform: none;
}

.yandex-music-preview-copy > strong,
.yandex-music-preview-copy > small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yandex-music-preview-copy > strong {
  color: #f7f1df;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.3;
}

.yandex-music-preview-copy > small {
  color: rgba(240, 235, 217, 0.62);
  font-size: 11.5px;
  line-height: 1.35;
}

.yandex-music-preview-actions {
  min-width: 0;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.yandex-music-preview-listen,
.yandex-music-preview-external {
  min-width: 0;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(255, 226, 74, 0.16);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #f7f1df;
  background: rgba(255, 226, 74, 0.075);
  font-size: 10.5px;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}

.yandex-music-preview-listen:hover,
.yandex-music-preview-external:hover {
  color: #fff3a2;
  border-color: rgba(255, 226, 74, 0.38);
  background: rgba(255, 226, 74, 0.13);
}

.yandex-music-preview-listen svg,
.yandex-music-preview-external svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.yandex-music-preview-listen svg {
  fill: currentColor;
}

.yandex-music-player-root {
  position: fixed;
  inset: 0;
  z-index: 90;
  overflow: hidden;
  pointer-events: none;
}

.yandex-music-player-root[hidden] {
  display: none !important;
}

.yandex-music-player {
  position: absolute;
  right: max(18px, var(--app-safe-right));
  bottom: calc(var(--footer-height) + var(--app-safe-bottom) + 14px);
  width: min(430px, calc(var(--app-width, 100vw) - 36px));
  border: 1px solid rgba(255, 225, 76, 0.24);
  border-radius: 15px;
  overflow: hidden;
  display: grid;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 0, rgba(255, 220, 60, 0.16), transparent 38%),
    rgba(12, 15, 12, 0.985);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.52),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  pointer-events: auto;
  transform-origin: right bottom;
  animation: yandex-music-player-enter 180ms ease-out;
}

.yandex-music-player-root.is-detached .yandex-music-player {
  left: var(--yandex-music-player-x);
  top: var(--yandex-music-player-y);
  right: auto;
  bottom: auto;
  transform-origin: center;
}

.yandex-music-player-root.is-dragging .yandex-music-player {
  user-select: none;
  animation-play-state: paused;
  transition: none;
  border-color: rgba(255, 225, 76, 0.46);
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.62),
    0 0 38px rgba(255, 218, 52, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.yandex-music-player-ambient {
  position: absolute;
  inset: -48% -12% 36%;
  z-index: 0;
  overflow: hidden;
  opacity: 0.15;
  pointer-events: none;
  mask-image: linear-gradient(#000, transparent);
}

.yandex-music-player-ambient img {
  filter: blur(32px) saturate(1.35);
  transform: scale(1.18);
}

.yandex-music-player-header {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: 78px;
  padding: 10px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

@media (hover: hover) and (pointer: fine) {
  .yandex-music-player-header[data-yandex-music-drag-handle] {
    cursor: grab;
    touch-action: none;
  }

  .yandex-music-player-root.is-dragging .yandex-music-player-header[data-yandex-music-drag-handle] {
    cursor: grabbing;
  }
}

.yandex-music-player-artwork {
  position: relative;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(255, 241, 173, 0.13);
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: rgba(255, 228, 100, 0.86);
  background: rgba(255, 224, 68, 0.09);
}

.yandex-music-player-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.yandex-music-player-provider {
  color: rgba(255, 231, 117, 0.72);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.075em;
  line-height: 1.2;
  text-transform: uppercase;
}

.yandex-music-player-copy strong,
.yandex-music-player-copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yandex-music-player-copy strong {
  color: #f7f1df;
  font-size: 13px;
  font-weight: 900;
}

.yandex-music-player-copy small {
  color: rgba(240, 235, 217, 0.58);
  font-size: 10.5px;
}

.yandex-music-player-tools {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.yandex-music-player-tool {
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: rgba(247, 241, 223, 0.72);
  background: rgba(255, 255, 255, 0.045);
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
}

.yandex-music-player-tool:hover {
  color: #fff1a0;
  border-color: rgba(255, 226, 74, 0.3);
  background: rgba(255, 226, 74, 0.1);
}

.yandex-music-player-tool.close:hover {
  color: #ffaaa4;
  border-color: rgba(216, 93, 84, 0.36);
  background: rgba(216, 93, 84, 0.1);
}

.yandex-music-player-tool.expand {
  display: none;
}

.yandex-music-player-icon {
  font-size: 18px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}

.yandex-music-player-artwork > .yandex-music-player-icon {
  font-size: 24px;
}

.yandex-music-player-embed {
  position: relative;
  z-index: 1;
  height: 136px;
  min-height: 136px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  overflow: hidden;
  background: #080a08;
}

.yandex-music-player-embed iframe {
  position: absolute;
  inset: 0 0 auto;
  width: 100%;
  /* Preserve Yandex's full iframe layout; the parent crops after its seek bar. */
  height: 300px;
  min-height: 300px;
  border: 0;
  display: block;
  color-scheme: dark;
  background: #080a08;
}

.yandex-music-player-root.is-collapsed .yandex-music-player {
  width: min(360px, calc(var(--app-width, 100vw) - 36px));
}

.yandex-music-player-root.is-collapsed .yandex-music-player-embed {
  position: fixed;
  left: -10000px;
  top: -10000px;
  width: 1px;
  height: 1px;
  min-height: 1px;
  overflow: hidden;
  opacity: 0;
  clip-path: inset(50%);
  pointer-events: none;
}

.yandex-music-player-root.is-collapsed .yandex-music-player-tool.collapse {
  display: none;
}

.yandex-music-player-root.is-collapsed .yandex-music-player-tool.expand {
  display: grid;
}

@keyframes yandex-music-player-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .yandex-music-player,
  .yandex-music-preview-artwork img,
  .yandex-music-player-artwork img,
  .yandex-music-player-ambient img {
    animation: none !important;
    transition: none !important;
  }
}

.link-preview.generic {
  width: 100%;
  border-color: rgba(205, 174, 111, 0.18);
  border-radius: 9px;
  background:
    linear-gradient(145deg, rgba(42, 42, 40, 0.96), rgba(23, 26, 28, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 247, 224, 0.035),
    0 8px 22px rgba(0, 0, 0, 0.2);
}

.generic-link-preview-card {
  width: 100%;
  min-width: 0;
  min-height: 72px;
  padding: 10px 12px 10px 13px;
  border-left: 3px solid #b99a61;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  box-sizing: border-box;
  color: var(--text);
  text-align: left;
  text-decoration: none;
  background: rgba(7, 10, 11, 0.18);
  transition:
    border-color 150ms ease,
    background-color 150ms ease,
    box-shadow 150ms ease;
}

.generic-link-preview-card.has-thumbnail {
  min-height: 104px;
  grid-template-columns: minmax(0, 1fr) 84px;
  gap: 12px;
}

.generic-link-preview-card:hover {
  border-left-color: #dcc07e;
  background: rgba(205, 174, 111, 0.055);
}

.generic-link-preview-card:focus-visible {
  outline: 2px solid rgba(220, 192, 126, 0.88);
  outline-offset: -2px;
  border-left-color: #e4c77f;
  box-shadow: inset 0 0 0 1px rgba(220, 192, 126, 0.16);
}

.generic-link-preview-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 4px;
}

.generic-link-preview-domain,
.generic-link-preview-title,
.generic-link-preview-description {
  min-width: 0;
  overflow: hidden;
}

.generic-link-preview-domain {
  color: #d0b474;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.055em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: uppercase;
}

.generic-link-preview-title,
.generic-link-preview-description {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
}

.generic-link-preview-title {
  -webkit-line-clamp: 2;
  color: #f0ede4;
  font-size: 13.5px;
  font-weight: 850;
  line-height: 1.28;
}

.generic-link-preview-description {
  -webkit-line-clamp: 2;
  color: rgba(233, 226, 210, 0.58);
  font-size: 11.5px;
  line-height: 1.34;
}

.generic-link-preview-thumb {
  position: relative;
  width: 84px;
  height: 84px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  overflow: hidden;
  display: block;
  background: rgba(0, 0, 0, 0.26);
}

.generic-link-preview-thumb-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(220, 192, 126, 0.64);
  background:
    radial-gradient(circle at 35% 24%, rgba(205, 174, 111, 0.16), transparent 44%),
    rgba(18, 21, 22, 0.96);
  transition: opacity 150ms ease;
}

.generic-link-preview-thumb-fallback svg {
  width: 20px;
  height: 20px;
}

.generic-link-preview-thumb img {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  opacity: 0;
  transition: opacity 150ms ease;
}

.generic-link-preview-thumb.image-ready img {
  opacity: 1;
}

.generic-link-preview-thumb.image-ready .generic-link-preview-thumb-fallback {
  opacity: 0;
}

.generic-link-preview-thumb.image-error img {
  opacity: 0;
}

.link-preview-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.message-reply-preview {
  width: fit-content;
  max-width: min(480px, calc(100vw - 160px));
  margin: 1px 0 5px;
  padding: 5px 8px;
  border: 0;
  border-left: 3px solid rgba(112, 229, 153, 0.78);
  border-radius: 0 7px 7px 0;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 1px;
  text-align: left;
  color: var(--text);
  background: rgba(60, 104, 69, 0.14);
  cursor: pointer;
}

.message-reply-preview.has-media {
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 7px;
  padding: 4px 8px 4px 5px;
}

.message-reply-preview:disabled {
  cursor: default;
  opacity: 0.72;
}

.message-content:has(> .message-reply-preview),
.message-content.has-reply {
  width: fit-content;
  max-width: min(74%, 680px);
}

.message-reply-copy,
.message-reply-copy > strong,
.message-reply-summary {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-reply-copy {
  display: grid;
  gap: 1px;
}

.message-reply-copy > strong {
  color: #8cffb7;
  font-size: 12px;
  font-weight: 850;
}

.message-reply-summary {
  color: var(--muted);
  font-size: 12px;
}

.message-reply-thumbnail {
  position: relative;
  width: 36px;
  height: 36px;
  overflow: hidden;
  border: 1px solid rgba(247, 241, 223, 0.12);
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: rgba(247, 241, 223, 0.76);
  background: rgba(7, 10, 8, 0.72);
}

.message-reply-thumbnail > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.message-reply-thumbnail-placeholder,
.message-reply-thumbnail-play {
  display: grid;
  place-items: center;
}

.message-reply-thumbnail-placeholder svg {
  width: 16px;
  height: 16px;
}

.message-reply-thumbnail-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: #fff;
  background: rgba(5, 7, 5, 0.66);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.34);
}

.message-reply-thumbnail-play svg {
  width: 10px;
  height: 10px;
}

.message-reply-thumbnail-count {
  position: absolute;
  right: 2px;
  bottom: 2px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(5, 7, 5, 0.78);
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
}

.message-preview-line {
  max-width: 100%;
  white-space: nowrap;
}

.message-preview-line .kolobok-emote {
  width: 18px;
  height: 18px;
  margin: 0;
  vertical-align: -0.28em;
}

.message-deleted {
  width: fit-content;
  margin: 0;
  padding: 0;
  border: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(233, 226, 210, 0.5);
  font-size: 12.5px;
  font-style: italic;
  line-height: 1.25;
}

.message-deleted svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  opacity: 0.72;
}

.message.deleted .message-content {
  grid-template-columns: minmax(0, auto) auto;
  align-items: end;
  column-gap: 9px;
  row-gap: 3px;
  padding: 6px 9px 5px;
  border: 1px solid rgba(247, 241, 223, 0.055);
  border-radius: 8px;
  display: inline-grid;
  color: rgba(233, 226, 210, 0.5);
  background: #171a17;
  box-shadow: none;
  filter: none;
  outline: none;
}

.message.deleted .message-deleted {
  grid-column: 1;
  align-self: center;
}

.message.deleted .message-head {
  grid-column: 1 / -1;
  margin: -1px 0 0;
  opacity: 0.72;
}

.message.deleted .message-meta {
  grid-column: 2;
  align-self: end;
  min-height: 0;
  margin: 0;
  white-space: nowrap;
  transform: none;
}

.message.deleted .message-time {
  color: rgba(150, 155, 148, 0.72);
  font-size: 10.5px;
}

.message-footer {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  user-select: none;
}

.message-details-row {
  min-width: 0;
  min-height: 14px;
  margin-top: 3px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}

.message-details-row > .message-footer,
.message-details-row > .message-meta {
  min-height: 0;
  margin: 0;
}

.message-details-row > .message-meta {
  margin-left: auto;
  white-space: nowrap;
}

.message-edited {
  position: relative;
  color: rgba(233, 226, 210, 0.38);
  font-size: 9.5px;
  font-weight: 650;
  outline: none;
  cursor: help;
}

.message-edited::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  z-index: 8;
  width: max-content;
  max-width: min(220px, calc(100vw - 28px));
  padding: 5px 7px;
  border: 1px solid rgba(247, 241, 223, 0.12);
  border-radius: 6px;
  color: rgba(247, 241, 223, 0.86);
  background: rgba(13, 16, 13, 0.97);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.32);
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.message-edited:hover::after,
.message-edited:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.message-footer > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.message-footer svg {
  width: 12px;
  height: 12px;
}

.message-read-status {
  position: static;
  z-index: auto;
  min-width: 18px;
  min-height: 18px;
  border: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: rgba(233, 226, 210, 0.48);
  background: transparent;
  cursor: pointer;
  opacity: 0.78;
  user-select: none;
  transition:
    opacity 150ms ease,
    color 150ms ease;
}

.message:hover .message-read-status,
.message-read-status:focus-visible {
  opacity: 1;
}

.message-read-status.read {
  color: rgba(116, 243, 163, 0.82);
}

.message-read-status.unread {
  width: auto;
  cursor: default;
  color: rgba(233, 226, 210, 0.5);
  opacity: 0.72;
}

.message-read-status.unread:hover {
  opacity: 0.72;
}

.message-read-status .message-read-status-label {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0;
}

.message-read-status.pending {
  color: rgba(142, 234, 166, 0.76);
  cursor: default;
}

.message-read-status.pending svg {
  animation: rasta-spin 900ms linear infinite;
}

.message-read-status svg {
  width: 13px;
  height: 13px;
}

.message-read-status span {
  font-size: 10px;
  font-weight: 800;
}

.message-meta {
  min-height: 13px;
  margin-top: 3px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  color: var(--muted);
  user-select: none;
}

.message-content.inline-meta {
  display: inline-grid;
  grid-template-columns: minmax(0, auto) auto;
  align-items: end;
  column-gap: 6px;
}

.message-content.inline-meta > .message-body {
  min-width: 0;
  display: block;
}

.message-content.inline-meta > .message-meta {
  grid-column: 2;
  align-self: end;
  align-items: flex-end;
  min-height: 0;
  margin: 0;
  display: inline-flex;
  white-space: nowrap;
  transform: translateY(2px);
}

.message-content.inline-meta.has-author {
  row-gap: 2px;
}

.message-content.inline-meta.has-author > .message-head {
  grid-column: 1 / -1;
  margin: -1px 26px 0 0;
}

.message-content.inline-meta.has-author > .message-body {
  grid-column: 1;
  grid-row: 2;
}

.message-content.inline-meta.has-author > .message-meta {
  grid-column: 2;
  grid-row: 2;
}

.message-meta:empty {
  display: none;
}

.messages-date-float {
  position: sticky;
  top: 8px;
  z-index: 12;
  height: 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.messages-date-float[hidden] {
  display: none !important;
}

.messages-date-float button,
.message-day-separator {
  border: 1px solid rgba(247, 241, 223, 0.12);
  border-radius: 999px;
  color: rgba(247, 241, 223, 0.82);
  background: rgba(13, 16, 13, 0.9);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.26);
  font: inherit;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.messages-date-float button {
  min-height: 27px;
  padding: 0 11px;
  pointer-events: auto;
  transform: translateY(0);
}

.message-day-separator {
  width: fit-content;
  min-height: 25px;
  margin: 14px auto 9px;
  padding: 0 10px;
  display: block;
  color: rgba(247, 241, 223, 0.67);
  background: rgba(20, 23, 20, 0.9);
  box-shadow: none;
}

.message-day-separator:hover,
.messages-date-float button:hover {
  color: #f7f1df;
  border-color: rgba(89, 217, 139, 0.34);
  background: rgba(27, 39, 29, 0.94);
}

.message-calendar-backdrop {
  z-index: 132;
  padding: 18px;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.72);
}

.message-calendar {
  width: min(390px, calc(100vw - 28px));
  padding: 16px;
  border: 1px solid rgba(89, 217, 139, 0.24);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  color: var(--text);
  background:
    linear-gradient(145deg, rgba(46, 65, 47, 0.2), transparent 42%),
    rgba(18, 21, 18, 0.99);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.52);
}

.message-calendar > header,
.message-calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.message-calendar > header > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.message-calendar > header strong {
  font-size: 17px;
}

.message-calendar > header small,
.message-calendar-nav span {
  color: var(--muted);
  font-size: 10px;
}

.message-calendar-nav span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-align: center;
}

.message-calendar-nav span svg {
  width: 13px;
  height: 13px;
  animation: spin 900ms linear infinite;
}

.message-calendar-weekdays,
.message-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.message-calendar-weekdays span {
  padding: 3px 0;
  color: rgba(247, 241, 223, 0.42);
  text-align: center;
  font-size: 10px;
  font-weight: 800;
}

.message-calendar-day {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid transparent;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: rgba(247, 241, 223, 0.28);
  background: transparent;
  font: inherit;
  font-size: 12px;
}

.message-calendar-day.available {
  color: rgba(247, 241, 223, 0.9);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.message-calendar-day.available:hover {
  border-color: rgba(89, 217, 139, 0.32);
  background: rgba(89, 217, 139, 0.12);
}

.message-calendar-day.outside {
  opacity: 0.36;
}

.message-calendar-day.today span {
  color: var(--green-2);
  font-weight: 900;
}

.message-calendar-day.selected {
  border-color: rgba(89, 217, 139, 0.58);
  background: rgba(35, 163, 95, 0.24);
}

.message-calendar-day i {
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--green-2);
  transform: translateX(-50%);
}

.message-calendar-error {
  margin: 0;
  color: #f0a5a0;
  text-align: center;
  font-size: 11px;
}

@keyframes rasta-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.pinned-message-bar,
.message-selection-bar {
  position: absolute;
  grid-row: auto;
  top: 82px;
  right: 16px;
  z-index: 24;
  max-width: calc(100% - 32px);
  margin: 0;
  border: 1px solid rgba(89, 217, 139, 0.24);
  border-radius: 10px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  background: rgba(16, 24, 18, 0.94);
}

.pinned-message-bar {
  width: fit-content;
  min-width: min(320px, calc(100% - 32px));
  min-height: 40px;
  padding: 3px 4px 3px 5px;
  overflow: hidden;
}

.pinned-message-main {
  min-width: 0;
  flex: 1;
  max-width: 620px;
  min-height: 32px;
  border: 0;
  border-radius: 7px;
  padding: 0 6px 0 3px;
  display: grid;
  grid-template-columns: 6px 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  color: var(--text);
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.pinned-message-main:hover {
  background: rgba(255, 255, 255, 0.04);
}

.pinned-message-rail {
  width: 4px;
  height: 26px;
  display: grid;
  align-content: center;
  gap: 2px;
}

.pinned-message-rail i {
  width: 4px;
  min-height: 5px;
  border-radius: 999px;
  background: rgba(89, 217, 139, 0.28);
}

.pinned-message-rail i.active {
  min-height: 13px;
  background: rgba(89, 217, 139, 0.95);
}

.pinned-message-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: #92ffb9;
  background: rgba(89, 217, 139, 0.12);
}

.pinned-message-text {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.pinned-message-text strong,
.message-selection-bar span {
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.01em;
}

.pinned-message-text small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pinned-message-author {
  margin-left: auto;
  min-width: 0;
  max-width: 130px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pinned-message-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pinned-message-controls .button {
  width: 28px;
  min-width: 28px;
  min-height: 28px;
  border-radius: 7px;
}

.pinned-message-controls svg {
  width: 14px;
  height: 14px;
}

.message-selection-bar {
  width: fit-content;
  min-height: 48px;
  padding: 5px 6px 5px 14px;
  border-color: rgba(112, 243, 157, 0.62);
  background:
    linear-gradient(135deg, rgba(46, 132, 75, 0.34), rgba(14, 24, 17, 0.96) 68%),
    rgba(16, 24, 18, 0.98);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(112, 243, 157, 0.1),
    0 0 24px rgba(35, 163, 95, 0.12);
}

.pinned-message-bar ~ .message-selection-bar {
  top: 130px;
}

.message-selection-bar > div {
  display: flex;
  align-items: center;
  gap: 2px;
}

.message-selection-bar .message-selection-summary {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: rgba(239, 246, 237, 0.86);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.message-selection-summary strong {
  color: #8effb4;
  font-size: 17px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.message-selection-bar .button {
  width: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 9px;
}

.message-selection-bar [data-action="copy-selected-messages"],
.message-selection-bar [data-action="delete-selected-messages"] {
  font-size: 0;
}

.message-selection-bar [data-action="copy-selected-messages"] {
  color: rgba(226, 235, 224, 0.78);
}

.message-selection-bar [data-action="delete-selected-messages"] {
  border-color: transparent;
  color: rgba(255, 111, 111, 0.86);
  background: transparent;
}

.message-selection-bar [data-action="delete-selected-messages"]:hover,
.message-selection-bar [data-action="delete-selected-messages"]:focus-visible {
  color: #ff8c8c;
  background: rgba(218, 74, 74, 0.1);
}

.message-selection-bar .button svg {
  width: 16px;
  height: 16px;
}

.message-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 85;
  background: transparent;
  touch-action: none;
}

.message-menu {
  --message-menu-arrow-x: 50%;
  position: fixed;
  left: 0;
  top: 0;
  width: min(248px, calc(100vw - 20px));
  padding: 7px;
  border: 1px solid rgba(177, 219, 156, 0.19);
  border-radius: 16px;
  box-sizing: border-box;
  display: grid;
  gap: 2px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: #f3eddf;
  background:
    radial-gradient(circle at 12% 0%, rgba(89, 217, 139, 0.13), transparent 44%),
    linear-gradient(145deg, rgba(45, 49, 39, 0.995), rgba(17, 22, 18, 0.995) 68%);
  box-shadow:
    0 24px 68px rgba(0, 0, 0, 0.48),
    0 8px 24px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, -7px, 0) scale(0.972);
  transform-origin: var(--message-menu-arrow-x) top;
  contain: layout paint style;
  isolation: isolate;
  scrollbar-color: rgba(139, 232, 165, 0.32) transparent;
  scrollbar-width: thin;
  will-change: transform, opacity;
}

.message-menu[data-placement="top"] {
  transform: translate3d(0, 7px, 0) scale(0.972);
  transform-origin: var(--message-menu-arrow-x) bottom;
}

.message-menu.is-measuring {
  pointer-events: none;
}

.message-menu.is-ready {
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0) scale(1);
  transition:
    opacity 145ms cubic-bezier(0.2, 0.82, 0.25, 1),
    transform 145ms cubic-bezier(0.2, 0.82, 0.25, 1),
    visibility 0s linear;
}

.channel-menu {
  width: min(224px, calc(100vw - 20px));
}

.channel-menu .message-menu-item {
  min-height: 44px;
}

.channel-menu-notice {
  cursor: default;
  color: rgba(238, 235, 222, 0.72);
}

.channel-menu-notice:hover,
.channel-menu-notice:focus-visible {
  color: rgba(238, 235, 222, 0.82);
  background: rgba(255, 255, 255, 0.035);
}

.channel-menu-notice .message-menu-icon {
  color: rgba(238, 235, 222, 0.66);
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
}

.message-menu::after {
  content: "";
  position: absolute;
  top: 0;
  left: clamp(18px, calc(var(--message-menu-arrow-x) - 15px), calc(100% - 48px));
  z-index: 3;
  width: 30px;
  height: 2px;
  border-radius: 0 0 99px 99px;
  background: linear-gradient(90deg, transparent, rgba(139, 232, 165, 0.88), transparent);
  box-shadow: 0 0 12px rgba(89, 217, 139, 0.28);
  pointer-events: none;
}

.message-menu[data-placement="top"]::after {
  top: auto;
  bottom: 0;
  border-radius: 99px 99px 0 0;
}

.message-menu-shine {
  position: absolute;
  inset: 0 12px auto;
  z-index: -1;
  height: 42px;
  border-radius: 16px 16px 50% 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent);
  pointer-events: none;
}

.message-menu-item {
  position: relative;
  min-height: 40px;
  border: 0;
  border-radius: 11px;
  padding: 0 10px 0 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #eee8da;
  font: inherit;
  font-size: 13px;
  font-weight: 790;
  text-align: left;
  background: transparent;
  cursor: pointer;
  transition:
    color 120ms ease,
    background 120ms ease,
    transform 120ms ease;
}

.message-menu-item:hover,
.message-menu-item:focus-visible {
  outline: none;
  color: #f8fff1;
  background:
    linear-gradient(90deg, rgba(89, 217, 139, 0.13), rgba(255, 255, 255, 0.045));
}

.message-menu-item:active {
  transform: scale(0.985);
}

.message-menu-icon {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(139, 232, 165, 0.09);
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #a4e7ae;
  background: rgba(89, 217, 139, 0.075);
}

.message-menu-icon svg {
  width: 16px;
  height: 16px;
}

.message-menu-divider {
  height: 1px;
  margin: 4px 8px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
}

.message-menu-reaction-picker {
  min-width: 0;
  padding: 4px 2px 2px;
  display: grid;
  gap: 4px;
}

.message-menu-reactions,
.message-menu-reactions-more {
  min-width: 0;
  display: grid;
  align-items: center;
}

.message-menu-reactions {
  grid-template-columns: repeat(6, 30px);
  justify-content: space-between;
  gap: 4px;
}

.message-menu-reactions-more {
  grid-template-columns: repeat(5, 30px);
  justify-content: space-between;
  gap: 6px;
  padding: 5px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.075);
  animation: message-reaction-more-in 140ms cubic-bezier(0.2, 0.82, 0.25, 1);
}

.message-menu-reactions-more[hidden] {
  display: none;
}

@keyframes message-reaction-more-in {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message-menu-reaction {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--text);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  transition: transform 130ms ease, border-color 130ms ease, background 130ms ease;
}

.message-menu-reaction:hover,
.message-menu-reaction:focus-visible {
  outline: none;
  border-color: rgba(112, 238, 155, 0.38);
  background: rgba(89, 217, 139, 0.12);
  transform: translateY(-1px) scale(1.06);
}

.message-menu-reaction.selected {
  border-color: rgba(112, 238, 155, 0.5);
  background: linear-gradient(145deg, rgba(89, 217, 139, 0.24), rgba(89, 217, 139, 0.08));
  box-shadow: 0 0 14px rgba(89, 217, 139, 0.09);
}

.message-menu-reaction-more {
  color: #c8d1c4;
  border-color: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.055);
}

.message-menu-reaction-more svg {
  width: 16px;
  height: 16px;
  transition: transform 140ms ease;
}

.message-menu-reaction-more.is-expanded svg {
  transform: rotate(180deg);
}

.message-menu-reaction img.emoji {
  width: 18px;
  height: 18px;
  vertical-align: 0;
  pointer-events: none;
}

.message-menu-item.danger {
  color: #ff978d;
}

.message-menu-item.danger .message-menu-icon {
  border-color: rgba(255, 127, 116, 0.12);
  color: #ff978d;
  background: rgba(216, 93, 84, 0.09);
}

.message-menu-item.danger:hover,
.message-menu-item.danger:focus-visible {
  color: #ffd1cc;
  background: linear-gradient(90deg, rgba(216, 93, 84, 0.16), rgba(255, 255, 255, 0.035));
}

@media (prefers-reduced-motion: reduce) {
  .message:not(.pending) .message-content,
  .message-menu,
  .message-menu-item,
  .message-menu-reaction-more svg {
    transition-duration: 1ms !important;
  }

  .message-menu-reactions-more {
    animation-duration: 1ms !important;
  }
}

.kolobok-emote {
  width: 24px;
  height: 24px;
  margin: 0 1px;
  display: inline-grid;
  place-items: center;
  overflow: visible;
  line-height: 1;
  vertical-align: -0.3em;
}

.composer-inline-emote {
  width: 26px;
  height: 26px;
  margin: 0 1px;
  display: inline-grid;
  place-items: center;
  overflow: visible;
  line-height: 1;
  vertical-align: -0.34em;
}

.kolobok-emote img,
.composer-inline-emote img,
.kolobok-picker-emote {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: translate(var(--emote-normalize-x, 0), var(--emote-normalize-y, 0)) scale(var(--emote-normalize-scale, 1));
  transform-origin: center;
}

.message-body.emote-only {
  margin-top: 6px;
  line-height: 1;
}

.message-body.emote-only .kolobok-emote {
  width: 28px;
  height: 28px;
  margin: 0 1px;
}

.message-reactions {
  width: fit-content;
  max-width: 100%;
  margin-top: 5px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.message-reactions.is-empty { display: none; }

.message-reaction-chip {
  min-width: 36px;
  min-height: 26px;
  padding: 2px 7px 2px 6px;
  border: 1px solid rgba(247, 241, 223, 0.1);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: rgba(239, 235, 223, 0.75);
  background: rgba(8, 12, 9, 0.48);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  cursor: pointer;
  transition: color 130ms ease, border-color 130ms ease, background 130ms ease, transform 130ms ease;
}

.message-reaction-chip:hover,
.message-reaction-chip:focus-visible {
  outline: none;
  color: #f5fff3;
  border-color: rgba(112, 238, 155, 0.34);
  background: rgba(89, 217, 139, 0.09);
  transform: translateY(-1px);
}

.message-reaction-chip.selected {
  color: #d8ffe3;
  border-color: rgba(112, 238, 155, 0.46);
  background: linear-gradient(145deg, rgba(89, 217, 139, 0.21), rgba(89, 217, 139, 0.075));
  box-shadow: inset 0 1px 0 rgba(218, 255, 228, 0.06), 0 0 15px rgba(89, 217, 139, 0.06);
}

.message-reaction-emoji {
  display: inline-grid;
  place-items: center;
  font-size: 16px;
  line-height: 1;
}

.message-reaction-emoji img.emoji {
  width: 16px;
  height: 16px;
  vertical-align: 0;
  pointer-events: none;
}

.message-reaction-count {
  min-width: 7px;
  font-size: 10px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.message-content.inline-meta:not(.has-author) > .message-body {
  grid-column: 1;
  grid-row: 1;
}

.message-content.inline-meta:not(.has-author) > .message-meta {
  grid-column: 2;
  grid-row: 1;
}

.message-content.inline-meta:has(> .message-reactions:not(.is-empty)):not(.has-author) > .message-body {
  grid-column: 1 / -1;
  grid-row: 1;
}

.message-content.inline-meta > .message-reactions:not(.is-empty) {
  min-width: 0;
  grid-column: 1;
  grid-row: 2;
  align-self: end;
  justify-self: start;
}

.message-content.inline-meta:has(> .message-reactions:not(.is-empty)):not(.has-author) > .message-meta {
  grid-column: 2;
  grid-row: 2;
  align-self: end;
  margin: 5px 0 0;
}

.message-content.inline-meta.has-author:has(> .message-reactions:not(.is-empty)) > .message-body {
  grid-column: 1 / -1;
  grid-row: 2;
}

.message-content.inline-meta.has-author > .message-reactions:not(.is-empty) { grid-row: 3; }

.message-content.inline-meta.has-author:has(> .message-reactions:not(.is-empty)) > .message-meta {
  grid-column: 2;
  grid-row: 3;
  align-self: end;
  margin: 5px 0 0;
}

.message-content.has-bare-media.has-visual-only:not(.has-video-circle):has(> .message-reactions:not(.is-empty)) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  column-gap: 8px;
}

.message-content.has-bare-media.has-visual-only:not(.has-video-circle):has(> .message-reactions:not(.is-empty)) > .message-head,
.message-content.has-bare-media.has-visual-only:not(.has-video-circle):has(> .message-reactions:not(.is-empty)) > .personal-message-origin,
.message-content.has-bare-media.has-visual-only:not(.has-video-circle):has(> .message-reactions:not(.is-empty)) > .message-attachments {
  grid-column: 1 / -1;
}

.message-content.has-bare-media.has-visual-only:not(.has-video-circle):has(> .message-reactions:not(.is-empty)) > .message-reactions {
  grid-column: 1;
  grid-row: auto;
  margin: 5px 0 6px 7px;
}

.message-content.has-bare-media.has-visual-only:not(.has-video-circle):has(> .message-reactions:not(.is-empty)) > .message-meta {
  position: static;
  right: auto;
  bottom: auto;
  grid-column: 2;
  grid-row: auto;
  align-self: end;
  margin: 5px 7px 6px 0;
}

.emoji-only-content > .message-reactions {
  justify-self: start;
  margin-right: 0;
  margin-left: 3px;
}

.message-content.emoji-only-content,
.message.mine .message-content.emoji-only-content {
  min-width: 0;
  padding: 2px 4px;
  border: 0;
  background: none;
  box-shadow: none;
  overflow: visible;
}

.message.pending .message-content.emoji-only-content {
  opacity: 1;
}

.message-content.emoji-only-content.has-author {
  display: grid;
  gap: 2px;
}

.emoji-only-content > .message-head {
  margin: 0 6px 2px;
}

.message-body.emoji-only-body {
  width: fit-content;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3px;
  color: #f2ffef;
  background: none;
  box-shadow: none;
  filter: drop-shadow(0 5px 9px rgba(0, 0, 0, 0.22));
  line-height: 1;
  white-space: pre-wrap;
}

.message.mine .message-body.emoji-only-body {
  border: 0;
  background: none;
  box-shadow: none;
}

.emoji-only-hero .emoji-only-body {
  font-size: 39px;
}

.emoji-only-compact .emoji-only-body {
  max-width: 330px;
  font-size: 29px;
  line-height: 1.18;
}

.emoji-only-dense .emoji-only-body {
  max-width: min(430px, 78vw);
  font-size: 23px;
  line-height: 1.25;
}

.emoji-only-body img.emoji {
  width: 1em;
  height: 1em;
  margin: 0 1px;
  vertical-align: 0;
}

.emoji-only-hero .emoji-only-body .kolobok-emote {
  width: 48px;
  height: 48px;
  margin: 0 2px;
}

.emoji-only-compact .emoji-only-body .kolobok-emote {
  width: 36px;
  height: 36px;
}

.emoji-only-dense .emoji-only-body .kolobok-emote {
  width: 29px;
  height: 29px;
}

.message-body:not(.emoji-only-body) .rasta-connect-emote {
  width: 56px;
  height: 56px;
  vertical-align: -0.8em;
}

.emoji-only-hero .emoji-only-body.emote-only .rasta-connect-emote {
  width: 130px;
  height: 130px;
  margin: 0 3px;
}

.emoji-only-hero .emoji-only-body:not(.emote-only) .rasta-connect-emote {
  width: 116px;
  height: 116px;
}

.emoji-only-compact .emoji-only-body:not(.emote-only) .rasta-connect-emote {
  width: 86px;
  height: 86px;
}

.emoji-only-dense .emoji-only-body:not(.emote-only) .rasta-connect-emote {
  width: 70px;
  height: 70px;
}

.emoji-only-content > .message-meta,
.emoji-only-content > .message-details-row {
  width: fit-content;
  justify-self: end;
  margin: 3px 3px 0 auto;
  padding: 2px 7px;
  border: 1px solid rgba(247, 241, 223, 0.07);
  border-radius: 999px;
  color: rgba(233, 226, 210, 0.56);
  background: rgba(10, 14, 11, 0.72);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

.message.context-menu-active .message-content.emoji-only-content {
  border: 0;
  box-shadow: none;
  filter: none;
}

.message.context-menu-active .emoji-only-body {
  border: 0;
  box-shadow: none;
  filter:
    drop-shadow(0 0 7px rgba(118, 242, 158, 0.34))
    drop-shadow(0 6px 10px rgba(0, 0, 0, 0.24));
}

.message.selected .message-content.emoji-only-content {
  border: 0;
  outline: 0;
  background: none;
  box-shadow: none;
  filter: none;
}

.message.selected .emoji-only-body {
  filter:
    drop-shadow(0 0 8px rgba(118, 242, 158, 0.45))
    drop-shadow(0 6px 10px rgba(0, 0, 0, 0.24));
}

.message-attachments {
  width: min(430px, 100%);
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

.message.pending {
  --pending-upload-accent: #8fe2a3;
}

.message.pending[data-upload-status="error"] {
  --pending-upload-accent: #e7978e;
}

.message.pending .message-read-status.pending.error {
  color: #e7978e;
}

.message.pending .message-read-status.pending.error svg {
  animation: none;
}

.message.pending .message-content.has-bare-media.has-visual-only:not(.has-video-circle) > .message-meta {
  position: static;
  min-height: 14px;
  margin: 1px 2px 0;
  padding: 0;
  color: rgba(233, 226, 210, 0.52);
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.pending-upload-card {
  box-sizing: border-box;
  width: min(430px, 100%);
  min-width: min(250px, 100%);
  display: grid;
  gap: 7px;
  color: var(--text);
}

.pending-upload-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  overflow: hidden;
  border-radius: 9px;
  background: rgba(8, 10, 8, 0.58);
}

.pending-upload-items.count-1 {
  grid-template-columns: minmax(0, 1fr);
}

.pending-upload-item {
  min-width: 0;
  margin: 0;
}

.pending-upload-item.visual {
  position: relative;
  min-height: 132px;
  aspect-ratio: 1.25;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 32%, rgba(89, 217, 139, 0.16), transparent 36%),
    linear-gradient(145deg, rgba(27, 37, 27, 0.96), rgba(8, 10, 8, 0.98));
}

.pending-upload-item.visual img,
.pending-upload-item.visual video {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.pending-upload-items.count-1 .pending-upload-item.visual {
  aspect-ratio: 4 / 3;
  max-height: min(64dvh, 620px);
}

.pending-upload-items.count-1 .pending-upload-item.visual img,
.pending-upload-items.count-1 .pending-upload-item.visual video {
  height: 100%;
  max-height: min(64dvh, 620px);
  object-fit: contain;
}

.pending-upload-visual-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(143, 226, 163, 0.72);
}

.pending-upload-visual-placeholder svg {
  width: 32px;
  height: 32px;
}

.pending-upload-media-badge {
  position: absolute;
  z-index: 2;
  right: 8px;
  top: 8px;
  width: 27px;
  height: 27px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: rgba(247, 241, 223, 0.92);
  background: rgba(4, 6, 4, 0.66);
  backdrop-filter: blur(8px);
}

.pending-upload-media-badge svg {
  width: 14px;
  height: 14px;
}

.pending-upload-item.file,
.pending-upload-empty {
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid rgba(143, 226, 163, 0.16);
  border-radius: 10px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  background: rgba(35, 163, 95, 0.07);
}

.pending-upload-empty {
  grid-template-columns: 24px minmax(0, 1fr);
  color: var(--muted);
}

.pending-upload-file-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--pending-upload-accent);
  background: rgba(89, 217, 139, 0.1);
}

.pending-upload-file-icon svg {
  width: 19px;
  height: 19px;
}

.pending-upload-file-meta {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.pending-upload-file-meta strong,
.pending-upload-file-meta small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pending-upload-file-meta strong {
  font-size: 13px;
  font-weight: 850;
}

.pending-upload-file-meta small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.pending-upload-voice {
  box-sizing: border-box;
  width: min(280px, 100%);
  min-height: 58px;
  padding: 8px 9px;
  border: 1px solid rgba(89, 217, 139, 0.2);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  background: rgba(35, 163, 95, 0.08);
}

.pending-upload-voice-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: #102015;
  background: var(--pending-upload-accent);
}

.pending-upload-voice-icon svg {
  width: 17px;
  height: 17px;
}

.pending-upload-voice-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.pending-upload-wave {
  height: 27px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.pending-upload-wave span {
  flex: 1 1 0;
  min-width: 2px;
  max-width: 4px;
  height: calc(5px + var(--level, 0.45) * 19px);
  border-radius: 999px;
  background: rgba(197, 207, 197, 0.38);
}

.pending-upload-voice-main small {
  justify-self: end;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.pending-upload-circle {
  position: relative;
  width: 213px;
  height: 213px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--pending-upload-accent);
  background: #050505;
  box-shadow: 0 12px 34px rgba(35, 163, 95, 0.15);
}

.pending-upload-circle > video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.pending-upload-circle-state {
  position: absolute;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #102015;
  background: rgba(143, 226, 163, 0.9);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
}

.pending-upload-circle-state svg {
  width: 19px;
  height: 19px;
}

.pending-upload-state {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.pending-upload-progress {
  position: relative;
  height: 3px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(199, 208, 199, 0.16);
}

.pending-upload-progress > i {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--pending-upload-accent));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 100ms linear;
}

.pending-upload-state.processing .pending-upload-progress > i {
  background-size: 200% 100%;
  animation: pending-upload-processing 1.15s linear infinite;
}

.pending-upload-state.error .pending-upload-progress > i {
  background: #d77970;
}

.pending-upload-status-row {
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pending-upload-status-row > small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.pending-upload-state.error .pending-upload-status-row > small {
  color: #e7a19a;
}

.pending-upload-cancel,
.pending-upload-actions button {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(247, 241, 223, 0.76);
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.pending-upload-cancel {
  width: 24px;
  height: 24px;
  padding: 0;
}

.pending-upload-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.pending-upload-actions button {
  min-height: 26px;
  padding: 4px 8px;
  gap: 5px;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
}

.pending-upload-actions button:last-child {
  color: #e7a19a;
}

.pending-upload-cancel svg,
.pending-upload-actions svg {
  width: 13px;
  height: 13px;
}

.pending-upload-cancel:hover,
.pending-upload-cancel:focus-visible,
.pending-upload-actions button:hover,
.pending-upload-actions button:focus-visible {
  border-color: rgba(143, 226, 163, 0.32);
  color: #e7f9e9;
  background: rgba(89, 217, 139, 0.09);
}

@keyframes pending-upload-processing {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}

@media (max-width: 600px) {
  .pending-upload-card {
    width: min(100%, 360px);
    min-width: min(220px, 100%);
  }

  .pending-upload-items:not(.count-1) .pending-upload-item.visual {
    min-height: 112px;
  }

  .pending-upload-circle {
    width: 188px;
    height: 188px;
  }

  .pending-upload-status-row {
    min-height: 28px;
  }

  .pending-upload-cancel {
    width: 44px;
    height: 44px;
  }

  .pending-upload-actions button {
    min-height: 44px;
    padding-inline: 12px;
  }
}

.message-media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  overflow: hidden;
  border-radius: 8px;
}

.message-media-grid.count-1 {
  grid-template-columns: minmax(0, 1fr);
}

.message-media-grid.count-3 .message-media:first-child {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 9;
}

.message-media {
  position: relative;
  margin: 0;
  padding: 0;
  min-width: 0;
  aspect-ratio: 1.25;
  overflow: hidden;
  display: block;
  color: var(--text);
  font: inherit;
  background: rgba(8, 9, 8, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: zoom-in;
}

.message-media,
.message-media *,
.document-attachment,
.document-attachment * {
  -webkit-user-drag: none;
}

.message-media.photo img,
.message-media.video img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.message-media-load-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(147, 236, 163, 0.74);
  background:
    radial-gradient(circle at 50% 36%, rgba(89, 217, 139, 0.18), transparent 34%),
    linear-gradient(145deg, rgba(31, 43, 31, 0.94), rgba(10, 12, 10, 0.98));
}

.message-media-load-placeholder svg {
  width: 32px;
  height: 32px;
}

.message-media-image {
  position: relative;
  z-index: 1;
  opacity: 0;
  transition: opacity 120ms ease-out;
}

.message-media-image.is-ready {
  opacity: 1;
}

.message-media-play,
.message-media-caption {
  z-index: 2;
}

.message-media.video {
  aspect-ratio: 16 / 9;
}

.message-media.video.no-thumbnail {
  width: min(330px, 100%);
  aspect-ratio: auto;
  min-height: 92px;
  justify-self: start;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 44px;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(89, 217, 139, 0.12), rgba(213, 168, 50, 0.06)),
    rgba(16, 19, 16, 0.94);
  border-color: rgba(89, 217, 139, 0.2);
}

.message-video-placeholder,
.chat-material-video-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  gap: 8px;
  color: rgba(247, 241, 223, 0.78);
  background:
    radial-gradient(circle at 50% 32%, rgba(89, 217, 139, 0.2), transparent 34%),
    linear-gradient(145deg, rgba(31, 43, 31, 0.92), rgba(10, 12, 10, 0.96));
}

.message-media.video.no-thumbnail .message-video-placeholder {
  grid-column: 1 / 3;
  grid-template-columns: 44px minmax(0, 1fr);
  place-items: center start;
  padding: 12px;
  text-align: left;
  background: transparent;
}

.message-video-placeholder-icon,
.chat-material-video-placeholder-icon {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(147, 236, 163, 0.26);
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(89, 217, 139, 0.1);
}

.message-video-placeholder svg,
.chat-material-video-placeholder svg {
  width: 32px;
  height: 32px;
  color: rgba(147, 236, 163, 0.9);
}

.message-video-placeholder-text {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.message-video-placeholder-text strong {
  overflow: hidden;
  color: rgba(247, 241, 223, 0.94);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 900;
}

.message-video-placeholder small,
.chat-material-video-placeholder small {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
  color: rgba(247, 241, 223, 0.66);
}

.message-media-grid.count-1 .message-media.photo {
  width: 100%;
  aspect-ratio: auto;
  max-height: min(64dvh, 620px);
  background: rgba(5, 6, 5, 0.72);
}

.message-media-grid.count-1 .message-media.photo img {
  height: auto;
  max-height: min(64dvh, 620px);
  object-fit: contain;
}

.message-media-grid:not(.count-1) {
  --media-grid-row: clamp(132px, 18vw, 188px);
  grid-auto-flow: row dense;
}

.message-media-grid:not(.count-1) .message-media {
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto !important;
}

.message-media-grid.count-2 {
  grid-template-rows: var(--media-grid-row);
}

.message-media-grid.count-3 {
  grid-template-rows: clamp(154px, 21vw, 204px) clamp(118px, 14vw, 150px);
}

.message-media-grid.count-3 .message-media:first-child,
.message-media-grid.count-5 .message-media:first-child {
  grid-column: 1 / -1;
  aspect-ratio: auto !important;
}

.message-media-grid.count-4 {
  grid-template-rows: repeat(2, clamp(126px, 15vw, 162px));
}

.message-media-grid.count-5 {
  grid-template-rows: clamp(150px, 19vw, 190px) repeat(2, clamp(112px, 13vw, 142px));
}

.message-media-grid.count-6 {
  grid-template-rows: repeat(3, clamp(112px, 13vw, 142px));
}

.message-media-caption {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 7px;
  padding: 4px 7px;
  border-radius: 7px;
  overflow: hidden;
  color: rgba(247, 241, 223, 0.92);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 800;
  background: rgba(5, 6, 5, 0.62);
}

.message-media.video.no-thumbnail .message-media-caption {
  display: none;
}

.message-media-caption b,
.message-media-caption small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-media-caption b {
  min-width: 0;
}

.message-media-caption small {
  margin-left: auto;
  color: rgba(247, 241, 223, 0.72);
  font-size: 10px;
}

.message-media.video.has-thumbnail .message-media-caption {
  display: flex;
  align-items: center;
  gap: 8px;
}

.message-media-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #102015;
  background: rgba(89, 217, 139, 0.92);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.34);
  transform: translate(-50%, -50%);
}

.message-media.video.no-thumbnail .message-media-play {
  position: static;
  width: 38px;
  height: 38px;
  margin-right: 12px;
  justify-self: end;
  transform: none;
}

.message-media-play svg {
  width: 21px;
  height: 21px;
  margin-left: 2px;
}

.message-documents {
  display: grid;
  gap: 6px;
}

.message-audio-list {
  display: grid;
  gap: 6px;
}

.music-attachment {
  min-height: 64px;
  padding: 9px 10px;
  border: 1px solid rgba(89, 217, 139, 0.22);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  background:
    linear-gradient(135deg, rgba(35, 163, 95, 0.14), rgba(8, 9, 8, 0.78) 72%),
    rgba(35, 163, 95, 0.07);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.music-attachment.playing {
  border-color: rgba(89, 217, 139, 0.54);
  background:
    linear-gradient(135deg, rgba(35, 163, 95, 0.22), rgba(8, 9, 8, 0.82) 72%),
    rgba(35, 163, 95, 0.11);
}

.music-attachment:hover {
  transform: translateY(-1px);
}

.music-attachment,
.music-attachment * {
  -webkit-user-drag: none;
}

.music-attachment-play {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #102015;
  background: var(--green-2);
  box-shadow: 0 12px 26px rgba(35, 163, 95, 0.24);
}

.music-attachment-play svg {
  width: 18px;
  height: 18px;
}

.music-attachment-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.music-attachment-time-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.music-attachment-time-row > .message-meta {
  min-height: 0;
  margin: 0;
  padding: 0;
}

.music-attachment-time {
  color: var(--muted);
  font-size: 10px;
}

.music-attachment-progress {
  height: 5px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.music-attachment-progress span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green-2), #b8f7ce);
  transform-origin: left center;
}

.music-attachment-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.music-attachment-download {
  width: 30px;
  height: 30px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
}

.music-attachment-download:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.document-attachment {
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid rgba(89, 217, 139, 0.2);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 28px;
  align-items: center;
  column-gap: 10px;
  row-gap: 0;
  color: var(--text);
  text-decoration: none;
  background: rgba(35, 163, 95, 0.08);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.document-attachment:hover {
  border-color: rgba(89, 217, 139, 0.42);
  background: rgba(35, 163, 95, 0.13);
  transform: translateY(-1px);
}

.markdown-document-attachment,
.previewable-document-attachment,
.download-only-document-attachment {
  padding: 8px 9px;
}

.document-attachment.has-embedded-meta {
  padding-bottom: 6px;
  row-gap: 1px;
}

.markdown-document-open,
.document-attachment-open {
  min-width: 0;
  min-height: 40px;
  padding: 0;
  border: 0;
  grid-column: 1 / 3;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.markdown-document-open:focus-visible,
.document-attachment-open:focus-visible {
  border-radius: 9px;
  outline: 2px solid rgba(112, 225, 144, 0.72);
  outline-offset: 3px;
}

.document-attachment-footer {
  grid-column: 2 / -1;
  min-width: 0;
  min-height: 13px;
  margin: -2px 1px 0 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.document-attachment-footer > .message-meta {
  min-height: 0;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.document-attachment-icon,
.document-attachment-download {
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
}

.document-attachment-icon {
  color: #102015;
  background: var(--green-2);
}

.document-attachment-download {
  width: 28px;
  height: 28px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

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

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

.markdown-viewer-backdrop {
  z-index: 132;
  padding: 34px;
  background:
    radial-gradient(circle at 20% 10%, rgba(89, 217, 139, 0.11), transparent 34%),
    rgba(0, 0, 0, 0.82);
}

.markdown-viewer {
  position: relative;
  width: min(980px, calc(100vw - 68px));
  height: min(880px, calc(100dvh - 68px));
  margin: auto;
  border: 1px solid rgba(89, 217, 139, 0.25);
  border-radius: 20px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  color: var(--text);
  background:
    linear-gradient(145deg, rgba(30, 45, 31, 0.42), transparent 34%),
    rgba(15, 17, 14, 0.985);
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.58);
}

.markdown-viewer-header {
  min-height: 66px;
  padding: 10px 12px 10px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  background: rgba(8, 10, 8, 0.72);
}

.markdown-viewer-file-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #102015;
  background: var(--green-2);
}

.markdown-viewer-heading {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.markdown-viewer-heading strong,
.markdown-viewer-heading small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.markdown-viewer-heading strong {
  font-size: 14px;
}

.markdown-viewer-heading small {
  color: var(--muted);
  font-size: 11px;
}

.markdown-viewer-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.markdown-viewer-actions .button {
  min-height: 38px;
  text-decoration: none;
}

.markdown-viewer-mode {
  gap: 7px;
}

.markdown-viewer-performance-note {
  grid-row: 2;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(226, 197, 105, 0.12);
  color: rgba(244, 224, 166, 0.82);
  background: rgba(123, 92, 17, 0.1);
  font-size: 11px;
}

.markdown-viewer-body {
  grid-row: 2;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.document-viewer-body[data-document-viewport][data-document-zoom-enabled="true"] {
  position: relative;
  touch-action: pan-x pan-y;
  overscroll-behavior: contain;
  scroll-behavior: auto;
  scroll-padding-bottom: 72px;
}

.document-viewer-body[data-document-viewport][data-document-zoom-enabled="false"] {
  touch-action: auto;
  overscroll-behavior: auto;
}

.document-zoom-stage {
  position: relative;
  min-width: 100%;
  min-height: 100%;
}

.document-viewer-body[data-document-zoom-enabled="true"] .document-zoom-stage {
  margin-bottom: 64px;
}

[data-document-zoom-content] {
  min-width: 0;
  min-height: var(--document-zoom-min-height, 100%);
  transform: scale(var(--document-zoom-scale, 1));
  transform-origin: 0 0;
}

.document-viewer-body.is-document-zoom-ready .document-zoom-content {
  position: absolute;
  inset: 0 auto auto 0;
}

.document-viewer-body.is-interacting .document-zoom-content {
  will-change: transform;
}

.document-viewer-zoom-controls {
  position: absolute;
  z-index: 8;
  left: 50%;
  bottom: 12px;
  min-height: 44px;
  padding: 4px;
  border: 1px solid rgba(149, 222, 168, 0.22);
  border-radius: 15px;
  display: flex;
  align-items: center;
  gap: 2px;
  color: var(--text);
  background: rgba(10, 14, 11, 0.9);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(14px);
  transform: translateX(-50%);
}

.document-viewer-zoom-controls[hidden] {
  display: none;
}

.document-viewer-zoom-controls .button {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 11px;
}

.document-viewer-zoom-controls .button:disabled {
  opacity: 0.38;
}

.document-viewer-zoom-controls .document-viewer-zoom-value {
  width: auto;
  min-width: 58px;
  padding-inline: 8px;
  color: rgba(229, 243, 232, 0.86);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
}

.markdown-viewer-document,
.markdown-viewer-source {
  width: min(820px, calc(100% - 40px));
  min-height: calc(100% - 40px);
  margin: 20px auto;
  padding: clamp(20px, 4vw, 42px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  color: #eae4d7;
  background: rgba(8, 10, 8, 0.72);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
}

.markdown-viewer-source {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.5;
}

.markdown-viewer-state {
  min-height: 100%;
  padding: 32px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 9px;
  color: var(--muted);
  text-align: center;
}

.markdown-viewer-state svg {
  width: 34px;
  height: 34px;
}

.markdown-viewer-state.loading svg {
  animation: rasta-spin 900ms linear infinite;
}

.markdown-viewer-state.error svg {
  color: #ee6963;
}

.document-preview-note {
  width: min(820px, calc(100% - 40px));
  margin: 20px auto -8px;
  border: 1px solid rgba(226, 197, 105, 0.14);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.document-preview-note svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.document-preview-document {
  display: flow-root;
  font-size: 14px;
  line-height: 1.62;
}

.document-preview-document > :first-child {
  margin-top: 0;
}

.document-preview-document > :last-child {
  margin-bottom: 0;
}

.document-preview-document p {
  margin: 0 0 0.9em;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.document-preview-table-scroll {
  width: 100%;
  margin: 14px 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  overflow: auto;
  overscroll-behavior-inline: contain;
  background: rgba(3, 5, 3, 0.38);
}

/*
 * At 100% the table keeps its compact horizontal scroller. Once the whole
 * document is enlarged, the outer viewport must become the only pan surface;
 * otherwise a touch that starts on a table stalls at the nested scroll edge.
 * Keep this override after the base table rule so the logical overscroll axis
 * cannot win through a later cascade declaration on mobile browsers.
 */
.document-viewer-body.is-document-zoomed .document-preview-table-scroll {
  overflow: visible;
  overscroll-behavior-inline: auto;
}

.document-preview-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 12px;
  line-height: 1.45;
}

.document-preview-table th,
.document-preview-table td {
  min-width: 92px;
  max-width: 360px;
  padding: 9px 11px;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  vertical-align: top;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.document-preview-table th {
  color: #d5f7dd;
  background: rgba(89, 217, 139, 0.1);
  font-weight: 850;
}

.document-preview-table tr:last-child > * {
  border-bottom: 0;
}

.document-preview-table tr > *:last-child {
  border-right: 0;
}

.document-preview-sheets,
.document-preview-slides {
  width: min(880px, calc(100% - 40px));
  min-height: calc(100% - 40px);
  margin: 20px auto;
  display: grid;
  align-content: start;
  gap: 16px;
}

.document-preview-sheet,
.document-preview-slide {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background: rgba(8, 10, 8, 0.72);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.document-preview-sheet h3 {
  margin: 0 0 10px;
  color: var(--green-2);
  font-size: 13px;
}

.document-preview-sheet .document-preview-table-scroll {
  margin: 0;
}

.document-preview-slides {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.document-preview-slide {
  position: relative;
  min-height: 150px;
  padding: 22px;
}

.document-preview-slide b {
  position: absolute;
  right: 12px;
  top: 10px;
  color: rgba(153, 235, 174, 0.7);
  font-size: 11px;
}

.document-preview-slide p {
  margin: 18px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.55;
}

.document-preview-image {
  min-height: 100%;
  margin: 0;
  padding: 20px;
  display: grid;
  place-items: center;
}

.document-preview-image img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.document-viewer:has(.document-preview-pdf) {
  width: min(1220px, calc(100vw - 68px));
}

.document-viewer-body:has(.document-preview-pdf) {
  padding: 18px;
  background:
    radial-gradient(circle at 50% -12%, rgba(91, 177, 111, 0.08), transparent 34%),
    #080a08;
}

.document-preview-pdf {
  width: min(100%, 1120px);
  margin: 0 auto;
}

.document-preview-pdf-summary {
  position: sticky;
  top: 0;
  z-index: 4;
  width: max-content;
  margin: 0 0 12px auto;
  pointer-events: none;
}

.document-preview-pdf-summary span {
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(149, 222, 168, 0.18);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  color: rgba(224, 239, 226, 0.78);
  background: rgba(13, 18, 14, 0.9);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
  font-size: 11px;
  font-weight: 800;
}

.document-preview-pdf-pages {
  display: grid;
  justify-items: center;
  gap: 18px;
}

.document-preview-pdf-page {
  position: relative;
  width: 100%;
  aspect-ratio: var(--pdf-page-ratio, 0.707);
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  overflow: hidden;
  scroll-snap-align: start;
  color: #152019;
  background:
    linear-gradient(100deg, #e9e7df 20%, #f8f6ef 42%, #e9e7df 64%);
  background-size: 240% 100%;
  box-shadow:
    0 20px 54px rgba(0, 0, 0, 0.34),
    0 1px 0 rgba(255, 255, 255, 0.1);
  animation: document-pdf-page-loading 1.45s ease-in-out infinite;
}

.document-preview-pdf-page canvas {
  position: relative;
  z-index: 1;
  width: 100% !important;
  height: auto !important;
  display: block;
  opacity: 0;
  background: #fff;
  transition: opacity 150ms ease;
}

.document-preview-pdf-page.is-ready {
  animation: none;
  background: #fff;
}

.document-preview-pdf-page.is-ready canvas {
  opacity: 1;
}

.document-preview-pdf-page-number {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  min-width: 25px;
  height: 25px;
  padding: 0 7px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: rgba(235, 245, 237, 0.88);
  background: rgba(11, 15, 12, 0.72);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.24);
  font-size: 10px;
  font-weight: 850;
  opacity: 0;
  transition: opacity 150ms ease;
}

.document-preview-pdf-page.is-ready:hover .document-preview-pdf-page-number,
.document-preview-pdf-page.is-ready:focus-within .document-preview-pdf-page-number {
  opacity: 1;
}

.document-preview-pdf-page-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(38, 48, 40, 0.62);
  font-size: 12px;
  font-weight: 750;
}

.document-preview-pdf-page.is-ready .document-preview-pdf-page-loading {
  display: none;
}

.document-preview-pdf-page.is-error {
  animation: none;
  background: #171b17;
}

.document-preview-pdf-page.is-error .document-preview-pdf-page-loading {
  color: rgba(240, 174, 168, 0.86);
}

.document-preview-pdf-limit {
  margin: 16px auto 4px;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
}

@keyframes document-pdf-page-loading {
  0%,
  100% {
    background-position: 110% 0;
  }
  50% {
    background-position: -10% 0;
  }
}

.document-attachment-meta strong {
  font-size: 13px;
  font-weight: 850;
}

.document-attachment-meta small {
  color: var(--muted);
  font-size: 11px;
}

.attachment-viewer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  padding: 0;
  display: block;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 14%, rgba(89, 217, 139, 0.14), transparent 30%),
    radial-gradient(circle at 82% 76%, rgba(225, 196, 91, 0.08), transparent 32%),
    rgba(0, 0, 0, 0.88);
  backdrop-filter: none;
}

.attachment-viewer-shell {
  position: relative;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  min-width: 0;
  min-height: 0;
  display: block;
}

.attachment-viewer-top {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  left: max(18px, env(safe-area-inset-left));
  right: max(18px, env(safe-area-inset-right));
  z-index: 6;
  width: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: rgba(247, 241, 223, 0.9);
}

.attachment-viewer-top span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 850;
}

.attachment-viewer-title,
.attachment-viewer-actions {
  pointer-events: auto;
}

.attachment-viewer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(247, 241, 223, 0.18);
  border-radius: 16px;
  background: rgba(10, 12, 10, 0.72);
  box-shadow:
    0 18px 52px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(89, 217, 139, 0.08);
  backdrop-filter: blur(18px);
}

.attachment-viewer-actions-scroll {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.attachment-viewer-close {
  flex: 0 0 auto;
}

.attachment-viewer-actions .button.icon {
  width: 42px;
  min-height: 42px;
  border-radius: 12px;
  color: rgba(247, 241, 223, 0.95);
  border-color: rgba(247, 241, 223, 0.14);
  background: rgba(247, 241, 223, 0.08);
}

.attachment-viewer-actions .button.icon:hover {
  color: #f7f1df;
  border-color: rgba(89, 217, 139, 0.42);
  background: rgba(89, 217, 139, 0.2);
}

.attachment-viewer-title {
  max-width: calc(100% - 120px);
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 2px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(10, 12, 10, 0.58);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
}

.attachment-viewer-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-height: none;
  padding: 0;
  display: grid;
  place-items: center;
  box-sizing: border-box;
}

.attachment-viewer-carousel {
  --attachment-carousel-x: 0px;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  contain: layout;
  touch-action: none;
}

.attachment-viewer-track {
  width: 300%;
  height: 100%;
  margin-left: -100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: stretch;
  transform: none;
  transition: none;
}

.attachment-viewer-carousel.is-dragging .attachment-viewer-track,
.attachment-viewer-carousel.is-settling .attachment-viewer-track {
  transform: translateX(var(--attachment-carousel-x));
  will-change: transform;
}

.attachment-viewer-carousel.is-dragging .attachment-viewer-track {
  transition: none;
}

.attachment-viewer-carousel.is-settling .attachment-viewer-track {
  transition: transform 220ms cubic-bezier(0.22, 0.72, 0.2, 1);
}

.attachment-viewer-slide {
  position: relative;
  flex: 0 0 33.333333%;
  width: 33.333333%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  contain: layout;
}

.attachment-viewer-slide:not(.is-current) {
  pointer-events: none;
}

.attachment-viewer-slide > .attachment-viewer-frame {
  width: 100%;
  height: 100%;
}

.attachment-viewer-slide-preview {
  position: relative;
  max-width: calc(100vw - 64px);
  max-height: calc(100dvh - 64px);
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background:
    radial-gradient(circle at 22% 16%, rgba(89, 217, 139, 0.1), transparent 38%),
    #060706;
  box-shadow: 0 22px 90px rgba(0, 0, 0, 0.42);
  pointer-events: none;
}

.attachment-viewer-slide-preview.is-video {
  border: 1px solid rgba(247, 241, 223, 0.1);
  border-radius: 14px;
}

.attachment-viewer-slide-preview-image {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: none;
  max-height: none;
  display: block;
  object-fit: contain;
  background: #060706;
  opacity: 0;
}

.attachment-viewer-slide-preview-image.is-ready {
  opacity: 1;
}

.attachment-viewer-slide-preview-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(247, 241, 223, 0.28);
}

.attachment-viewer-slide-preview-fallback svg {
  width: 48px;
  height: 48px;
}

.attachment-viewer-visual-handoff {
  position: fixed;
  z-index: 1;
  max-width: none;
  max-height: none;
  margin: 0;
  overflow: hidden;
  contain: layout paint style;
  pointer-events: none;
  user-select: none;
  transition: none;
}

.attachment-viewer-visual-handoff > img,
.attachment-viewer-visual-handoff > .attachment-viewer-slide-preview-fallback {
  pointer-events: none;
  transition: none;
}

.attachment-viewer-visual-handoff > img {
  display: block;
}

.attachment-viewer-visual-handoff > .attachment-viewer-slide-preview-fallback {
  display: grid;
  place-items: center;
}

.attachment-viewer-frame {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: none;
  max-height: none;
  display: grid;
  place-items: center;
  overflow: visible;
  transform: translate(
    var(--attachment-swipe-x, 0px),
    var(--attachment-dismiss-y, 0px)
  ) scale(var(--attachment-dismiss-scale, 1));
  transition: transform 180ms cubic-bezier(0.2, 0.76, 0.26, 1);
}

.attachment-viewer-image-preview,
.attachment-viewer-image,
.attachment-viewer-image-fallback,
.attachment-viewer-image-error {
  grid-area: 1 / 1;
}

.attachment-viewer-image-fallback {
  z-index: 0;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: rgba(247, 241, 223, 0.3);
  background:
    radial-gradient(circle at center, rgba(89, 217, 139, 0.12), transparent 38%),
    #080a08;
}

.attachment-viewer-image-loading {
  display: grid;
  justify-items: center;
  gap: 10px;
  color: rgba(247, 241, 223, 0.68);
  opacity: 0;
  animation: attachment-viewer-loading-appear 1ms linear 150ms forwards;
}

.attachment-viewer-image-loading svg {
  width: 34px;
  height: 34px;
  color: var(--accent-soft, #a7e8b0);
  animation: attachment-viewer-loading-spin 900ms linear infinite;
}

.attachment-viewer-image-loading small {
  font-size: 12px;
  font-weight: 650;
}

@keyframes attachment-viewer-loading-appear {
  to { opacity: 1; }
}

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

.attachment-viewer-stage.swiping .attachment-viewer-frame,
.attachment-viewer-stage.dismissing .attachment-viewer-frame {
  transition: none;
}

.attachment-viewer-backdrop {
  opacity: var(--attachment-dismiss-opacity, 1);
  transition: opacity 180ms ease;
}

.attachment-viewer-backdrop.dismissing {
  transition: none;
}

.attachment-viewer-frame.is-zoomable {
  cursor: zoom-in;
  touch-action: none;
  user-select: none;
}

.attachment-viewer-frame.is-zoomable.zoomed {
  cursor: grab;
}

.attachment-viewer-frame.is-zoomable.dragging {
  cursor: grabbing;
}

.attachment-viewer-image,
.attachment-viewer-image-preview,
.attachment-viewer-video {
  max-width: calc(100vw - 64px);
  max-height: calc(100dvh - 64px);
  border-radius: 4px;
  display: block;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.38);
  box-shadow: 0 22px 90px rgba(0, 0, 0, 0.48);
}

.attachment-viewer-image-preview {
  z-index: 1;
  opacity: 0;
  filter: none;
  visibility: hidden;
  transition: none;
}

.attachment-viewer-image-preview.is-ready {
  opacity: 1;
  visibility: visible;
}

.attachment-viewer-frame.preview-error .attachment-viewer-image-preview {
  opacity: 0;
  visibility: hidden;
}

.attachment-viewer-image {
  z-index: 2;
  opacity: 0;
  visibility: hidden;
}

.attachment-viewer-image.is-ready {
  opacity: 1;
  visibility: visible;
}

.attachment-viewer-frame.image-ready .attachment-viewer-image-preview {
  display: none;
}

.attachment-viewer-frame.image-ready .attachment-viewer-image-fallback {
  display: none;
}

.attachment-viewer-image-error {
  z-index: 3;
  align-self: end;
  justify-self: center;
  display: none;
  align-items: center;
  gap: 8px;
  max-width: min(420px, calc(100vw - 32px));
  margin: 0 16px max(18px, var(--app-safe-bottom, 0px));
  padding: 8px 10px 8px 14px;
  border: 1px solid rgba(236, 130, 119, 0.32);
  border-radius: 14px;
  color: rgba(247, 241, 223, 0.82);
  background: rgba(20, 15, 14, 0.9);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(14px);
}

.attachment-viewer-frame.image-error .attachment-viewer-image-error {
  display: flex;
}

.attachment-viewer-frame.image-error .attachment-viewer-image-loading {
  display: none;
}

.attachment-viewer-frame.image-error .attachment-viewer-image-loading svg {
  animation-play-state: paused;
}

.attachment-viewer-image {
  transform-origin: center;
  transform: translate3d(var(--attachment-x, 0), var(--attachment-y, 0), 0) scale(var(--attachment-scale, 1));
  transition: transform 210ms cubic-bezier(0.2, 0.76, 0.26, 1);
}

.attachment-viewer-frame.is-zoomable.zoomed .attachment-viewer-image,
.attachment-viewer-frame.is-zoomable.interacting .attachment-viewer-image,
.attachment-viewer-frame.is-zoomable.settling .attachment-viewer-image {
  will-change: transform;
}

.attachment-viewer-frame.interacting .attachment-viewer-image,
.attachment-viewer-frame.dragging .attachment-viewer-image {
  transition: none;
}

/* Freeze decorative work behind the fullscreen viewer. Audio keeps playing;
   only off-screen animation/compositing is suspended while the photo is open. */
.app-attachment-viewer-open #app *,
.app-attachment-viewer-open #app *::before,
.app-attachment-viewer-open #app *::after,
.app-attachment-viewer-open #chat-materials-root *,
.app-attachment-viewer-open #chat-materials-root *::before,
.app-attachment-viewer-open #chat-materials-root *::after,
.app-attachment-viewer-open #screen-float-root *,
.app-attachment-viewer-open #screen-float-root *::before,
.app-attachment-viewer-open #screen-float-root *::after {
  animation-play-state: paused !important;
}

.attachment-viewer-video {
  width: min(calc(100vw - 64px), 1280px);
}

/* Rasta video player ------------------------------------------------------ */

.rasta-video-player {
  position: relative;
  min-width: 1px;
  min-height: 1px;
  max-width: calc(100vw - 64px);
  max-height: calc(100dvh - 64px);
  aspect-ratio: var(--video-aspect, 16 / 9);
  overflow: visible;
  isolation: isolate;
  contain: layout style;
  color: #f7f1df;
  border: 1px solid rgba(247, 241, 223, 0.13);
  border-radius: 14px;
  background:
    radial-gradient(circle at 18% 14%, rgba(89, 217, 139, 0.12), transparent 36%),
    #060806;
  box-shadow:
    0 28px 100px rgba(0, 0, 0, 0.58),
    0 0 0 1px rgba(89, 217, 139, 0.05);
  transform: translateZ(0);
  backface-visibility: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.rasta-video-surface,
.rasta-video-mount,
.rasta-video-poster,
.rasta-video-poster-fallback,
.rasta-video-shade,
.rasta-video-loading,
.rasta-video-error {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.rasta-video-surface {
  overflow: hidden;
  border-radius: inherit;
  background: #060706;
  touch-action: none;
}

.rasta-video-poster,
.rasta-video-poster-fallback,
.rasta-video-player .attachment-viewer-video {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: none;
  max-height: none;
  border: 0;
  border-radius: inherit;
  object-fit: contain;
  background: #060706;
  box-shadow: none;
  backface-visibility: hidden;
}

.rasta-video-poster,
.rasta-video-poster-fallback {
  z-index: 1;
  opacity: 1;
  transition: opacity 150ms ease;
}

.rasta-video-poster {
  filter: saturate(0.98) contrast(1.01);
}

.rasta-video-poster-fallback {
  display: grid;
  place-items: center;
  color: rgba(247, 241, 223, 0.3);
  background:
    radial-gradient(circle at center, rgba(89, 217, 139, 0.12), transparent 38%),
    #080a08;
}

.rasta-video-poster-fallback svg {
  width: 52px;
  height: 52px;
}

.rasta-video-mount {
  z-index: 2;
  pointer-events: none;
}

.rasta-video-player .attachment-viewer-video {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease;
}

.rasta-video-player.is-frame-ready .attachment-viewer-video {
  opacity: 1;
}

.rasta-video-player.is-frame-ready .rasta-video-poster,
.rasta-video-player.is-frame-ready .rasta-video-poster-fallback {
  opacity: 0;
}

.rasta-video-shade {
  z-index: 3;
  pointer-events: none;
  opacity: 1;
  background:
    linear-gradient(180deg, rgba(3, 5, 3, 0.12) 0%, transparent 24%),
    linear-gradient(0deg, rgba(2, 4, 2, 0.86) 0%, rgba(2, 4, 2, 0.3) 18%, transparent 42%);
  transition: opacity 180ms ease;
}

.rasta-video-player.controls-hidden .rasta-video-shade {
  opacity: 0.18;
}

.video-icon-pause,
.video-icon-replay,
.video-icon-low,
.video-icon-muted,
.video-icon-compress {
  display: none;
}

.rasta-video-player.is-playing .video-icon-play,
.rasta-video-player.is-ended .video-icon-play,
.rasta-video-player.is-ended .video-icon-pause {
  display: none;
}

.rasta-video-player.is-playing .video-icon-pause,
.rasta-video-player.is-ended .video-icon-replay,
.rasta-video-player.is-low-volume .video-icon-low,
.rasta-video-player.is-muted .video-icon-muted,
.rasta-video-player.is-fullscreen .video-icon-compress {
  display: inline-grid;
}

.rasta-video-player.is-low-volume .video-icon-volume,
.rasta-video-player.is-muted .video-icon-volume,
.rasta-video-player.is-muted .video-icon-low,
.rasta-video-player.is-fullscreen .video-icon-expand {
  display: none;
}

.rasta-video-loading {
  z-index: 7;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.rasta-video-player.is-buffering .rasta-video-loading {
  opacity: 1;
}

.rasta-video-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(247, 241, 223, 0.2);
  border-top-color: #59d98b;
  border-radius: 50%;
  background: rgba(6, 9, 6, 0.52);
  box-shadow: 0 0 0 10px rgba(6, 9, 6, 0.34);
  animation: rastaVideoSpin 720ms linear infinite;
}

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

.rasta-video-controls {
  position: absolute;
  right: auto;
  bottom: 16px;
  left: 50%;
  z-index: 8;
  width: min(620px, calc(100% - 28px));
  padding: 10px 12px 9px;
  box-sizing: border-box;
  border: 1px solid rgba(247, 241, 223, 0.14);
  border-radius: 16px;
  color: #f7f1df;
  background:
    linear-gradient(135deg, rgba(89, 217, 139, 0.08), transparent 46%),
    rgba(9, 12, 9, 0.76);
  box-shadow:
    0 16px 44px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px) saturate(1.08);
  opacity: 1;
  transform: translate3d(-50%, 0, 0);
  transition: opacity 170ms ease, transform 170ms ease;
}

.rasta-video-player.controls-hidden .rasta-video-controls {
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-50%, 10px, 0);
}

.rasta-video-player:not(.is-playing) .rasta-video-controls,
.rasta-video-player.is-ended .rasta-video-controls {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(-50%, 0, 0);
}

.rasta-video-center-control {
  display: none;
}

.rasta-video-timeline {
  position: relative;
  height: 18px;
  display: flex;
  align-items: center;
}

.rasta-video-player.is-deferred .rasta-video-timeline {
  opacity: 0.48;
  pointer-events: none;
}

.rasta-video-track {
  position: absolute;
  right: 0;
  left: 0;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(247, 241, 223, 0.18);
  transition: height 120ms ease;
}

.rasta-video-timeline:hover .rasta-video-track,
.rasta-video-timeline:focus-within .rasta-video-track {
  height: 6px;
}

.rasta-video-buffered,
.rasta-video-played {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  transform-origin: left center;
}

.rasta-video-buffered {
  background: rgba(247, 241, 223, 0.36);
  transform: scaleX(var(--video-buffered, 0));
}

.rasta-video-played {
  background: linear-gradient(90deg, #36bd73, #7be6a2);
  box-shadow: 0 0 12px rgba(89, 217, 139, 0.42);
  transform: scaleX(var(--video-played, 0));
}

.rasta-video-seek,
.rasta-video-volume-range:not(.media-volume-range) {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 18px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}

.rasta-video-seek::-webkit-slider-runnable-track,
.rasta-video-volume-range:not(.media-volume-range)::-webkit-slider-runnable-track {
  height: 100%;
  background: transparent;
}

.rasta-video-seek::-moz-range-track,
.rasta-video-volume-range:not(.media-volume-range)::-moz-range-track {
  height: 100%;
  background: transparent;
}

.rasta-video-seek::-webkit-slider-thumb,
.rasta-video-volume-range:not(.media-volume-range)::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  margin-top: 2px;
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid rgba(6, 10, 7, 0.72);
  border-radius: 50%;
  background: #8aefad;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.34);
  opacity: 0;
  transition: opacity 120ms ease, transform 120ms ease;
}

.rasta-video-seek::-moz-range-thumb,
.rasta-video-volume-range:not(.media-volume-range)::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: 2px solid rgba(6, 10, 7, 0.72);
  border-radius: 50%;
  background: #8aefad;
  opacity: 0;
}

.rasta-video-timeline:hover .rasta-video-seek::-webkit-slider-thumb,
.rasta-video-seek:focus-visible::-webkit-slider-thumb,
.rasta-video-volume-range:not(.media-volume-range)::-webkit-slider-thumb {
  opacity: 1;
}

.rasta-video-toolbar {
  min-width: 0;
  height: 34px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.rasta-video-button {
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  color: rgba(247, 241, 223, 0.9);
  background: transparent;
  cursor: pointer;
  transition: color 130ms ease, background 130ms ease, border-color 130ms ease, transform 130ms ease;
}

.rasta-video-button:hover,
.rasta-video-button:focus-visible {
  color: #fffef5;
  border-color: rgba(89, 217, 139, 0.28);
  background: rgba(89, 217, 139, 0.15);
  outline: none;
}

.rasta-video-button:active {
  transform: scale(0.92);
}

.rasta-video-button svg {
  width: 18px;
  height: 18px;
}

.rasta-video-time {
  min-width: 84px;
  margin-left: 2px;
  color: rgba(247, 241, 223, 0.76);
  font-size: 11px;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.rasta-video-volume {
  display: flex;
  align-items: center;
}

.rasta-video-volume-range:not(.media-volume-range) {
  width: 72px;
  height: 20px;
  background:
    linear-gradient(90deg, rgba(89, 217, 139, 0.8), rgba(89, 217, 139, 0.8)) 0 50% / var(--video-volume-percent, 100%) 3px no-repeat,
    linear-gradient(90deg, rgba(247, 241, 223, 0.18), rgba(247, 241, 223, 0.18)) 0 50% / 100% 3px no-repeat;
}

.rasta-video-toolbar-spacer {
  min-width: 8px;
  flex: 1;
}

.rasta-video-button.rate {
  width: auto;
  min-width: 38px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 850;
}

.rasta-video-speed {
  position: relative;
}

.rasta-video-speed-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  width: 92px;
  z-index: 20;
  padding: 6px;
  border: 1px solid rgba(247, 241, 223, 0.14);
  border-radius: 14px;
  display: grid;
  gap: 2px;
  background: rgba(8, 11, 8, 0.94);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(0, 8px, 0) scale(0.97);
  transform-origin: right bottom;
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
}

.rasta-video-player.is-speed-open .rasta-video-speed-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
}

.rasta-video-more {
  display: none;
}

.rasta-video-speed-menu button {
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  color: rgba(247, 241, 223, 0.78);
  background: transparent;
  font: inherit;
  font-size: 11px;
  font-weight: 760;
  text-align: left;
  cursor: pointer;
}

.rasta-video-speed-menu button:hover,
.rasta-video-speed-menu button.active {
  color: #eaffe9;
  background: rgba(89, 217, 139, 0.16);
}

.rasta-video-button.pip {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 130ms ease, color 130ms ease, background 130ms ease, border-color 130ms ease;
}

.rasta-video-player.can-pip .rasta-video-button.pip {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.rasta-video-player.is-pip .rasta-video-button.pip {
  color: #a7f2bd;
  background: rgba(89, 217, 139, 0.18);
}

.rasta-video-button.fullscreen {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.rasta-video-player.can-fullscreen .rasta-video-button.fullscreen {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.rasta-video-seek-feedback {
  position: absolute;
  top: 50%;
  z-index: 7;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(247, 241, 223, 0.15);
  border-radius: 20px;
  display: grid;
  place-items: center;
  color: #eaffe9;
  background: rgba(7, 10, 7, 0.72);
  backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, -50%, 0) scale(0.86);
}

.rasta-video-seek-feedback svg {
  width: 25px;
  height: 25px;
}

.rasta-video-seek-feedback span {
  position: absolute;
  font-size: 9px;
  font-weight: 900;
}

.rasta-video-seek-feedback.seek-back { left: 18%; }
.rasta-video-seek-feedback.seek-forward { right: 18%; }
.rasta-video-player[data-seek-direction="back"].show-seek-feedback .seek-back,
.rasta-video-player[data-seek-direction="forward"].show-seek-feedback .seek-forward {
  animation: rastaVideoSeekFeedback 500ms ease both;
}

@keyframes rastaVideoSeekFeedback {
  0% { opacity: 0; transform: translate3d(0, -50%, 0) scale(0.78); }
  28% { opacity: 1; transform: translate3d(0, -50%, 0) scale(1); }
  100% { opacity: 0; transform: translate3d(0, -50%, 0) scale(1.04); }
}

.rasta-video-error {
  z-index: 10;
  padding: 24px;
  box-sizing: border-box;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  color: #f7f1df;
  background: rgba(7, 9, 7, 0.72);
  backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  text-align: center;
  transition: opacity 140ms ease, visibility 140ms ease;
}

.rasta-video-player.has-error .rasta-video-error {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.rasta-video-error > svg {
  width: 30px;
  height: 30px;
  color: #e6c75e;
}

.rasta-video-error strong {
  font-size: 13px;
}

.rasta-video-error button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(89, 217, 139, 0.3);
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #eaffe9;
  background: rgba(89, 217, 139, 0.14);
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.rasta-video-error button svg {
  width: 15px;
  height: 15px;
}

.attachment-viewer-top,
.attachment-viewer-nav {
  transition: opacity 170ms ease, transform 170ms ease;
}

.attachment-viewer-backdrop.video-ui-hidden .attachment-viewer-top,
.attachment-viewer-backdrop.video-ui-hidden .attachment-viewer-nav {
  opacity: 0;
  pointer-events: none;
}

.rasta-video-player:fullscreen,
.rasta-video-player.is-fullscreen {
  width: 100vw !important;
  height: 100vh !important;
  max-width: none;
  max-height: none;
  border: 0;
  border-radius: 0;
}

.rasta-video-player:fullscreen .attachment-viewer-video,
.rasta-video-player:fullscreen .rasta-video-poster,
.rasta-video-player:fullscreen .rasta-video-poster-fallback,
.rasta-video-player.is-fullscreen .attachment-viewer-video,
.rasta-video-player.is-fullscreen .rasta-video-poster,
.rasta-video-player.is-fullscreen .rasta-video-poster-fallback {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
}

.rasta-video-player:fullscreen .rasta-video-controls,
.rasta-video-player.is-fullscreen .rasta-video-controls {
  bottom: max(18px, env(safe-area-inset-bottom));
  width: min(620px, calc(100% - 32px));
}

@media (prefers-reduced-motion: reduce) {
  .attachment-viewer-image-loading svg {
    animation-duration: 1.8s;
  }

  .attachment-viewer-carousel.is-settling .attachment-viewer-track {
    transition-duration: 80ms;
  }

  .attachment-viewer-image,
  .attachment-viewer-image-preview {
    transition-duration: 80ms;
  }

  .rasta-video-player *,
  .rasta-video-player *::before,
  .rasta-video-player *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}

.attachment-viewer-title small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.attachment-viewer-title small::before {
  content: "\00b7";
  margin: 0 8px 0 6px;
  color: rgba(247, 241, 223, 0.38);
}

.attachment-viewer-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 46px;
  min-height: 62px;
  border: 1px solid transparent;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: rgba(197, 207, 197, 0.62);
  background: transparent;
  box-shadow: none;
  transform: translateY(-50%);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
  backdrop-filter: none;
}

.attachment-viewer-nav:hover,
.attachment-viewer-nav:focus-visible {
  color: rgba(247, 241, 223, 0.96);
  border-color: rgba(89, 217, 139, 0.42);
  background: rgba(35, 163, 95, 0.32);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
  transform: translateY(-50%) scale(1.04);
}

.attachment-viewer-nav.prev {
  left: max(18px, env(safe-area-inset-left));
}

.attachment-viewer-nav.next {
  right: max(18px, env(safe-area-inset-right));
}

.chat-materials-backdrop {
  position: fixed;
  inset: 0;
  z-index: 86;
  display: flex;
  justify-content: flex-end;
  overscroll-behavior: contain;
  background:
    radial-gradient(circle at 82% 12%, rgba(89, 217, 139, 0.12), transparent 34%),
    rgba(0, 0, 0, 0.36);
  backdrop-filter: none;
}

.chat-materials-panel {
  width: min(460px, calc(100vw - 28px));
  height: 100%;
  min-width: 0;
  overscroll-behavior: contain;
  border-left: 1px solid rgba(89, 217, 139, 0.22);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  background:
    linear-gradient(155deg, rgba(22, 47, 30, 0.88), rgba(17, 18, 16, 0.98) 48%),
    rgba(16, 17, 15, 0.98);
  box-shadow: -28px 0 80px rgba(0, 0, 0, 0.42);
  animation: chatMaterialsIn 180ms ease both;
}

.chat-materials-panel.settled {
  animation: none;
  will-change: auto;
}

.chat-materials-header {
  min-width: 0;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.chat-materials-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-materials-title > span {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(89, 217, 139, 0.3);
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #bdf9ca;
  background: rgba(89, 217, 139, 0.11);
  box-shadow: 0 12px 34px rgba(35, 163, 95, 0.16);
}

.chat-materials-title h2 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  line-height: 1.05;
}

.chat-materials-title p {
  max-width: 280px;
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chat-material-tabs {
  margin: 0 18px 12px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  background: rgba(0, 0, 0, 0.18);
}

.chat-material-tabs button {
  min-width: 0;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  transition: color 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}

.chat-material-tabs button.active {
  color: #eaffef;
  background:
    linear-gradient(145deg, rgba(89, 217, 139, 0.22), rgba(213, 168, 50, 0.08)),
    rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 24px rgba(35, 163, 95, 0.16);
}

.chat-material-tabs svg {
  width: 16px;
  height: 16px;
}

.chat-material-tabs b {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #dfffe8;
  background: rgba(89, 217, 139, 0.16);
  font-size: 10px;
}

.chat-materials-body {
  grid-area: 1 / 1;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 18px 18px;
  contain: layout paint style;
  scrollbar-gutter: stable;
}

.chat-materials-panes {
  min-width: 0;
  min-height: 0;
  display: grid;
  overflow: hidden;
}

.chat-materials-body[hidden] {
  display: none;
}

.chat-material-media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.chat-material-media-card {
  position: relative;
  aspect-ratio: 1;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  color: inherit;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.chat-material-media-card.video.no-thumbnail {
  background:
    radial-gradient(circle at 50% 28%, rgba(89, 217, 139, 0.2), transparent 36%),
    linear-gradient(145deg, rgba(31, 43, 31, 0.94), rgba(9, 11, 9, 0.98));
}

.chat-material-media-card:hover {
  border-color: rgba(89, 217, 139, 0.42);
  transform: translateY(-1px);
}

.chat-material-media-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.chat-material-media-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 58%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
  pointer-events: none;
}

.chat-material-media-card.video.no-thumbnail::after {
  height: 72%;
}

.chat-material-media-card.video.no-thumbnail .chat-material-video-placeholder {
  gap: 9px;
}

.chat-material-media-card.video.no-thumbnail .chat-material-video-placeholder-icon {
  width: 46px;
  height: 46px;
}

.chat-material-play {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  color: #f7f1df;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.4));
}

.chat-material-media-card.video.no-thumbnail .chat-material-play {
  transform: translateY(-8px);
}

.chat-material-play svg {
  width: 34px;
  height: 34px;
}

.chat-material-meta {
  position: absolute;
  right: 7px;
  bottom: 7px;
  z-index: 2;
  width: max-content;
  max-width: calc(100% - 14px);
  padding: 4px 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: rgba(9, 10, 8, 0.72);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.chat-material-meta b,
.chat-material-meta small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chat-material-meta b {
  color: #fff9e8;
  font-size: 11px;
  font-weight: 900;
}

.chat-material-meta small {
  color: rgba(247, 241, 223, 0.82);
  font-size: 10px;
}

.chat-material-list {
  display: grid;
  gap: 8px;
}

.chat-material-row {
  min-width: 0;
  min-height: 62px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
}

.chat-material-row:hover {
  border-color: rgba(89, 217, 139, 0.34);
  background: rgba(89, 217, 139, 0.08);
}

.chat-material-row.previewable {
  padding: 9px;
}

.chat-material-file-open {
  min-width: 0;
  min-height: 42px;
  padding: 0;
  border: 0;
  grid-column: 1 / 3;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.chat-material-file-open:focus-visible {
  border-radius: 10px;
  outline: 2px solid rgba(112, 225, 144, 0.72);
  outline-offset: 3px;
}

.chat-material-row.playing {
  border-color: rgba(89, 217, 139, 0.42);
  background:
    linear-gradient(145deg, rgba(89, 217, 139, 0.14), rgba(213, 168, 50, 0.06)),
    rgba(255, 255, 255, 0.05);
}

.chat-material-row-icon {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(89, 217, 139, 0.16);
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #bdf9ca;
  background: rgba(89, 217, 139, 0.1);
}

button.chat-material-row-icon {
  cursor: pointer;
}

.chat-material-row-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.chat-material-row-main strong,
.chat-material-row-main span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chat-material-row-main strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.chat-material-row-main span {
  color: var(--muted);
  font-size: 11px;
}

.chat-material-download {
  width: 38px;
  min-height: 38px;
}

.chat-materials-footer {
  min-height: 42px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}

.chat-materials-more {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chat-materials-empty {
  min-height: 280px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: var(--muted);
  text-align: center;
}

.chat-materials-empty span {
  width: 62px;
  height: 62px;
  border: 1px solid rgba(89, 217, 139, 0.24);
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #bdf9ca;
  background: rgba(89, 217, 139, 0.1);
}

.chat-materials-error {
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(199, 82, 74, 0.22);
  border-radius: 12px;
  color: #ffb3ad;
  background: rgba(199, 82, 74, 0.08);
  font-size: 12px;
}

.chat-material-skeleton {
  min-height: 62px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.045), rgba(89, 217, 139, 0.12), rgba(255, 255, 255, 0.045));
  background-size: 240% 100%;
  animation: shimmer 1.1s linear infinite;
}

.chat-material-media-grid .chat-material-skeleton {
  aspect-ratio: 1;
  min-height: 0;
}

@keyframes chatMaterialsIn {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes chatMaterialsMobileIn {
  from {
    transform: translateX(104%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes shimmer {
  from {
    background-position: 120% 0;
  }
  to {
    background-position: -120% 0;
  }
}

.circle-shell {
  position: relative;
  width: 213px;
  height: 213px;
  margin: 2px 0 -2px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: visible;
  cursor: pointer;
  background: #050505;
  box-shadow: 0 12px 34px rgba(35, 163, 95, 0.18);
}

.circle-video {
  width: 213px;
  height: 213px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(236, 244, 233, 0.14);
  background: #050505;
}

.message-media-volume {
  z-index: 7;
  align-self: center;
  justify-self: end;
}

.message-media-volume > .media-volume-trigger {
  color: rgba(235, 246, 237, 0.82);
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(8, 12, 9, 0.72);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(10px);
}

.video-circle-volume {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
}

.video-circle-volume > .video-circle-mute {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 50%;
  color: rgba(235, 246, 237, 0.82);
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  touch-action: manipulation;
}

.video-circle-volume > .video-circle-mute > [data-message-media-volume-icon] {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  background: rgba(8, 12, 9, 0.72);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(10px);
  transition: color 140ms ease, border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.video-circle-volume > .video-circle-mute svg {
  width: 14px;
  height: 14px;
}

.video-circle-volume > .video-circle-mute:hover,
.video-circle-volume > .video-circle-mute:focus-visible {
  color: var(--text);
  background: transparent;
  outline: 0;
}

.video-circle-volume > .video-circle-mute:hover > [data-message-media-volume-icon],
.video-circle-volume > .video-circle-mute:focus-visible > [data-message-media-volume-icon] {
  border-color: rgba(89, 217, 139, 0.36);
  background: rgba(89, 217, 139, 0.1);
}

.video-circle-volume > .video-circle-mute:active > [data-message-media-volume-icon] {
  transform: scale(0.94);
}

.video-circle-volume.is-muted > .video-circle-mute {
  color: rgba(247, 241, 223, 0.48);
}

.circle-progress {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  opacity: 0;
  transform: rotate(-90deg);
  transition: opacity 180ms ease;
}

.circle-shell.has-progress .circle-progress {
  opacity: 1;
}

.circle-progress-track,
.circle-progress-value {
  fill: none;
  stroke-width: 2.1;
  vector-effect: non-scaling-stroke;
}

.circle-progress-track {
  stroke: transparent;
}

.circle-progress-value {
  stroke: var(--green-2);
  stroke-linecap: round;
  stroke-dasharray: 301.593;
  stroke-dashoffset: 301.593;
  filter: drop-shadow(0 0 3px rgba(89, 217, 139, 0.58));
  transition: stroke-dashoffset 80ms linear;
}

.circle-play {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(8, 9, 8, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.circle-play svg {
  width: 20px;
  height: 20px;
}

.circle-shell.playing .circle-play {
  opacity: 0;
  transform: scale(0.9);
}

.voice-note {
  box-sizing: border-box;
  width: min(280px, 100%);
  min-height: 58px;
  margin-top: 0;
  padding: 7px 9px 6px;
  border: 1px solid rgba(89, 217, 139, 0.22);
  border-radius: var(--radius);
  position: relative;
  overflow: visible;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 36px;
  align-items: start;
  gap: 8px;
  cursor: pointer;
  background: rgba(35, 163, 95, 0.08);
  box-shadow: inset 0 0 0 1px rgba(89, 217, 139, 0);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.voice-note::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  border-radius: var(--radius) 0 0 var(--radius);
  background: linear-gradient(180deg, var(--green-2), var(--gold));
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.voice-note.playing {
  border-color: rgba(89, 217, 139, 0.66);
  background:
    linear-gradient(90deg, rgba(35, 163, 95, 0.18), rgba(35, 163, 95, 0.08)),
    rgba(35, 163, 95, 0.1);
  box-shadow:
    inset 0 0 0 1px rgba(89, 217, 139, 0.16),
    0 0 22px rgba(35, 163, 95, 0.12);
}

.voice-note.playing::before {
  opacity: 1;
}

.voice-note-play {
  width: 34px;
  height: 34px;
  margin-top: -4px;
  border: 0;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: #102015;
  background: var(--green-2);
  pointer-events: none;
  transition:
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.voice-note-play svg {
  width: 18px;
  height: 18px;
}

.voice-note.playing .voice-note-play {
  background: linear-gradient(180deg, #66f0a0, var(--green-2));
  box-shadow: 0 0 18px rgba(35, 211, 112, 0.28);
  transform: translateY(-1px);
}

.voice-note-body {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.voice-note > .voice-note-volume {
  grid-column: 3;
  grid-row: 1;
  margin-top: -1px;
}

.voice-note-footer-row {
  min-width: 0;
  min-height: 15px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}

.voice-note-footer-row > .message-meta {
  min-height: 14px;
  margin: 0;
  padding: 0;
  gap: 4px;
}

.voice-note-wave {
  --voice-note-progress: 0;
  min-width: 0;
  height: 30px;
  padding: 0 1px;
  display: flex;
  align-items: center;
  gap: 2px;
  cursor: ew-resize;
  touch-action: manipulation;
}

.audio-preview-wave,
.audio-level-meter {
  min-width: 0;
  height: 30px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.audio-preview-wave span,
.audio-level-meter span {
  width: 3px;
  height: calc(8px + (var(--i) % 7) * 3px);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--green-2), var(--gold));
  opacity: 0.72;
}

.voice-note .voice-note-wave span {
  flex: 1 1 0;
  min-width: 2px;
  max-width: 4px;
  height: calc(5px + var(--level, 0.45) * 21px);
  border-radius: 999px;
  background: rgba(197, 207, 197, 0.34);
  opacity: 0.78;
  transform-origin: center;
  transition:
    background 100ms linear,
    opacity 100ms linear,
    transform 100ms linear;
}

.audio-level-meter {
  height: 48px;
  gap: 4px;
}

.audio-level-meter span {
  height: 38px;
  transform: scaleY(0.08);
  transform-origin: center;
  opacity: 0.32;
  transition:
    transform 70ms linear,
    opacity 70ms linear;
}

.voice-note.playing .voice-note-wave span {
  opacity: 0.62;
}

.voice-note .voice-note-wave span.active {
  background: linear-gradient(180deg, var(--green-2), var(--gold));
  opacity: 1;
}

.voice-note .voice-note-wave span.current {
  box-shadow: 0 0 12px rgba(35, 211, 112, 0.4);
  transform: scaleY(1.16);
}

.voice-note-label {
  display: none;
}

.voice-note audio {
  display: none;
}

.voice-note-time {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  justify-self: end;
  transition: color 160ms ease;
}

.voice-note.playing .voice-note-time {
  color: #dfffe7;
}

.empty-chat {
  margin: auto;
  max-width: 360px;
  text-align: center;
  color: var(--muted);
  display: grid;
  gap: 8px;
  justify-items: center;
}

.messages-initial-loading {
  width: min(520px, 100%);
  min-height: 220px;
  margin: auto 0 0;
  padding: 18px 8px 26px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 13px;
  box-sizing: border-box;
}

.messages-initial-loading-row {
  min-height: 42px;
  display: flex;
  align-items: flex-end;
  gap: 9px;
}

.messages-initial-loading-row.mine {
  justify-content: flex-end;
}

.messages-initial-loading-row > i {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  background: rgba(178, 195, 179, 0.09);
}

.messages-initial-loading-row > span {
  width: min(68%, 320px);
  min-height: 42px;
  padding: 9px 12px;
  display: grid;
  align-content: center;
  gap: 7px;
  border: 1px solid rgba(210, 228, 207, 0.07);
  border-radius: 13px;
  background: rgba(178, 195, 179, 0.055);
  box-sizing: border-box;
}

.messages-initial-loading-row.mine > span {
  width: min(54%, 250px);
  border-color: rgba(96, 195, 123, 0.08);
  background: rgba(67, 134, 82, 0.075);
}

.messages-initial-loading-row b {
  width: 78%;
  height: 7px;
  border-radius: 999px;
  background: rgba(222, 231, 220, 0.08);
}

.messages-initial-loading-row b + b {
  width: 46%;
}

.empty-chat-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: #caffda;
  background: rgba(35, 163, 95, 0.14);
  border: 1px solid rgba(89, 217, 139, 0.28);
}

.empty-chat h2 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 19px;
}

.empty-chat p {
  margin: 0;
  font-size: 13px;
}

.composer-zone {
  grid-row: 5;
  min-height: var(--footer-height);
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  display: grid;
  align-items: center;
  background: rgba(13, 14, 12, 0.62);
}

.composer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.composer-tools {
  position: relative;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.composer-box {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 8px;
}

.composer-format-toolbar {
  position: absolute;
  z-index: 36;
  left: 8px;
  top: -48px;
  max-width: min(396px, calc(100vw - 32px));
  padding: 5px;
  border: 1px solid rgba(89, 217, 139, 0.28);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  background:
    linear-gradient(135deg, rgba(31, 55, 35, 0.92), rgba(14, 15, 13, 0.96)),
    rgba(12, 14, 12, 0.96);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.44),
    0 0 0 1px rgba(255, 255, 255, 0.035) inset;
  backdrop-filter: blur(16px);
  animation: composerFormatIn 110ms ease both;
}

.composer-format-toolbar::after {
  content: "";
  position: absolute;
  left: calc(50% - 6px);
  bottom: -6px;
  width: 10px;
  height: 10px;
  border-right: 1px solid rgba(89, 217, 139, 0.24);
  border-bottom: 1px solid rgba(89, 217, 139, 0.24);
  transform: rotate(45deg);
  background: rgba(16, 26, 18, 0.96);
}

.composer-format-toolbar .button.icon {
  position: relative;
  z-index: 1;
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  border-radius: 9px;
}

.composer-format-toolbar .button.icon:hover {
  border-color: rgba(137, 232, 159, 0.42);
  color: #eaffdc;
  background: rgba(89, 217, 139, 0.12);
}

.composer-format-toolbar .button.icon svg {
  width: 17px;
  height: 17px;
}

.composer-format-toolbar.link-mode {
  width: min(420px, calc(100vw - 32px));
  max-width: min(420px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 6px;
}

.composer-format-link-input {
  position: relative;
  z-index: 1;
  min-width: 0;
  height: 36px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  color: #f0eadc;
  outline: none;
  background: rgba(6, 7, 6, 0.72);
  font: inherit;
  font-size: 13px;
}

.composer-format-link-input:focus {
  border-color: rgba(137, 232, 159, 0.72);
  box-shadow: 0 0 0 3px rgba(89, 217, 139, 0.15);
}

.composer-format-link-input.invalid {
  border-color: rgba(238, 105, 99, 0.72);
  box-shadow: 0 0 0 3px rgba(238, 105, 99, 0.12);
}

@keyframes composerFormatIn {
  from {
    opacity: 0;
    transform: translateY(4px) scale(0.98);
  }

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

.composer-box.has-attachments {
  grid-template-columns: minmax(174px, min(34%, 320px)) minmax(0, 1fr);
  align-items: stretch;
}

.composer-box.has-attachments:has(> .attachment-draft.expanded) {
  grid-template-columns: minmax(0, 1fr);
}

.composer-box.has-attachments:has(> .attachment-draft.expanded) > .attachment-draft,
.composer-box.has-attachments:has(> .attachment-draft.expanded) > .composer-input {
  grid-column: 1 / -1;
}

.composer-box:has(> .composer-context-bar) {
  --composer-context-accent: #79e9a0;
  --composer-context-border: rgba(89, 217, 139, 0.38);
  --composer-context-focus: rgba(89, 217, 139, 0.14);
  gap: 0;
  border: 1px solid var(--composer-context-border);
  border-radius: 12px;
  background: rgba(8, 10, 8, 0.72);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
  isolation: isolate;
}

.composer-box:has(> .composer-context-bar.edit) {
  --composer-context-accent: #e6bd57;
  --composer-context-border: rgba(212, 166, 42, 0.42);
  --composer-context-focus: rgba(212, 166, 42, 0.14);
}

.composer-box:has(> .composer-context-bar):focus-within {
  border-color: var(--composer-context-accent);
  box-shadow: 0 0 0 3px var(--composer-context-focus), 0 12px 34px rgba(0, 0, 0, 0.2);
}

.composer-box.has-attachments .composer-context-bar {
  grid-column: 1 / -1;
}

.composer-box.has-attachments .attachment-draft {
  grid-column: 1;
}

.composer-box.has-attachments .composer-input {
  grid-column: 2;
  min-height: 58px;
}

.composer-box:has(> .composer-context-bar) > .composer-input {
  border: 0;
  border-radius: 0 0 11px 11px;
  background: rgba(7, 9, 7, 0.66);
  box-shadow: none;
}

.composer-box:has(> .composer-context-bar) > .composer-input:focus {
  border-color: transparent;
  background: rgba(7, 9, 7, 0.82);
  box-shadow: none;
}

.composer-box.has-attachments:has(> .composer-context-bar) .attachment-draft {
  height: 104px;
  margin: 6px 0 6px 6px;
  border-radius: 9px;
  box-shadow: none;
}

.composer-box.has-attachments:has(> .composer-context-bar) .attachment-draft.expanded {
  height: auto;
  margin: 6px;
}

.composer-box.has-attachments:has(> .composer-context-bar) > .composer-input {
  min-height: 70px;
  border-left: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0 0 11px 0;
}

.composer-box.has-attachments:has(> .composer-context-bar):has(> .attachment-draft.expanded) > .composer-input {
  min-height: 46px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  border-left: 0;
  border-radius: 0 0 11px 11px;
}

.composer-context-bar {
  position: relative;
  min-width: 0;
  min-height: 46px;
  margin: 0;
  padding: 6px 7px 6px 12px;
  border: 0;
  border-bottom: 1px solid rgba(89, 217, 139, 0.16);
  border-radius: 11px 11px 0 0;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 8px;
  background: linear-gradient(90deg, rgba(37, 71, 45, 0.58), rgba(16, 24, 18, 0.52));
}

.composer-context-bar.has-media {
  grid-template-columns: 36px minmax(0, 1fr) 30px;
}

.composer-context-bar > .message-reply-thumbnail {
  width: 36px;
  height: 36px;
}

.composer-context-bar::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: var(--composer-context-accent, #79e9a0);
}

.composer-context-bar.edit {
  border-bottom-color: rgba(212, 166, 42, 0.18);
  background: linear-gradient(90deg, rgba(71, 56, 24, 0.58), rgba(27, 23, 14, 0.5));
}

.composer-context-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: #92ffb9;
  background: rgba(89, 217, 139, 0.1);
}

.composer-context-bar.edit .composer-context-icon {
  color: #ffd46a;
  background: rgba(212, 166, 42, 0.14);
}

.composer-context-icon svg {
  width: 14px;
  height: 14px;
}

.composer-context-copy {
  min-width: 0;
  display: grid;
  gap: 0;
}

.composer-context-title,
.composer-context-preview {
  min-width: 0;
  overflow: hidden;
}

.composer-context-title {
  color: #f1eadb;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-context-preview {
  color: var(--muted);
  display: -webkit-box;
  font-size: 11px;
  line-height: 1.3;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.composer-context-preview .message-preview-line {
  display: inline;
  white-space: inherit;
}

.composer-context-dismiss.button {
  width: 30px;
  min-width: 30px;
  min-height: 30px;
  border-color: transparent;
  border-radius: 9px;
  color: rgba(236, 234, 225, 0.7);
  background: transparent;
}

.composer-context-dismiss.button:hover:not(:disabled),
.composer-context-dismiss.button:focus-visible {
  transform: none;
  border-color: rgba(255, 255, 255, 0.1);
  color: #fffaf0;
  background: rgba(255, 255, 255, 0.065);
}

.composer-actions {
  position: absolute;
  right: 5px;
  bottom: 5px;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px;
  border-radius: 999px;
  background: rgba(7, 8, 7, 0.5);
  backdrop-filter: blur(12px);
}

.composer-actions .button {
  width: 38px;
  min-width: 38px;
  min-height: 38px;
  border-radius: 50%;
}

.composer-actions .composer-emoji {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}

.composer-actions .composer-emoji:hover,
.composer-actions .composer-emoji.active {
  color: #ccffd9;
  background: rgba(89, 217, 139, 0.12);
  border-color: rgba(89, 217, 139, 0.2);
}

.composer-actions .send {
  position: static;
  box-shadow: 0 12px 28px rgba(35, 185, 106, 0.28);
}

.composer-length-status {
  position: absolute;
  z-index: 7;
  right: 0;
  bottom: calc(100% + 8px);
  max-width: min(260px, 100%);
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid rgba(226, 197, 105, 0.2);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(226, 218, 196, 0.72);
  background: rgba(11, 12, 10, 0.88);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  pointer-events: none;
}

.composer-length-status[hidden] {
  display: none;
}

.composer-box:has(.composer-format-toolbar) .composer-length-status {
  opacity: 0;
  pointer-events: none;
}

.composer-length-status.danger {
  right: 0;
  bottom: calc(100% + 8px);
  max-width: min(430px, 100%);
  min-height: 36px;
  padding: 5px 6px 5px 11px;
  border-color: rgba(238, 105, 99, 0.38);
  color: #ffd9d4;
  background: rgba(43, 17, 16, 0.96);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
  pointer-events: auto;
}

.composer-length-convert {
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(238, 172, 99, 0.34);
  border-radius: 999px;
  color: #fff0cd;
  background: rgba(238, 172, 99, 0.13);
  font: inherit;
  cursor: pointer;
}

.composer-length-convert:hover {
  border-color: rgba(238, 172, 99, 0.58);
  background: rgba(238, 172, 99, 0.2);
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.attach-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  z-index: 25;
  width: min(304px, calc(100vw - 24px));
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  display: grid;
  gap: 3px;
  background: rgba(19, 22, 18, 0.96);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.attach-menu::after {
  content: "";
  position: absolute;
  left: 15px;
  bottom: -6px;
  width: 10px;
  height: 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(19, 22, 18, 0.96);
  transform: rotate(45deg);
}

.attach-menu button {
  min-width: 0;
  padding: 10px;
  border: 0;
  border-radius: 7px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  background: transparent;
  transition:
    background 160ms ease,
    transform 160ms ease;
}

.attach-menu button:hover {
  background: rgba(89, 217, 139, 0.1);
  transform: translateX(1px);
}

.attach-menu i {
  width: 34px;
  height: 34px;
  padding: 8px;
  border-radius: var(--radius);
  color: #102015;
  background: var(--green-2);
}

.attach-menu span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.attach-menu strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attach-menu strong {
  font-size: 13px;
  font-weight: 850;
}

.attach-menu small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.attachment-draft {
  position: relative;
  min-width: 0;
  height: 104px;
  padding: 5px;
  border: 1px solid rgba(89, 217, 139, 0.22);
  border-radius: 12px;
  display: grid;
  grid-template-rows: 36px minmax(0, 1fr);
  gap: 4px;
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(35, 163, 95, 0.16), rgba(35, 163, 95, 0.045)),
    rgba(8, 9, 8, 0.74);
  box-shadow:
    inset 0 0 0 1px rgba(89, 217, 139, 0.04),
    0 10px 28px rgba(0, 0, 0, 0.16);
}

.attachment-draft.expanded {
  height: auto;
  min-height: 104px;
  grid-template-rows: 36px auto;
}

.attachment-draft.uploading {
  border-color: rgba(89, 217, 139, 0.38);
  box-shadow:
    inset 0 0 0 1px rgba(89, 217, 139, 0.08),
    0 10px 28px rgba(0, 0, 0, 0.16);
}

.attachment-draft.uploading .attachment-draft-preview {
  opacity: 0.72;
}

.attachment-draft.error {
  border-color: rgba(232, 100, 94, 0.42);
  box-shadow:
    inset 0 0 0 1px rgba(232, 100, 94, 0.08),
    0 10px 28px rgba(0, 0, 0, 0.16);
}

.attachment-draft.error .attachment-draft-head {
  color: #ffb1ab;
  background: rgba(190, 68, 64, 0.12);
  box-shadow: inset 0 0 0 1px rgba(232, 100, 94, 0.14);
}

.attachment-draft.error .attachment-draft-summary small,
.attachment-draft-file-status.error {
  color: #ffaaa4;
}

.attachment-draft-toolbar {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto 28px;
  align-items: center;
  gap: 5px;
}

.attachment-draft-head {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #caffda;
  background: rgba(89, 217, 139, 0.11);
  box-shadow: inset 0 0 0 1px rgba(89, 217, 139, 0.12);
}

.attachment-draft-head svg {
  width: 14px;
  height: 14px;
}

.attachment-draft.uploading .attachment-draft-head svg {
  animation: spin 900ms linear infinite;
}

.attachment-draft-summary {
  min-width: 0;
  display: grid;
  gap: 0;
}

.attachment-draft-summary strong,
.attachment-draft-summary small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-draft-summary strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
}

.attachment-draft-summary small {
  color: #93d9aa;
  font-size: 9px;
  font-weight: 750;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.attachment-draft-toggle {
  min-width: 0;
  height: 28px;
  padding: 0 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: rgba(231, 235, 226, 0.78);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.035);
  font: inherit;
  font-size: 9px;
  font-weight: 850;
  white-space: nowrap;
}

.attachment-draft-toggle:hover {
  color: #edfff1;
  border-color: rgba(89, 217, 139, 0.22);
  background: rgba(89, 217, 139, 0.08);
}

.attachment-upload-progress {
  position: absolute;
  right: 5px;
  bottom: 2px;
  left: 5px;
  height: 2px;
  overflow: hidden;
  border-radius: 999px;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.09);
}

.attachment-upload-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #58d889, #a8efb9);
  box-shadow: 0 0 10px rgba(89, 217, 139, 0.34);
  transition: width 120ms linear;
}

.attachment-draft-body {
  min-width: 0;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 26px;
  align-items: center;
  gap: 4px;
}

.attachment-draft-body.single,
.attachment-draft.expanded .attachment-draft-body {
  grid-template-columns: minmax(0, 1fr);
}

.attachment-draft-nav {
  width: 26px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: rgba(232, 237, 229, 0.7);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.035);
}

.attachment-draft-nav:hover {
  color: #ecfff2;
  border-color: rgba(89, 217, 139, 0.2);
  background: rgba(89, 217, 139, 0.08);
}

.attachment-draft-nav svg {
  width: 14px;
  height: 14px;
}

.attachment-draft-grid {
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 1px;
  display: flex;
  gap: 6px;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
  -webkit-overflow-scrolling: touch;
}

.attachment-draft-grid::-webkit-scrollbar {
  display: none;
}

.attachment-draft.expanded .attachment-draft-grid {
  overflow: visible;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr));
  gap: 6px;
  scroll-snap-type: none;
  touch-action: auto;
}

.attachment-draft-item {
  flex: 0 0 min(210px, calc(100% - 18px));
  position: relative;
  min-width: 0;
  height: 50px;
  padding: 5px 27px 5px 5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  scroll-snap-align: start;
  background: rgba(255, 255, 255, 0.045);
}

.attachment-draft-item:hover {
  border-color: rgba(89, 217, 139, 0.2);
  background: rgba(89, 217, 139, 0.075);
}

.attachment-draft-preview {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.26);
}

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

.attachment-draft-doc {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #102015;
  background: var(--green-2);
}

.attachment-draft-doc svg {
  width: 18px;
  height: 18px;
}

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

.attachment-draft-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-draft-name {
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
}

.attachment-draft-size {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.attachment-draft-detail {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  white-space: nowrap;
}

.attachment-draft-file-status {
  min-width: 0;
  overflow: hidden;
  color: #88d9a3;
  font-size: 9px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-draft-file-status.uploading {
  color: #a9dfba;
  font-variant-numeric: tabular-nums;
}

.attachment-markdown-import {
  flex: 0 0 auto;
  position: relative;
  min-width: 64px;
  height: 24px;
  padding: 0 6px;
  border: 1px solid rgba(89, 217, 139, 0.2);
  border-radius: 7px;
  color: #aef1c2;
  cursor: pointer;
  background: rgba(89, 217, 139, 0.08);
  font: inherit;
  font-size: 9px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.attachment-markdown-import::before {
  position: absolute;
  content: "";
  inset: -8px -4px;
}

.attachment-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid rgba(232, 100, 94, 0.16);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: rgba(255, 124, 117, 0.88);
  cursor: pointer;
  line-height: 0;
  background: rgba(190, 68, 64, 0.08);
}

.attachment-remove:hover:not(:disabled) {
  color: #ffaaa4;
  border-color: rgba(232, 100, 94, 0.3);
  background: rgba(190, 68, 64, 0.16);
}

.attachment-remove:disabled {
  opacity: 0.35;
  cursor: default;
}

.attachment-remove svg {
  display: block;
  width: 13px;
  height: 13px;
  margin: auto;
}

.attachment-clear {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: rgba(247, 241, 223, 0.72);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.035);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.attachment-clear:hover:not(:disabled) {
  color: #fff;
  border-color: rgba(216, 93, 84, 0.3);
  background: rgba(216, 93, 84, 0.14);
  transform: translateY(-1px);
}

.attachment-clear svg {
  display: block;
  width: 14px;
  height: 14px;
  margin: auto;
}

.attachment-drop-overlay {
  position: absolute;
  inset: 65px 0 var(--footer-height) 0;
  z-index: 20;
  padding: 18px;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.985);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
  background: rgba(5, 6, 5, 0.54);
  backdrop-filter: blur(4px);
}

.app-shell.attachment-dragging .attachment-drop-overlay {
  opacity: 1;
  transform: scale(1);
}

.attachment-drop-overlay > div {
  width: min(360px, 90%);
  min-height: 170px;
  border: 1px dashed rgba(89, 217, 139, 0.58);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
  color: var(--text);
  background: rgba(20, 35, 25, 0.86);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

.attachment-drop-overlay svg {
  width: 34px;
  height: 34px;
  color: var(--green-2);
}

.attachment-drop-overlay strong {
  font-size: 17px;
}

.attachment-drop-overlay span {
  max-width: 240px;
  color: var(--muted);
  font-size: 12px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  isolation: isolate;
  contain: layout paint;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 30% 18%, rgba(89, 217, 139, 0.12), transparent 34%),
    rgba(5, 6, 5, 0.84);
  backdrop-filter: none;
}

.read-info-backdrop {
  z-index: 92;
}

.read-info-modal {
  width: min(360px, calc(100vw - 28px));
  max-height: min(460px, calc(100vh - 36px));
  border: 1px solid rgba(89, 217, 139, 0.28);
  border-radius: 14px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background:
    radial-gradient(circle at 12% 0%, rgba(89, 217, 139, 0.1), transparent 34%),
    rgba(15, 17, 14, 0.98);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.read-info-modal header {
  min-width: 0;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.read-info-heading {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

.read-info-heading-icon {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(89, 217, 139, 0.24);
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--green-2);
  background: rgba(89, 217, 139, 0.09);
}

.read-info-heading-icon svg {
  width: 17px;
  height: 17px;
}

.read-info-title-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.read-info-modal h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.1;
}

.read-info-count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: #d8ffe3;
  font-size: 10px;
  font-weight: 850;
  background: rgba(89, 217, 139, 0.16);
}

.read-info-modal p {
  min-width: 0;
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.read-info-modal header > .button.icon {
  width: 34px;
  min-height: 34px;
  border-radius: 10px;
}

.read-info-list {
  max-height: min(330px, calc(100vh - 120px));
  overflow-y: auto;
  padding: 6px 8px 8px;
  display: grid;
  align-content: start;
  gap: 2px;
}

.read-info-row {
  min-width: 0;
  padding: 7px 6px;
  border-radius: 10px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 9px;
}

.read-info-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.read-info-row .avatar {
  width: 34px;
  height: 34px;
}

.read-info-row span {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.read-info-row strong,
.read-info-row small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.read-info-row strong {
  font-size: 13px;
}

.read-info-row small {
  color: var(--muted);
  font-size: 11px;
}

.read-info-row > svg {
  width: 15px;
  height: 15px;
  color: rgba(116, 243, 163, 0.8);
}

.read-info-empty {
  min-height: 110px;
  display: grid;
  place-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.read-info-empty svg {
  width: 26px;
  height: 26px;
  color: rgba(89, 217, 139, 0.82);
}

.reaction-info-backdrop { z-index: 93; }

.reaction-info-modal {
  width: min(390px, calc(100vw - 28px));
  max-height: min(520px, calc(100vh - 36px));
  border: 1px solid rgba(112, 238, 155, 0.28);
  border-radius: 18px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(89, 217, 139, 0.14), transparent 36%),
    linear-gradient(145deg, rgba(25, 31, 25, 0.99), rgba(12, 16, 13, 0.99));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.reaction-info-modal > header {
  min-width: 0;
  padding: 13px;
  border-bottom: 1px solid rgba(247, 241, 223, 0.08);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
}

.reaction-info-heading {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.reaction-info-heading-icon {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(112, 238, 155, 0.26);
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #a9f6bd;
  background: rgba(89, 217, 139, 0.1);
}

.reaction-info-heading-icon svg { width: 18px; height: 18px; }

.reaction-info-title-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.reaction-info-modal h3 { margin: 0; font-size: 17px; line-height: 1.1; }

.reaction-info-count {
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: #d8ffe3;
  font-size: 10px;
  font-weight: 900;
  background: rgba(89, 217, 139, 0.16);
}

.reaction-info-modal p {
  min-width: 0;
  margin: 3px 0 0;
  overflow: hidden;
  color: rgba(233, 226, 210, 0.5);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reaction-info-modal header > .button.icon {
  width: 38px;
  min-height: 38px;
  border-radius: 11px;
}

.reaction-info-list {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px;
  display: grid;
  align-content: start;
  gap: 7px;
}

.reaction-info-group {
  min-width: 0;
  padding: 5px;
  border: 1px solid rgba(247, 241, 223, 0.055);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.022);
}

.reaction-info-group-label {
  padding: 2px 5px 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.reaction-info-group-label > span,
.reaction-info-row-emoji { font-size: 18px; line-height: 1; }

.reaction-info-group-label img.emoji,
.reaction-info-row-emoji img.emoji { width: 18px; height: 18px; vertical-align: 0; }

.reaction-info-group-label small {
  color: rgba(233, 226, 210, 0.46);
  font-size: 10px;
  font-weight: 900;
}

.reaction-info-row {
  min-width: 0;
  min-height: 44px;
  padding: 4px 6px;
  border-radius: 10px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 9px;
}

.reaction-info-row:hover { background: rgba(89, 217, 139, 0.055); }
.reaction-info-row .avatar { width: 34px; height: 34px; }

.reaction-info-user {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.reaction-info-user strong,
.reaction-info-user small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reaction-info-user strong { font-size: 13px; }
.reaction-info-user small { color: rgba(233, 226, 210, 0.44); font-size: 10px; }
.reaction-info-row-emoji { display: grid; place-items: center; }

.reaction-info-status,
.reaction-info-empty {
  min-height: 118px;
  padding: 16px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  color: rgba(233, 226, 210, 0.58);
  font-size: 12px;
  text-align: center;
}

.reaction-info-status svg { width: 24px; height: 24px; color: #9ceab2; }
.reaction-info-status:not(.error) svg { animation: spin 850ms linear infinite; }
.reaction-info-status.error { color: #eea49d; }

.message-confirm-backdrop {
  z-index: 94;
}

.message-confirm-modal {
  width: min(340px, calc(100vw - 34px));
  border: 1px solid rgba(89, 217, 139, 0.26);
  border-radius: 12px;
  padding: 14px;
  display: grid;
  gap: 12px;
  background: rgba(15, 17, 14, 0.97);
  box-shadow: var(--shadow);
}

.message-confirm-modal header,
.message-confirm-modal footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.message-confirm-modal h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.1;
}

.message-confirm-modal p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.message-confirm-preview {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  overflow: hidden;
  color: #e9e2d2;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.035);
}

.message-confirm-modal footer {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.message-confirm-modal[aria-busy="true"] .message-confirm-preview {
  opacity: 0.72;
}

.media-backdrop {
  z-index: 80;
}

.media-preview {
  width: min(340px, calc(100vw - 28px));
  border: 1px solid rgba(89, 217, 139, 0.28);
  border-radius: 16px;
  display: grid;
  justify-items: stretch;
  background:
    radial-gradient(circle at 20% 0%, rgba(89, 217, 139, 0.1), transparent 34%),
    rgba(15, 17, 14, 0.98);
  box-shadow: var(--shadow);
  backface-visibility: hidden;
  overflow: hidden;
}

.media-preview.audio:not(.recording):not(.preparing) {
  width: min(320px, calc(100vw - 28px));
}

.media-preview-surface {
  position: relative;
  backface-visibility: hidden;
}

.media-preview-stage {
  position: relative;
}

.media-preview.video .media-preview-stage {
  width: min(252px, 66vw);
  margin: 14px auto 12px;
}

.media-preview-surface[data-action] {
  cursor: pointer;
}

.media-preview.video .media-preview-surface {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: #050505;
  border: 2px solid rgba(89, 217, 139, 0.68);
  box-shadow:
    0 18px 48px rgba(35, 163, 95, 0.16),
    0 0 0 5px rgba(89, 217, 139, 0.04);
}

.media-preview.audio .media-preview-surface {
  width: auto;
  margin: 12px 14px;
}

.media-preview video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #050505;
  backface-visibility: hidden;
}

.media-preview.video.recording .media-preview-surface {
  touch-action: none;
}

.media-preview.video.is-front-camera.recording #media-preview-video {
  transform: scaleX(-1) translateZ(0);
}

.media-preview.is-camera-switching #media-preview-video {
  filter: brightness(0.84);
}

.media-camera-controls {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.media-camera-controls-host:empty {
  display: none;
}

.media-camera-switch,
.media-camera-zoom {
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f7f1df;
  background: rgba(5, 7, 5, 0.68);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: auto;
}

.media-camera-switch {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.media-camera-switch:disabled,
.media-camera-switch[aria-disabled="true"] {
  opacity: 0.48;
  cursor: default;
}

.media-camera-switch svg {
  width: 20px;
  height: 20px;
}

.media-camera-switch[aria-busy="true"] svg {
  animation: spin 850ms linear infinite;
}

.media-camera-zoom {
  position: absolute;
  right: auto;
  bottom: 14px;
  left: 50%;
  width: min(176px, calc(100% - 52px));
  min-height: 32px;
  padding: 3px 8px;
  border-radius: 999px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  border-color: rgba(151, 225, 164, 0.28);
  background: rgba(14, 20, 15, 0.78);
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transform: translateX(-50%);
}

.media-camera-zoom > span {
  color: #bcebc4;
  font-size: 11px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.media-camera-zoom input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-width: 0;
  height: 22px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  touch-action: none;
}

.media-camera-zoom input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(223, 239, 224, 0.3);
}

.media-camera-zoom input[type="range"]::-webkit-slider-thumb {
  width: 15px;
  height: 15px;
  margin-top: -5.5px;
  border: 2px solid #d9f4dd;
  border-radius: 50%;
  appearance: none;
  -webkit-appearance: none;
  background: var(--green-2);
  box-shadow: 0 2px 8px rgba(48, 181, 94, 0.34);
}

.media-camera-zoom input[type="range"]::-moz-range-track {
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(223, 239, 224, 0.3);
}

.media-camera-zoom input[type="range"]::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--green-2);
}

.media-camera-zoom input[type="range"]::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: 2px solid #d9f4dd;
  border-radius: 50%;
  background: var(--green-2);
  box-shadow: 0 2px 8px rgba(48, 181, 94, 0.34);
}

.media-camera-zoom input[type="range"]:focus-visible {
  outline: 0;
}

.media-camera-zoom:focus-within {
  border-color: rgba(151, 225, 164, 0.62);
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.2),
    0 0 0 3px rgba(89, 217, 139, 0.12);
}

.media-camera-switch[hidden],
.media-camera-zoom[hidden] {
  display: none;
}

.media-camera-status {
  position: absolute;
  top: 14px;
  left: 50%;
  max-width: 136px;
  overflow: hidden;
  color: rgba(247, 241, 223, 0.9);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.8);
  transform: translateX(-50%);
}

.media-preview-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #102015;
  background: rgba(89, 217, 139, 0.92);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.36);
  transform: translate(-50%, -50%);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.media-preview-play svg {
  width: 22px;
  height: 22px;
  margin-left: 2px;
}

.media-preview.video.playing .media-preview-play {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.92);
}

.media-loading {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #caffda;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 16px),
    rgba(8, 9, 8, 0.68);
}

.media-loading svg {
  width: 34px;
  height: 34px;
  animation: recordReady 900ms ease-in-out infinite;
}

.media-loading span {
  position: absolute;
  width: 64%;
  height: 3px;
  bottom: 22px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
}

.media-loading span::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green-2), var(--gold));
  animation: loadingSweep 950ms ease-in-out infinite;
}

.audio-preview {
  min-width: 0;
  min-height: 82px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: var(--green-2);
  background:
    linear-gradient(90deg, rgba(89, 217, 139, 0.08), transparent 42%),
    rgba(255, 255, 255, 0.035);
}

.audio-preview.playback {
  min-height: 68px;
  grid-template-columns: 42px minmax(0, 1fr);
  align-content: center;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-color: rgba(89, 217, 139, 0.2);
  background:
    radial-gradient(circle at 14% 18%, rgba(89, 217, 139, 0.13), transparent 34%),
    rgba(8, 10, 8, 0.68);
}

.audio-preview > svg {
  width: 24px;
  height: 24px;
  justify-self: center;
}

.audio-preview.live > svg {
  color: var(--green-2);
}

.audio-preview-play {
  justify-self: center;
  align-self: start;
  width: 42px;
  height: 42px;
  margin-top: -3px;
  padding: 0;
  border: 1px solid rgba(89, 217, 139, 0.35);
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #102015;
  background: linear-gradient(180deg, var(--green-2), var(--green));
  box-shadow: 0 14px 28px rgba(35, 163, 95, 0.2);
}

.audio-preview-play svg {
  width: 16px;
  height: 16px;
  margin-left: 2px;
}

.audio-preview.playing .audio-preview-play svg {
  margin-left: 0;
}

.audio-preview-content {
  min-width: 0;
  width: 100%;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 5px;
}

.audio-preview-row {
  min-width: 0;
  width: 100%;
  display: grid;
  justify-items: start;
  gap: 2px;
  text-align: left;
}

.audio-preview-row strong {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audio-preview-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.audio-preview-progress {
  width: min(150px, 100%);
  height: 16px;
  justify-self: start;
}

.audio-preview-progress span {
  background: rgba(255, 255, 255, 0.16);
  opacity: 0.78;
  transition:
    background 120ms ease,
    opacity 120ms ease;
}

.audio-preview-progress span.active {
  background: linear-gradient(180deg, var(--green-2), var(--gold));
  opacity: 0.98;
}

.audio-preview.playback audio {
  display: none;
}

.media-preview-meta {
  min-width: 0;
  padding: 11px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.018);
}

.media-preview-heading {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.media-preview-heading strong,
.media-preview-heading small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-preview-heading strong {
  color: var(--text);
  font-size: 14px;
}

.media-preview-heading small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.media-preview.recording .media-preview-heading small {
  color: #ffaaa4;
}

.media-preview.recording .media-preview-heading small::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  display: inline-block;
  vertical-align: 1px;
  background: #f27067;
  box-shadow: 0 0 0 4px rgba(242, 112, 103, 0.1);
  animation: recordReady 1.2s ease-in-out infinite;
}

.media-preview-timer {
  min-width: 46px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  background: rgba(255, 255, 255, 0.04);
}

.media-preview-actions {
  width: 100%;
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.12);
}

.media-preview-actions .button {
  width: 42px;
  min-height: 42px;
  border-radius: 12px;
}

.media-preview-actions .media-record-stop {
  box-shadow: 0 10px 28px rgba(35, 163, 95, 0.2);
}

.emoji-picker {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 12;
  width: min(420px, calc(100vw - 36px));
  height: min(330px, calc(100dvh - 110px));
  max-height: 330px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(24, 26, 23, 0.98);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  transform-origin: bottom right;
}

.emoji-pack-tabs {
  flex: 0 0 auto;
  width: fit-content;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  padding: 2px;
  border: 1px solid rgba(89, 217, 139, 0.12);
  border-radius: 12px;
  background: rgba(5, 12, 7, 0.7);
}

.emoji-pack-tab {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(247, 241, 223, 0.58);
  background: transparent;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.emoji-pack-tab:hover {
  color: rgba(247, 241, 223, 0.9);
  background: rgba(255, 255, 255, 0.045);
}

.emoji-pack-tab.active {
  color: #c8ffd8;
  background: linear-gradient(135deg, rgba(89, 217, 139, 0.2), rgba(89, 217, 139, 0.08));
  box-shadow: inset 0 0 0 1px rgba(89, 217, 139, 0.22);
}

.emoji-pack-sample {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  object-fit: contain;
  font-size: 20px;
  line-height: 1;
  pointer-events: none;
}

.emoji-pack-sample img.emoji,
.emoji-pack-sample.emoji {
  width: 22px;
  height: 22px;
  margin: 0;
}

.rasta-emoji-pack-sample {
  width: 27px;
  height: 27px;
}

.emoji-pack-panel {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(154, 224, 169, 0.16) transparent;
  padding: 8px 2px 2px;
}

.emoji-pack-panel::-webkit-scrollbar,
.secret-emoji-pack-grid::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.emoji-pack-panel::-webkit-scrollbar-track,
.secret-emoji-pack-grid::-webkit-scrollbar-track {
  background: transparent;
}

.emoji-pack-panel::-webkit-scrollbar-thumb,
.secret-emoji-pack-grid::-webkit-scrollbar-thumb {
  min-height: 28px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(154, 224, 169, 0.16);
  background-clip: padding-box;
}

.emoji-pack-panel:hover::-webkit-scrollbar-thumb,
.secret-emoji-pack-grid:hover::-webkit-scrollbar-thumb {
  background: rgba(154, 224, 169, 0.27);
  background-clip: padding-box;
}

.emoji-pack-panel::-webkit-scrollbar-button,
.secret-emoji-pack-grid::-webkit-scrollbar-button {
  width: 0;
  height: 0;
  display: none;
}

.emoji-group + .emoji-group {
  margin-top: 8px;
}

.emoji-group-title {
  padding: 2px 5px 5px;
  color: rgba(247, 241, 223, 0.45);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 4px;
}

.emoji-choice {
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  display: grid;
  place-items: center;
  font-size: 24px;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.modern-emoji-choice img.emoji {
  width: 25px;
  height: 25px;
  vertical-align: 0;
  pointer-events: none;
}

.rasta-emoji-grid {
  grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
  padding-inline: 6px;
}

.rasta-emoji-choice,
.rasta-picker-emote {
  width: 56px;
  height: 56px;
}

.rasta-picker-emote {
  object-fit: contain;
  pointer-events: none;
  transition: filter 150ms ease, transform 150ms ease;
}

.emoji-choice:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(89, 217, 139, 0.24);
  transform: translateY(-1px);
}

.rasta-emoji-choice:hover,
.rasta-emoji-choice:focus-visible,
.rasta-emoji-choice:active,
.secret-rasta-emoji-choice:hover,
.secret-rasta-emoji-choice:focus-visible,
.secret-rasta-emoji-choice:active {
  border-color: transparent;
  outline: none;
  background: transparent;
  transform: none;
}

.rasta-emoji-choice:hover .rasta-picker-emote,
.rasta-emoji-choice:focus-visible .rasta-picker-emote,
.rasta-emoji-choice:active .rasta-picker-emote,
.secret-rasta-emoji-choice:hover .secret-rasta-emoji-glyph,
.secret-rasta-emoji-choice:focus-visible .secret-rasta-emoji-glyph,
.secret-rasta-emoji-choice:active .secret-rasta-emoji-glyph {
  filter:
    drop-shadow(0 0 1px rgba(224, 255, 230, 0.98))
    drop-shadow(0 0 6px rgba(89, 217, 139, 0.76))
    drop-shadow(0 6px 9px rgba(0, 0, 0, 0.28));
  transform: scale(1.06);
}

img.emoji {
  width: 1.18em;
  height: 1.18em;
  vertical-align: -0.18em;
}

.emoji-choice img.emoji,
.kolobok-choice img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.kolobok-picker {
  align-items: center;
}

.kolobok-grid {
  width: 100%;
}

.unread-badge {
  min-width: 20px;
  height: 20px;
  margin-left: auto;
  padding: 0 6px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--coral);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.notification-panel {
  position: fixed;
  top: 82px;
  right: 296px;
  z-index: 40;
  width: min(330px, calc(100vw - 28px));
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(24, 26, 23, 0.98);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.notification-permission-prompt {
  position: fixed;
  top: 82px;
  right: 18px;
  z-index: 65;
  width: min(350px, calc(100vw - 36px));
  box-sizing: border-box;
  padding: 12px;
  border: 1px solid rgba(89, 217, 139, 0.32);
  border-radius: 12px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 9px 11px;
  background:
    linear-gradient(135deg, rgba(35, 163, 95, 0.14), transparent 62%),
    rgba(22, 24, 21, 0.98);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.42);
}

.notification-permission-icon {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(89, 217, 139, 0.28);
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--green-2);
  background: rgba(89, 217, 139, 0.09);
}

.notification-permission-icon svg {
  width: 18px;
  height: 18px;
}

.notification-permission-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.notification-permission-copy strong {
  font-size: 13px;
  line-height: 1.2;
}

.notification-permission-copy small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.notification-permission-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.notification-permission-actions .button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 11px;
}

.notification-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.notification-panel header strong {
  font-size: 14px;
}

.notification-panel-title {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.notification-panel-title small {
  overflow: hidden;
  max-width: 220px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.notification-panel-section + .notification-panel-section {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.notification-panel-section.compact .setting-row {
  min-height: 42px;
}

.setting-row {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: var(--radius);
  padding: 0 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  text-align: left;
  color: var(--text);
  background: transparent;
}

.setting-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

.setting-row span {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 800;
}

.setting-row svg {
  width: 17px;
  height: 17px;
}

.setting-row small {
  color: var(--muted);
  font-size: 11px;
}

.notification-mute-row {
  cursor: default;
}

.notification-select {
  min-width: 108px;
  max-width: 132px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  padding: 0 26px 0 8px;
  color: var(--text);
  background: #20231f;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  outline: none;
}

.notification-select:focus-visible {
  border-color: rgba(89, 217, 139, 0.5);
  box-shadow: 0 0 0 2px rgba(89, 217, 139, 0.12);
}

.switch {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  transition: background 160ms ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #fff;
  transition: transform 160ms ease;
}

.switch.active {
  background: rgba(89, 217, 139, 0.5);
}

.switch.active::after {
  transform: translateX(16px);
}

.clear-unread {
  width: 100%;
  margin-top: 0;
}

.notification-panel-actions {
  margin-top: 9px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 7px;
}

.notification-panel-actions .button {
  min-height: 38px;
}

.profile-notification-settings {
  display: grid;
  gap: 10px;
}

.notification-profile-card {
  padding: 7px;
}

.profile-setting-head.static {
  cursor: default;
}

.profile-setting-head.static:hover {
  background: transparent;
}

.notification-profile-toggle {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
}

.notification-profile-card .setting-row {
  min-height: 44px;
}

.notification-platform-hint {
  margin: 2px 10px 8px 58px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.notification-platform-hint.warning {
  color: #ffaaa2;
}

.notification-quiet-hours {
  padding: 6px 8px 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.notification-quiet-hours label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.notification-quiet-hours .input {
  min-height: 38px;
  padding: 7px 10px;
  color-scheme: dark;
}

.quality-backdrop {
  position: fixed;
  inset: 0;
  z-index: 58;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 48% 20%, rgba(89, 217, 139, 0.1), transparent 34%),
    rgba(5, 6, 5, 0.8);
  backdrop-filter: none;
  animation: qualityFade 180ms ease-out both;
}

.stream-settings-panel {
  position: relative;
  width: min(620px, calc(100vw - 34px));
  max-height: calc(100dvh - 44px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 18px;
  border: 1px solid rgba(89, 217, 139, 0.3);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(35, 163, 95, 0.16), transparent 38%),
    linear-gradient(220deg, rgba(213, 168, 50, 0.12), transparent 42%),
    rgba(17, 19, 16, 0.98);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.52);
  animation: qualityPop 260ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.stream-settings-panel.voice-device-picker-open {
  animation: none;
}

.stream-settings-panel.voice-device-picker-open .audio-device-settings {
  z-index: 100;
}

.stream-settings-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(90deg, transparent, rgba(89, 217, 139, 0.16), transparent),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 34px);
  opacity: 0.36;
  animation: qualityScan 12s linear infinite;
}

.settings-panel-head {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -4px -4px 10px;
  padding: 4px;
  background: transparent;
  backdrop-filter: blur(16px);
  box-shadow: none;
}

.settings-panel-head strong,
.settings-panel-head span {
  display: block;
}

.settings-panel-head strong {
  font-size: 20px;
}

.settings-panel-head span {
  margin-top: 3px;
  color: var(--green-2);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.settings-panel-head .button {
  margin-left: auto;
}

.quality-tabs {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 14px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.22);
}

.quality-tab {
  min-width: 0;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
  cursor: pointer;
}

.quality-tab svg {
  width: 17px;
  height: 17px;
}

.quality-tab:hover,
.quality-tab.active {
  border-color: rgba(89, 217, 139, 0.35);
  color: var(--text);
  background: rgba(35, 163, 95, 0.16);
}

.stream-settings-tab-panel {
  position: relative;
  z-index: 1;
}

.quality-orbit {
  position: relative;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(89, 217, 139, 0.35);
  border-radius: 50%;
  color: #caffda;
  background: rgba(35, 163, 95, 0.1);
}

.quality-orbit span {
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(89, 217, 139, 0.28);
  border-radius: 50%;
  animation: orbitPulse 2.4s ease-out infinite;
}

.quality-orbit span:nth-child(2) {
  animation-delay: 650ms;
}

.quality-orbit span:nth-child(3) {
  animation-delay: 1300ms;
}

.quality-orbit svg {
  width: 22px;
  height: 22px;
}

.quality-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr);
  align-items: start;
  gap: 14px;
}

.stream-stats {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid rgba(89, 217, 139, 0.22);
  border-radius: var(--radius);
  background: rgba(7, 11, 8, 0.58);
}

.stream-stats header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.stream-stats header strong {
  color: var(--green-2);
  font-size: 11px;
}

.stream-stats--warn header strong {
  color: var(--gold);
}

.stream-stats--bad header strong {
  color: #ff8b7f;
}

.stream-stats--waiting header strong,
.stream-stats--idle header strong {
  color: var(--muted);
}

.stream-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.stream-stat {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.stream-stat span,
.stream-stat strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stream-stat span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.stream-stat strong {
  margin-top: 3px;
  color: var(--text);
  font-size: 13px;
}

.quality-group {
  display: grid;
  align-content: start;
  gap: 7px;
}

.quality-group + .quality-group {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.quality-group header {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.quality-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.quality-option {
  min-width: 0;
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 9px;
  color: var(--text);
  text-align: left;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.quality-option:hover,
.quality-option.active {
  border-color: rgba(89, 217, 139, 0.42);
  background:
    linear-gradient(135deg, rgba(35, 163, 95, 0.24), rgba(213, 168, 50, 0.08)),
    rgba(35, 163, 95, 0.12);
}

.quality-option strong {
  overflow: hidden;
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.quality-option span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
}

.stream-settings-video {
  display: grid;
  gap: 11px;
}

.stream-settings-card,
.stream-settings-details {
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 14px;
  background: rgba(7, 11, 8, 0.48);
}

.stream-auto-card {
  overflow: hidden;
  padding: 11px;
  transition: border-color 160ms ease, background 160ms ease;
}

.stream-auto-card.active {
  border-color: rgba(89, 217, 139, 0.28);
  background:
    linear-gradient(135deg, rgba(35, 163, 95, 0.1), transparent 52%),
    rgba(7, 11, 8, 0.56);
}

.stream-live-status {
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 3px 2px 11px;
}

.stream-live-status-icon,
.stream-auto-mode-icon {
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #c9f7d5;
  background: rgba(89, 217, 139, 0.1);
}

.stream-live-status-icon {
  width: 42px;
  height: 42px;
}

.stream-live-status-icon svg {
  width: 20px;
  height: 20px;
}

.stream-live-status.pending .stream-live-status-icon svg {
  animation: spin 900ms linear infinite;
}

.stream-live-status.warning .stream-live-status-icon {
  color: #f2d77d;
  background: rgba(226, 196, 94, 0.11);
}

.stream-live-status.danger .stream-live-status-icon {
  color: #ffaaa2;
  background: rgba(225, 105, 92, 0.12);
}

.stream-live-status-copy,
.stream-live-status-copy > span,
.stream-live-status-copy strong,
.stream-live-status-copy small,
.stream-auto-mode-copy,
.stream-auto-mode-copy strong,
.stream-auto-mode-copy small,
.stream-priority-copy,
.stream-priority-copy strong,
.stream-priority-copy small,
.stream-settings-details-copy,
.stream-settings-details-copy strong,
.stream-settings-details-copy small {
  min-width: 0;
  display: block;
}

.stream-live-status-copy > span {
  margin-bottom: 1px;
  color: var(--green-2);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.11em;
}

.stream-live-status-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stream-live-status-copy small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stream-live-status-badge {
  flex: 0 0 auto;
  padding: 4px 7px;
  border: 1px solid rgba(89, 217, 139, 0.18);
  border-radius: 999px;
  color: var(--green-2);
  background: rgba(89, 217, 139, 0.08);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.stream-live-status-badge.live {
  position: relative;
  padding-left: 15px;
}

.stream-live-status-badge.live::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green-2);
  box-shadow: 0 0 0 4px rgba(89, 217, 139, 0.1);
  transform: translateY(-50%);
}

.stream-auto-mode {
  width: 100%;
  min-width: 0;
  min-height: 62px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-align: left;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.stream-auto-mode:hover,
.stream-auto-mode.active {
  border-color: rgba(89, 217, 139, 0.36);
  background: rgba(35, 163, 95, 0.1);
}

.stream-auto-mode:focus-visible,
.stream-priority-option:focus-visible,
.stream-settings-details > summary:focus-visible {
  outline: 2px solid rgba(89, 217, 139, 0.4);
  outline-offset: 2px;
}

.stream-auto-mode-icon {
  width: 38px;
  height: 38px;
}

.stream-auto-mode-icon svg {
  width: 18px;
  height: 18px;
}

.stream-auto-mode-copy strong,
.stream-priority-copy strong,
.stream-settings-details-copy strong {
  font-size: 11px;
}

.stream-auto-mode-copy small,
.stream-priority-copy small,
.stream-settings-details-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.stream-auto-mode-state {
  min-width: 58px;
  display: grid;
  justify-items: end;
  gap: 4px;
}

.stream-auto-mode-state b {
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.05em;
}

.stream-auto-mode-state i {
  position: relative;
  width: 32px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  transition: background 160ms ease;
}

.stream-auto-mode-state i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(247, 241, 223, 0.64);
  transition: transform 160ms ease, background 160ms ease;
}

.stream-auto-mode.active .stream-auto-mode-state b { color: var(--green-2); }
.stream-auto-mode.active .stream-auto-mode-state i { background: rgba(89, 217, 139, 0.32); }
.stream-auto-mode.active .stream-auto-mode-state i::after {
  background: #a9efb9;
  transform: translateX(14px);
}

.stream-priority-control {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
  display: grid;
  grid-template-columns: minmax(130px, 0.75fr) minmax(0, 1.25fr);
  align-items: center;
  gap: 10px;
}

.stream-priority-control.disabled .stream-priority-copy,
.stream-priority-control.disabled .stream-priority-options {
  opacity: 0.48;
}

.stream-priority-options {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.stream-priority-option {
  min-width: 0;
  min-height: 48px;
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  color: var(--muted);
  text-align: left;
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
}

.stream-priority-option:hover,
.stream-priority-option.active {
  border-color: rgba(89, 217, 139, 0.3);
  color: #c9f7d5;
  background: rgba(35, 163, 95, 0.1);
}

.stream-priority-option:disabled { cursor: default; }
.stream-priority-option svg { width: 16px; height: 16px; }
.stream-priority-option span,
.stream-priority-option strong,
.stream-priority-option small { min-width: 0; display: block; }
.stream-priority-option strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.stream-priority-option small { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }

.stream-settings-details {
  overflow: hidden;
}

.stream-settings-details > summary {
  min-height: 50px;
  padding: 7px 11px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 8px;
  color: rgba(247, 241, 223, 0.78);
  cursor: pointer;
  list-style: none;
}

.stream-settings-details > summary::-webkit-details-marker { display: none; }
.stream-settings-details > summary > svg { width: 17px; height: 17px; }
.stream-settings-details > summary > svg:last-child { color: var(--muted); transition: transform 160ms ease; }
.stream-settings-details[open] > summary > svg:last-child { transform: rotate(180deg); }

.stream-manual-settings-body,
.stream-diagnostics-body {
  padding: 0 10px 10px;
}

.stream-manual-settings .quality-option {
  min-height: 58px;
  border-radius: 11px;
}

.stream-diagnostics-head {
  margin-bottom: 8px;
  padding: 0 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stream-diagnostics-head > span {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 9px;
}

.stream-diagnostics-head > span i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--muted);
}

.stream-diagnostics-head > span b {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stream-diagnostics-head[data-tone="good"] > span i { background: var(--green-2); box-shadow: 0 0 0 4px rgba(89, 217, 139, 0.1); }
.stream-diagnostics-head[data-tone="warn"] > span i { background: var(--gold); }
.stream-diagnostics-head[data-tone="bad"] > span i { background: #e1695c; }
.stream-diagnostics .stream-stats { margin: 0; }

.audio-quality-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(240px, 0.85fr);
}

.audio-device-settings {
  position: relative;
  z-index: 1;
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.voice-preflight,
.voice-settings-section,
.voice-advanced-settings {
  position: relative;
  z-index: 1;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 14px;
  background: rgba(7, 11, 8, 0.48);
}

.voice-preflight {
  --voice-preflight-level: 0%;
  padding: 11px;
  transition: border-color 160ms ease, background 160ms ease;
}

.voice-preflight.recording {
  border-color: rgba(89, 217, 139, 0.38);
  background: rgba(35, 163, 95, 0.085);
}

.voice-preflight.error {
  border-color: rgba(225, 105, 92, 0.32);
}

.voice-preflight.warning {
  border-color: rgba(226, 196, 94, 0.3);
  background: rgba(226, 196, 94, 0.045);
}

.voice-preflight-head {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
}

.voice-preflight-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #c9f7d5;
  background: rgba(89, 217, 139, 0.11);
}

.voice-preflight-head > span:nth-child(2),
.voice-preflight-head strong,
.voice-preflight-head small {
  min-width: 0;
  display: block;
}

.voice-preflight-head strong {
  font-size: 12px;
}

.voice-preflight-head small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.voice-preflight-action {
  min-height: 36px;
  padding-inline: 11px;
  font-size: 10px;
}

.voice-preflight-meter {
  height: 5px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.voice-preflight-meter i {
  width: var(--voice-preflight-level);
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #3fa965, #79e28e 72%, #e2c45e);
  box-shadow: 0 0 12px rgba(89, 217, 139, 0.28);
  transition: width 90ms linear;
}

.voice-preflight-playback {
  min-width: 0;
  margin-top: 10px;
  padding: 8px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  overflow: hidden;
  border: 1px solid rgba(89, 217, 139, 0.18);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(35, 163, 95, 0.12), transparent 58%),
    rgba(4, 9, 6, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.voice-preflight-playback.playing {
  border-color: rgba(89, 217, 139, 0.34);
  background:
    linear-gradient(135deg, rgba(35, 163, 95, 0.18), transparent 58%),
    rgba(4, 9, 6, 0.76);
}

.voice-preflight-playback-toggle {
  width: 38px;
  min-height: 38px;
  border-radius: 10px;
  color: #d5f8de;
  background: rgba(89, 217, 139, 0.12);
  border-color: rgba(89, 217, 139, 0.22);
}

.voice-preflight-playback.playing .voice-preflight-playback-toggle {
  color: #102116;
  background: #73d88c;
  border-color: rgba(140, 243, 165, 0.72);
}

.voice-preflight-playback-main,
.voice-preflight-playback-meta {
  min-width: 0;
  display: block;
}

.voice-preflight-playback-meta {
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.voice-preflight-playback-meta strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-preflight-playback-meta small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.voice-preflight-playback-seek {
  --voice-preflight-progress: 0%;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 16px;
  margin: 1px 0 0;
  padding: 6px 0;
  border: 0;
  border-radius: 999px;
  outline: 0;
  background:
    linear-gradient(
      90deg,
      #65dc8d 0 var(--voice-preflight-progress),
      rgba(168, 189, 174, 0.2) var(--voice-preflight-progress) 100%
    ) center / 100% 4px no-repeat;
  cursor: pointer;
}

.voice-preflight-playback-seek::-webkit-slider-runnable-track {
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: transparent;
}

.voice-preflight-playback-seek::-webkit-slider-thumb {
  width: 12px;
  height: 12px;
  margin-top: -4px;
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid #183421;
  border-radius: 50%;
  background: #82eca0;
  box-shadow: 0 0 0 3px rgba(89, 217, 139, 0.14);
}

.voice-preflight-playback-seek::-moz-range-track {
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(168, 189, 174, 0.2);
}

.voice-preflight-playback-seek::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: #65dc8d;
}

.voice-preflight-playback-seek::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 2px solid #183421;
  border-radius: 50%;
  background: #82eca0;
  box-shadow: 0 0 0 3px rgba(89, 217, 139, 0.14);
}

.voice-preflight-playback-seek:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px rgba(89, 217, 139, 0.32);
}

.voice-preflight-playback-seek:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 4px rgba(89, 217, 139, 0.32);
}

.voice-preflight-playback-seek:disabled {
  cursor: default;
  opacity: 0.5;
}

@media (max-width: 560px) {
  .voice-preflight-playback {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .voice-preflight-playback button.voice-preflight-playback-toggle {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
  }

  .voice-preflight-playback-seek {
    height: 44px;
    min-height: 44px;
    margin-block: -9px;
    padding-block: 20px;
  }
}

.voice-preflight-player {
  display: none;
}

.voice-preflight-output-warning {
  margin: 8px 2px 0;
  color: #e8cf7c;
  font-size: 9px;
  line-height: 1.35;
}

.voice-settings-section {
  padding: 11px;
}

.voice-settings-section > header {
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.voice-settings-section > header span {
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
}

.voice-settings-section > header small {
  color: var(--muted);
  font-size: 9px;
}

.voice-preset-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.voice-preset-option {
  min-width: 0;
  min-height: 62px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 11px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  color: var(--text);
  text-align: left;
  background: rgba(255, 255, 255, 0.025);
}

.voice-preset-option:hover,
.voice-preset-option.active {
  border-color: rgba(89, 217, 139, 0.36);
  background: rgba(35, 163, 95, 0.12);
}

.voice-preset-option > svg {
  width: 19px;
  color: var(--green-2);
}

.voice-preset-option span,
.voice-preset-option strong,
.voice-preset-option small {
  min-width: 0;
  display: block;
}

.voice-preset-option strong {
  overflow: hidden;
  font-size: 10.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.voice-preset-option small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.25;
}

.voice-setting-list {
  display: grid;
  gap: 5px;
}

.voice-setting-toggle {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 11px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-align: left;
  background: transparent;
}

.voice-setting-toggle:hover,
.voice-setting-toggle.active {
  border-color: rgba(89, 217, 139, 0.14);
  background: rgba(89, 217, 139, 0.055);
}

.voice-setting-toggle-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: rgba(247, 241, 223, 0.68);
  background: rgba(255, 255, 255, 0.045);
}

.voice-setting-toggle.active .voice-setting-toggle-icon {
  color: #c7f5d2;
  background: rgba(89, 217, 139, 0.12);
}

.voice-setting-toggle.status-warning {
  border-color: rgba(226, 196, 94, 0.2);
  background: rgba(226, 196, 94, 0.045);
}

.voice-setting-toggle.status-warning .voice-setting-toggle-copy small {
  color: #d9c77d;
}

.voice-setting-toggle-icon svg {
  width: 16px;
}

.voice-setting-toggle-copy,
.voice-setting-toggle-copy strong,
.voice-setting-toggle-copy small {
  min-width: 0;
  display: block;
}

.voice-setting-toggle-copy strong {
  font-size: 11px;
}

.voice-setting-toggle-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.3;
}

.voice-advanced-settings {
  overflow: hidden;
}

.voice-advanced-settings > summary {
  min-height: 44px;
  padding: 0 11px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 7px;
  color: rgba(247, 241, 223, 0.76);
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
  list-style: none;
}

.voice-advanced-settings > summary::-webkit-details-marker { display: none; }
.voice-advanced-settings > summary > svg:last-child { transition: transform 160ms ease; }
.voice-advanced-settings[open] > summary > svg:last-child { transform: rotate(180deg); }

.voice-advanced-settings-body {
  padding: 0 10px 10px;
  display: grid;
  gap: 8px;
}

.voice-advanced-settings .quality-toggle {
  min-height: 46px;
  border-radius: 11px;
}

.voice-advanced-settings .quality-toggle > span > span,
.voice-advanced-settings .quality-toggle strong,
.voice-advanced-settings .quality-toggle small {
  display: block;
}

.voice-advanced-settings .quality-toggle small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.voice-diagnostics {
  padding: 0;
  border: 0;
  background: transparent;
}

.voice-diagnostics > header {
  margin-bottom: 8px;
  padding: 0 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.voice-diagnostics > header > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
}

.voice-diagnostics > header i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
}

.voice-diagnostics-copy {
  min-width: 0;
  min-height: 28px;
  padding: 3px 7px;
  border: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font: inherit;
  font-size: 9px;
  font-weight: 800;
  background: transparent;
  cursor: pointer;
}

.voice-diagnostics-copy:hover,
.voice-diagnostics-copy:focus-visible {
  color: #c9f7d5;
  background: rgba(89, 217, 139, 0.08);
}

.voice-diagnostics-copy:focus-visible {
  outline: 2px solid rgba(89, 217, 139, 0.3);
  outline-offset: 1px;
}

.voice-diagnostics-copy svg {
  width: 13px;
  height: 13px;
}

.voice-diagnostics.success > header i { background: var(--green-2); box-shadow: 0 0 0 4px rgba(89, 217, 139, 0.1); }
.voice-diagnostics.warning > header i { background: var(--gold); }
.voice-diagnostics.danger > header i { background: #e1695c; }
.voice-diagnostics .stream-stats { margin: 0; }

.audio-device-field {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.audio-device-field > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.voice-device-picker {
  position: relative;
  min-width: 0;
}

.voice-device-picker.open {
  z-index: 80;
}

.voice-device-picker-trigger {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 10px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 9px;
  color: var(--text);
  text-align: left;
  background: #151a17;
  font: inherit;
  font-size: 12px;
  appearance: none;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.voice-device-picker-trigger:hover,
.voice-device-picker.open .voice-device-picker-trigger {
  border-color: rgba(89, 217, 139, 0.42);
  background: #19221b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.voice-device-picker-trigger:disabled {
  cursor: wait;
  opacity: 0.66;
}

.voice-device-picker-trigger > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-device-picker-trigger svg {
  width: 16px;
  height: 16px;
  color: #aeeabb;
}

.voice-device-picker-trigger svg:last-child {
  width: 14px;
  height: 14px;
  color: var(--muted);
  transition: transform 140ms ease;
}

.voice-device-picker.open .voice-device-picker-trigger svg:last-child {
  transform: rotate(180deg);
}

.voice-device-picker-panel {
  position: absolute;
  z-index: 90;
  top: calc(100% + 7px);
  left: 0;
  width: min(420px, calc(100vw - 32px));
  min-width: 100%;
  overflow: hidden;
  padding: 7px;
  border: 1px solid rgba(218, 231, 214, 0.16);
  border-radius: 12px;
  background: #111813;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.52);
}

.voice-device-picker.align-end .voice-device-picker-panel {
  right: 0;
  left: auto;
}

.voice-device-picker.open-up .voice-device-picker-panel {
  top: auto;
  bottom: calc(100% + 7px);
}

.voice-device-picker-panel > header {
  padding: 5px 7px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.voice-device-picker-panel > header strong {
  font-size: 11px;
}

.voice-device-picker-panel > header small {
  color: var(--muted);
  font-size: 9px;
}

.voice-device-picker-options {
  max-height: var(--voice-device-options-max-height, 286px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.voice-device-picker-options > button {
  width: 100%;
  min-height: 44px;
  padding: 6px 8px;
  border: 0;
  border-radius: 9px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 17px;
  align-items: center;
  gap: 9px;
  color: #dce2da;
  text-align: left;
  background: transparent;
  font: inherit;
  appearance: none;
  cursor: pointer;
}

.voice-device-picker-options > button:hover,
.voice-device-picker-options > button:focus-visible,
.voice-device-picker-options > button.active {
  background: #222a24;
}

.voice-device-picker-options > button.active {
  color: #a8efb8;
}

.voice-device-picker-options > button > i {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #b9c3b9;
  background: #262d27;
  font-style: normal;
}

.voice-device-picker-options svg {
  width: 15px;
  height: 15px;
}

.voice-device-picker-options span,
.voice-device-picker-options strong,
.voice-device-picker-options small {
  min-width: 0;
  overflow: hidden;
  display: block;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-device-picker-options strong {
  font-size: 11px;
}

.voice-device-picker-options small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.voice-device-picker-trigger:focus-visible,
.voice-device-picker-options > button:focus-visible {
  outline: 2px solid rgba(121, 226, 143, 0.72);
  outline-offset: 2px;
}

.audio-device-status {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.audio-device-status.error {
  color: #e7a097;
}

.audio-toggles {
  align-content: start;
}

.quality-toggle {
  min-width: 0;
  min-height: 84px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  color: var(--text);
  text-align: left;
  background: rgba(255, 255, 255, 0.055);
}

.quality-toggle.active,
.quality-toggle:hover {
  border-color: rgba(89, 217, 139, 0.42);
  background:
    linear-gradient(135deg, rgba(35, 163, 95, 0.2), rgba(213, 168, 50, 0.07)),
    rgba(35, 163, 95, 0.1);
}

.quality-toggle > span {
  min-width: 0;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  column-gap: 8px;
  row-gap: 2px;
  align-items: center;
}

.quality-toggle svg {
  grid-row: span 2;
  width: 20px;
  height: 20px;
  color: var(--green-2);
}

.quality-toggle strong,
.quality-toggle small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quality-toggle strong {
  font-size: 12px;
}

.quality-toggle small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.quality-hint {
  padding: 10px 11px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.quality-hint strong,
.quality-hint span {
  display: block;
}

.quality-hint strong {
  color: var(--green-2);
  font-size: 10px;
  font-weight: 900;
}

.quality-hint span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.platform-modal {
  width: min(420px, calc(100vw - 34px));
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(24, 26, 23, 0.98);
  box-shadow: var(--shadow);
}

.platform-modal header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.platform-modal header strong,
.platform-modal header span {
  display: block;
}

.platform-modal header strong {
  font-size: 18px;
}

.platform-modal header span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.platform-modal-form {
  display: grid;
  gap: 14px;
}

.platform-modal-form .button {
  min-height: 46px;
}

.modal-warning {
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(216, 93, 84, 0.32);
  border-radius: var(--radius);
  color: #ffd5d1;
  background: rgba(216, 93, 84, 0.1);
  font-size: 13px;
  line-height: 1.45;
}

.direct-delete-modal {
  width: min(460px, calc(100vw - 34px));
}

.direct-delete-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.direct-delete-actions .button {
  min-width: 0;
  padding-inline: 10px;
}

.direct-delete-actions .button:disabled {
  cursor: wait;
}

.direct-delete-actions .button[aria-disabled="true"] {
  cursor: wait;
}

.direct-delete-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.profile-modal {
  width: min(440px, calc(100vw - 34px));
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(24, 26, 23, 0.98);
  box-shadow: var(--shadow);
}

.profile-modal header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.profile-preview {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-preview .avatar {
  width: 52px;
  height: 52px;
  font-size: 16px;
}

.profile-preview strong,
.profile-preview span {
  display: block;
}

.profile-preview strong {
  font-size: 18px;
}

.profile-preview span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.profile-form {
  display: grid;
  gap: 14px;
}

.profile-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.profile-state {
  min-height: 54px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.profile-state svg {
  width: 20px;
  height: 20px;
  animation: spin 900ms linear infinite;
}

.profile-state.error {
  color: #ffd5d1;
}

.profile-card-backdrop {
  background:
    radial-gradient(circle at 30% 18%, rgba(89, 217, 139, 0.12), transparent 34%),
    rgba(5, 6, 5, 0.86);
}

.profile-card {
  position: relative;
  width: min(460px, calc(100vw - 34px));
  max-height: calc(var(--app-height, 100dvh) - 32px);
  padding: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(89, 217, 139, 0.22);
  background:
    linear-gradient(145deg, rgba(30, 38, 30, 0.98), rgba(18, 20, 17, 0.98) 56%, rgba(12, 14, 12, 0.98)),
    rgba(24, 26, 23, 0.98);
  box-shadow:
    0 26px 80px rgba(0, 0, 0, 0.56),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.profile-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(89, 217, 139, 0.12), transparent 45%),
    radial-gradient(circle at 18% 12%, rgba(213, 168, 50, 0.12), transparent 34%);
}

.profile-card > * {
  position: relative;
  z-index: 1;
}

.profile-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 38px;
  min-height: 38px;
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.045);
}

.profile-hero {
  min-height: 132px;
  padding: 24px 66px 18px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.profile-avatar-wrap {
  position: relative;
  width: 84px;
  min-height: 88px;
  display: grid;
  justify-items: center;
}

.profile-avatar-wrap .avatar {
  width: 76px;
  height: 76px;
  border: 1px solid rgba(89, 217, 139, 0.24);
  border-radius: 18px;
  font-size: 20px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
}

.profile-avatar-wrap .avatar img {
  border-radius: inherit;
}

.profile-avatar-tools {
  position: absolute;
  left: 50%;
  bottom: -8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transform: translateX(-50%);
}

.profile-avatar-tools .profile-avatar-action {
  width: 24px;
  min-width: 24px;
  max-width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border-color: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: rgba(247, 241, 223, 0.86);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02)),
    rgba(10, 12, 10, 0.92);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  flex: 0 0 24px;
}

.profile-avatar-tools .profile-avatar-action:hover:not(:disabled) {
  border-color: rgba(89, 217, 139, 0.44);
  color: #dfffe5;
  background:
    linear-gradient(145deg, rgba(89, 217, 139, 0.16), rgba(255, 255, 255, 0.035)),
    rgba(10, 12, 10, 0.95);
}

.profile-avatar-tools .profile-avatar-delete {
  border-color: rgba(216, 93, 84, 0.24);
  color: #ffb9b4;
  background:
    linear-gradient(145deg, rgba(216, 93, 84, 0.12), rgba(255, 255, 255, 0.018)),
    rgba(13, 12, 11, 0.92);
}

.profile-avatar-tools .profile-avatar-delete:hover:not(:disabled) {
  border-color: rgba(216, 93, 84, 0.38);
  color: #ffd6d2;
  background:
    linear-gradient(145deg, rgba(216, 93, 84, 0.18), rgba(255, 255, 255, 0.035)),
    rgba(10, 12, 10, 0.95);
}

.profile-avatar-tools .profile-avatar-action:disabled {
  opacity: 0.48;
  cursor: default;
}

.profile-avatar-tools .profile-avatar-action svg {
  width: 13px;
  height: 13px;
}

.profile-avatar-tools .profile-avatar-action .lucide-loader-2 {
  animation: spin 900ms linear infinite;
}

.profile-avatar-pick {
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.profile-avatar-pick input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}

.profile-main {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.profile-name-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-name {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  color: var(--text);
  font-size: 22px;
  font-weight: 950;
  line-height: 1.1;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.profile-online-dot {
  position: relative;
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 999px;
  background: rgba(247, 241, 223, 0.32);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.profile-online-dot.online {
  background: #79e28f;
  box-shadow:
    0 0 0 2px rgba(89, 217, 139, 0.13),
    0 0 12px rgba(89, 217, 139, 0.32);
}

.profile-online-dot.online::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 1px solid rgba(121, 226, 143, 0.26);
  animation: profileOnlinePulse 2.8s ease-out infinite;
}

.profile-status {
  min-width: 0;
  display: grid;
}

.profile-email {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.profile-email {
  color: rgba(247, 241, 223, 0.58);
}

.profile-email.workspace-avatar-error {
  color: #ffaaa2;
  font-weight: 850;
  text-transform: lowercase;
}

.profile-content {
  min-height: 0;
  padding: 16px 18px 18px;
  overflow: hidden auto;
  overscroll-behavior: contain;
  background: rgba(0, 0, 0, 0.12);
}

.profile-public,
.profile-edit-form {
  display: grid;
  gap: 14px;
}

.profile-name-policy {
  min-height: 44px;
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border: 1px solid rgba(89, 217, 139, 0.14);
  border-radius: 13px;
  color: rgba(213, 255, 223, 0.78);
  background: rgba(89, 217, 139, 0.05);
}

.profile-name-policy.exhausted {
  border-color: rgba(213, 168, 50, 0.2);
  color: #efcf82;
  background: rgba(213, 168, 50, 0.055);
}

.profile-name-policy > span {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  display: grid;
  place-items: center;
}

.profile-name-policy > span svg {
  width: 15px;
  height: 15px;
}

.profile-name-policy > span .lucide-loader-2 {
  animation: spin 0.9s linear infinite;
}

.profile-name-policy > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.profile-name-policy strong {
  font-size: 12px;
  line-height: 1.25;
}

.profile-name-policy small {
  color: rgba(247, 241, 223, 0.5);
  font-size: 11px;
  line-height: 1.3;
}

.profile-name-policy small.error {
  color: #f4aaa2;
}

.profile-name-history {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.022);
}

.profile-name-history-toggle {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(247, 241, 223, 0.8);
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.profile-name-history-toggle > span {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-name-history-toggle svg {
  width: 15px;
  height: 15px;
  color: rgba(142, 230, 170, 0.72);
}

.profile-name-history-toggle strong {
  font-size: 12px;
}

.profile-name-history-toggle small {
  min-width: 19px;
  padding: 2px 5px;
  border-radius: 999px;
  color: rgba(247, 241, 223, 0.54);
  background: rgba(255, 255, 255, 0.055);
  font-size: 10px;
  text-align: center;
}

.profile-name-history-list {
  max-height: 188px;
  padding: 2px 10px 10px;
  overflow-y: auto;
  display: grid;
  gap: 4px;
}

.profile-name-history-row {
  min-width: 0;
  min-height: 34px;
  padding: 7px 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  border-radius: 9px;
  color: rgba(247, 241, 223, 0.56);
  background: rgba(0, 0, 0, 0.12);
  font-size: 11px;
}

.profile-name-history-row > span,
.profile-name-history-row > strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.profile-name-history-row > strong {
  color: rgba(247, 241, 223, 0.86);
}

.profile-name-history-row > svg {
  width: 11px;
  height: 11px;
  color: rgba(142, 230, 170, 0.48);
}

.profile-name-history-row > time {
  color: rgba(247, 241, 223, 0.4);
  font-size: 10px;
  white-space: nowrap;
}

.profile-identity-card {
  position: relative;
  min-width: 0;
  border: 1px solid rgba(89, 217, 139, 0.16);
  border-radius: 15px;
  color: rgba(228, 255, 234, 0.86);
  background:
    radial-gradient(circle at 12% 0%, rgba(89, 217, 139, 0.12), transparent 42%),
    rgba(8, 14, 10, 0.72);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
}

.profile-identity-card.frequent {
  border-color: rgba(213, 168, 50, 0.24);
  color: #f3d889;
  background:
    radial-gradient(circle at 12% 0%, rgba(213, 168, 50, 0.13), transparent 42%),
    rgba(14, 13, 7, 0.76);
}

.profile-identity-card > summary {
  list-style: none;
}

.profile-identity-card > summary::-webkit-details-marker {
  display: none;
}

.profile-identity-summary {
  min-width: 0;
  min-height: 62px;
  padding: 11px 12px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

details.profile-identity-card > .profile-identity-summary {
  cursor: pointer;
}

.profile-identity-icon {
  width: 38px;
  height: 38px;
  border: 1px solid currentColor;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: rgba(170, 239, 187, 0.82);
  background: rgba(89, 217, 139, 0.08);
  opacity: 0.9;
}

.profile-identity-card.frequent .profile-identity-icon {
  color: rgba(240, 204, 109, 0.9);
  background: rgba(213, 168, 50, 0.08);
}

.profile-identity-icon svg {
  width: 18px;
  height: 18px;
}

.profile-identity-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.profile-identity-copy strong {
  overflow: hidden;
  color: currentColor;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.profile-identity-copy small {
  overflow: hidden;
  color: rgba(247, 241, 223, 0.5);
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.profile-identity-copy small b {
  color: rgba(247, 241, 223, 0.72);
  font-weight: 760;
}

.profile-identity-recent {
  grid-column: 2;
  width: max-content;
  max-width: 100%;
  margin-top: -5px;
  padding: 2px 6px;
  border-radius: 999px;
  color: rgba(247, 241, 223, 0.46);
  background: rgba(255, 255, 255, 0.045);
  font-size: 9px;
  font-weight: 760;
}

.profile-identity-history-hint {
  grid-column: 3;
  grid-row: 1 / span 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(247, 241, 223, 0.44);
  font-size: 10px;
  font-weight: 780;
  white-space: nowrap;
}

.profile-identity-history-hint svg {
  width: 14px;
  height: 14px;
  transition: transform 160ms ease;
}

.profile-identity-card[open] .profile-identity-history-hint svg {
  transform: rotate(180deg);
}

.profile-public-name-history {
  padding: 0 10px 10px;
  display: grid;
  gap: 4px;
}

.profile-public-name-history-row {
  min-width: 0;
  min-height: 34px;
  padding: 7px 8px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  border-radius: 9px;
  color: rgba(247, 241, 223, 0.5);
  background: rgba(0, 0, 0, 0.18);
  font-size: 11px;
}

.profile-public-name-history-row > span,
.profile-public-name-history-row > strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.profile-public-name-history-row > strong {
  color: rgba(247, 241, 223, 0.84);
}

.profile-public-name-history-row > svg {
  width: 11px;
  height: 11px;
  color: rgba(142, 230, 170, 0.48);
}

.profile-identity-card.frequent .profile-public-name-history-row > svg {
  color: rgba(240, 204, 109, 0.54);
}

.profile-public-name-history-row > time {
  color: rgba(247, 241, 223, 0.36);
  font-size: 10px;
  white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
  details.profile-identity-card:not([open]):hover > .profile-public-name-history,
  details.profile-identity-card:not([open]):focus-within > .profile-public-name-history {
    display: grid;
  }
}

.profile-own {
  display: grid;
  gap: 12px;
}

.profile-tabbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  scroll-snap-type: inline proximity;
}

.profile-tabbar::-webkit-scrollbar {
  display: none;
}

.profile-tab-button {
  width: 40px;
  flex: 0 0 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 12px;
  color: rgba(247, 241, 223, 0.68);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: none;
  scroll-snap-align: nearest;
}

.profile-tab-button svg {
  width: 18px;
  height: 18px;
}

.profile-tab-button:hover:not(:disabled),
.profile-tab-button.active {
  border-color: rgba(89, 217, 139, 0.34);
  color: #d8ffe1;
  background:
    linear-gradient(145deg, rgba(89, 217, 139, 0.14), rgba(213, 168, 50, 0.035)),
    rgba(255, 255, 255, 0.045);
}

.profile-tab-panel {
  min-width: 0;
}

.profile-interface-panel {
  display: grid;
  gap: 12px;
}

.profile-player-modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.profile-player-mode {
  min-width: 0;
  min-height: 92px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 15px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 10px;
  color: rgba(247, 241, 223, 0.72);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    rgba(7, 10, 8, 0.68);
  text-align: left;
}

.profile-player-mode:hover {
  border-color: rgba(89, 217, 139, 0.25);
  background: rgba(89, 217, 139, 0.055);
}

.profile-player-mode.active {
  border-color: rgba(113, 239, 157, 0.52);
  color: var(--text);
  background:
    radial-gradient(circle at 0 0, rgba(113, 239, 157, 0.16), transparent 54%),
    rgba(23, 40, 29, 0.82);
  box-shadow: inset 0 0 0 1px rgba(113, 239, 157, 0.08);
}

.profile-player-mode-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: rgba(247, 241, 223, 0.56);
  background: rgba(255, 255, 255, 0.055);
}

.profile-player-mode.active .profile-player-mode-icon {
  color: #c6ffd5;
  background: rgba(89, 217, 139, 0.13);
}

.profile-player-mode-icon svg { width: 18px; height: 18px; }

.profile-player-mode > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.profile-player-mode strong {
  font-size: 13px;
}

.profile-player-mode small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.profile-player-mode > i {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #07150b;
  background: var(--green-2);
}

.profile-player-mode > i:empty { background: transparent; }
.profile-player-mode > i svg { width: 14px; height: 14px; }

@media (max-width: 560px) {
  .profile-player-modes { grid-template-columns: 1fr; }
  .profile-player-mode { min-height: 78px; }
}

.profile-security-panel {
  display: grid;
  gap: 10px;
}

.profile-account-delete-card {
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid rgba(216, 93, 84, 0.14);
  border-radius: 14px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  background:
    linear-gradient(145deg, rgba(216, 93, 84, 0.045), transparent 70%),
    rgba(255, 255, 255, 0.022);
}

.profile-account-delete-icon {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(216, 93, 84, 0.18);
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: rgba(255, 176, 168, 0.72);
  background: rgba(216, 93, 84, 0.065);
}

.profile-account-delete-icon svg {
  width: 17px;
  height: 17px;
}

.profile-account-delete-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.profile-account-delete-copy strong {
  color: rgba(247, 241, 223, 0.76);
  font-size: 13px;
}

.profile-account-delete-copy small {
  color: rgba(247, 241, 223, 0.42);
  font-size: 10px;
  line-height: 1.3;
}

.profile-account-delete-card > .button {
  min-height: 36px;
  padding-inline: 11px;
  color: rgba(255, 184, 177, 0.8);
  font-size: 11px;
  box-shadow: none;
}

.profile-deleted-state {
  min-height: 92px;
  padding: 14px;
  border: 1px solid rgba(197, 203, 198, 0.12);
  border-radius: 14px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.028);
}

.profile-deleted-state > span {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: rgba(221, 224, 219, 0.55);
  background: rgba(197, 203, 198, 0.07);
}

.profile-deleted-state > span svg {
  width: 19px;
  height: 19px;
}

.profile-deleted-state > div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.profile-deleted-state strong {
  color: rgba(222, 225, 220, 0.7);
  font-size: 14px;
}

.profile-deleted-state small {
  color: rgba(222, 225, 220, 0.44);
  font-size: 11px;
  line-height: 1.45;
}

.account-deletion-backdrop {
  z-index: 98;
  padding: 18px;
  background:
    radial-gradient(circle at 50% 28%, rgba(216, 93, 84, 0.1), transparent 34%),
    rgba(4, 5, 4, 0.9);
}

.account-deletion-dialog {
  width: min(452px, calc(100vw - 36px));
  max-height: min(720px, calc(100dvh - 36px));
  border: 1px solid rgba(216, 93, 84, 0.28);
  border-radius: 18px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 0 0, rgba(216, 93, 84, 0.1), transparent 34%),
    linear-gradient(145deg, rgba(27, 29, 26, 0.99), rgba(12, 14, 12, 0.99));
  box-shadow:
    0 28px 84px rgba(0, 0, 0, 0.64),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.account-deletion-dialog > header {
  min-height: 76px;
  padding: 15px 15px 15px 17px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 11px;
}

.account-deletion-dialog > header > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.account-deletion-dialog > header strong {
  font-size: 17px;
  line-height: 1.15;
}

.account-deletion-dialog > header small {
  color: rgba(247, 241, 223, 0.46);
  font-size: 11px;
}

.account-deletion-title-icon {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(216, 93, 84, 0.23);
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #ffaaa2;
  background: rgba(216, 93, 84, 0.1);
}

.account-deletion-title-icon svg {
  width: 20px;
  height: 20px;
}

.account-deletion-dialog > header > .button {
  width: 40px;
  min-width: 40px;
  min-height: 40px;
}

.account-deletion-body {
  min-height: 0;
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: grid;
  gap: 12px;
}

.account-deletion-body > p {
  margin: 0;
  color: rgba(247, 241, 223, 0.66);
  font-size: 12px;
  line-height: 1.55;
}

.account-deletion-body > .account-deletion-reuse-note {
  color: rgba(247, 241, 223, 0.45);
}

.account-deletion-blocker {
  padding: 11px;
  border: 1px solid rgba(213, 168, 50, 0.24);
  border-radius: 13px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  color: #f3d884;
  background: rgba(213, 168, 50, 0.075);
}

.account-deletion-blocker > span {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(213, 168, 50, 0.1);
}

.account-deletion-blocker > span svg {
  width: 16px;
  height: 16px;
}

.account-deletion-blocker > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.account-deletion-blocker strong {
  color: #f8e4a5;
  font-size: 12px;
}

.account-deletion-blocker small,
.account-deletion-blocker li {
  color: rgba(247, 230, 178, 0.65);
  font-size: 10px;
  line-height: 1.4;
}

.account-deletion-blocker ul {
  margin: 3px 0 0;
  padding-left: 16px;
}

.account-deletion-blocker .account-deletion-workspaces {
  margin: 7px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
  list-style: none;
}

.account-deletion-workspaces li {
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(213, 168, 50, 0.16);
  border-radius: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  background: rgba(6, 8, 6, 0.23);
}

.account-deletion-workspaces li > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.account-deletion-workspaces li strong,
.account-deletion-workspaces li small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-deletion-workspaces .button,
.account-deletion-refresh {
  min-height: 34px;
  padding-inline: 9px;
  color: rgba(247, 230, 178, 0.82);
  font-size: 10px;
}

.account-deletion-refresh {
  width: fit-content;
  margin-top: 3px;
}

.account-deletion-inline-error,
.account-deletion-state {
  min-height: 46px;
  padding: 10px 11px;
  border: 1px solid rgba(216, 93, 84, 0.22);
  border-radius: 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #ffc2bd;
  background: rgba(216, 93, 84, 0.075);
  font-size: 11px;
}

.account-deletion-inline-error svg,
.account-deletion-state svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.account-deletion-state {
  margin: 16px;
  justify-content: center;
}

.account-deletion-state.loading {
  color: var(--muted);
  border-color: rgba(255, 255, 255, 0.075);
  background: rgba(255, 255, 255, 0.03);
}

.account-deletion-state.loading svg,
.account-deletion-actions .lucide-loader-2 {
  animation: spin 900ms linear infinite;
}

.account-deletion-state.error {
  flex-wrap: wrap;
}

.account-deletion-state.error .button {
  margin-left: auto;
}

.account-deletion-form {
  padding-top: 2px;
  display: grid;
  gap: 11px;
}

.account-deletion-form .field {
  gap: 7px;
  font-size: 11px;
}

.account-deletion-form .input,
.account-deletion-form input {
  width: 100%;
}

.account-deletion-confirm-field input {
  letter-spacing: 0.06em;
  font-weight: 850;
}

.account-deletion-email-summary {
  padding: 11px;
  border: 1px solid rgba(89, 217, 139, 0.2);
  border-radius: 12px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  background: rgba(89, 217, 139, 0.07);
}

.account-deletion-email-summary > span:first-child {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: rgba(89, 217, 139, 0.1);
}

.account-deletion-email-summary > span:last-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.account-deletion-email-summary strong {
  overflow: hidden;
  color: rgba(247, 241, 223, 0.82);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-deletion-email-summary small {
  color: rgba(247, 241, 223, 0.47);
  font-size: 10px;
  line-height: 1.4;
}

.account-deletion-code-field input {
  min-height: 52px;
  font-size: 22px;
  font-weight: 850;
  letter-spacing: 0.24em;
  text-align: center;
}

.account-deletion-resend-row {
  min-height: 34px;
  display: flex;
  justify-content: flex-start;
}

.account-deletion-resend-row .button {
  min-height: 34px;
  padding-inline: 9px;
  color: rgba(247, 241, 223, 0.58);
  font-size: 10px;
}

.account-deletion-actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 8px;
  padding-top: 3px;
}

.account-deletion-actions .button {
  min-height: 44px;
  justify-content: center;
}

.account-deletion-email-form .account-deletion-actions {
  grid-template-columns: 0.8fr 0.9fr 1.45fr;
}

.account-deletion-body > .account-deletion-actions {
  grid-template-columns: 1fr;
}

.profile-setting-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(89, 217, 139, 0.09), rgba(213, 168, 50, 0.025)),
    rgba(255, 255, 255, 0.035);
}

.profile-setting-card.expanded {
  border-color: rgba(89, 217, 139, 0.26);
  box-shadow: inset 0 0 0 1px rgba(89, 217, 139, 0.08);
}

.profile-setting-head {
  width: 100%;
  min-height: 58px;
  padding: 10px;
  border: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
  color: rgba(247, 241, 223, 0.78);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.profile-setting-head:hover {
  background: rgba(255, 255, 255, 0.035);
}

.profile-setting-icon,
.profile-setting-chevron {
  display: grid;
  place-items: center;
}

.profile-setting-icon {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(89, 217, 139, 0.2);
  border-radius: 12px;
  color: #baf6c7;
  background: rgba(89, 217, 139, 0.08);
}

.profile-setting-icon svg {
  width: 18px;
  height: 18px;
}

.profile-setting-icon .lucide-loader-2 {
  animation: spin 900ms linear infinite;
}

.profile-setting-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
  align-content: center;
}

.profile-setting-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.profile-setting-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: lowercase;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.profile-setting-chevron {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 10px;
  color: rgba(247, 241, 223, 0.62);
  background: rgba(255, 255, 255, 0.035);
}

.profile-setting-chevron svg {
  width: 16px;
  height: 16px;
}

.profile-password-form {
  padding: 0 10px 12px;
  display: grid;
  gap: 10px;
}

.profile-password-field {
  gap: 7px;
  font-size: 11px;
}

.profile-password-label {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.profile-password-label > span:first-child {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.profile-password-hint {
  min-width: 0;
  flex: 1 1 auto;
  color: #ffaaa2;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-align: right;
  text-transform: lowercase;
  white-space: nowrap;
}

.profile-password-hint[hidden] {
  display: none;
}

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

.profile-password-input-wrap .input {
  width: 100%;
  padding-right: 42px;
}

.button.icon.profile-password-visibility {
  position: absolute;
  top: 50%;
  right: 9px;
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  border-radius: 8px;
  transform: translateY(-50%);
}

.button.icon.profile-password-visibility:hover:not(:disabled) {
  transform: translateY(-50%);
}

.button.icon.profile-password-visibility:active:not(:disabled) {
  transform: translateY(calc(-50% + 1px));
}

.button.icon.profile-password-visibility svg {
  width: 13px;
  height: 13px;
}

.profile-form-message {
  padding: 0 2px;
  font-size: 12px;
  font-weight: 900;
}

.profile-form-message.error {
  color: #ffc2bd;
}

.profile-form-message.success {
  color: #c9ffd5;
}

.profile-password-form .profile-primary-action {
  margin-top: 2px;
}

.two-factor-card.enabled .profile-setting-icon {
  border-color: rgba(89, 217, 139, 0.38);
  color: #d1ffda;
  background: rgba(89, 217, 139, 0.15);
}

.two-factor-content {
  padding: 0 10px 12px;
}

.two-factor-content > .profile-password-form,
.two-factor-content .profile-password-form {
  padding: 0;
}

.two-factor-loading,
.two-factor-unavailable,
.two-factor-card-error {
  min-height: 42px;
  padding: 10px 11px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.two-factor-loading svg,
.two-factor-unavailable svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--green-2);
}

.two-factor-loading svg {
  animation: spin 900ms linear infinite;
}

.two-factor-card-error {
  margin-top: 9px;
  border: 1px solid rgba(216, 93, 84, 0.24);
  color: #ffc2bd;
  background: rgba(216, 93, 84, 0.08);
}

.two-factor-explainer {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.two-factor-setup {
  display: grid;
  gap: 12px;
}

.two-factor-qr-card {
  padding: 10px;
  border: 1px solid rgba(89, 217, 139, 0.17);
  border-radius: 12px;
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  background: rgba(6, 9, 7, 0.48);
}

.two-factor-qr-card img {
  width: 116px;
  height: 116px;
  border-radius: 9px;
  display: block;
  background: #fff;
}

.two-factor-setup-copy {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.two-factor-setup-copy strong {
  font-size: 14px;
}

.two-factor-setup-copy small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.two-factor-secret {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  cursor: pointer;
  color: #d7f8dd;
  background: rgba(255, 255, 255, 0.035);
}

.two-factor-secret code {
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.two-factor-secret svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.two-factor-code-input {
  font-size: 19px;
  font-weight: 850;
  text-align: center;
}

.two-factor-inline-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.two-factor-inline-actions .button {
  min-height: 38px;
}

.two-factor-status-line {
  min-height: 56px;
  padding: 10px;
  border: 1px solid rgba(89, 217, 139, 0.18);
  border-radius: 11px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  background: rgba(89, 217, 139, 0.065);
}

.two-factor-status-icon,
.two-factor-success-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #caffd5;
  background: rgba(89, 217, 139, 0.14);
}

.two-factor-status-icon svg,
.two-factor-success-mark svg {
  width: 17px;
  height: 17px;
}

.two-factor-status-line > span:nth-child(2),
.two-factor-backup-head > span:last-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.two-factor-status-line small,
.two-factor-backup-head small {
  color: var(--muted);
  font-size: 11px;
}

.two-factor-status-pill {
  padding: 4px 7px;
  border-radius: 999px;
  color: #caffd5;
  font-size: 10px;
  font-weight: 850;
  background: rgba(89, 217, 139, 0.14);
}

.two-factor-enabled,
.two-factor-backup-panel {
  display: grid;
  gap: 10px;
}

.two-factor-backup-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

.two-factor-backup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.two-factor-backup-grid code {
  padding: 8px 9px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 8px;
  color: #e9f8e8;
  font-size: 11px;
  text-align: center;
  background: rgba(3, 5, 4, 0.45);
}

.auth-two-factor .auth-two-factor-orbit {
  color: #d5ffdf;
}

.auth-two-factor .auth-code-input {
  letter-spacing: 0.12em;
}

.profile-connection {
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid rgba(89, 217, 139, 0.14);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(247, 241, 223, 0.66);
  background: rgba(89, 217, 139, 0.055);
  font-size: 13px;
}

.profile-connection svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--green-2);
}

.profile-public-region {
  min-width: 0;
  display: grid;
}

.profile-public-region:empty,
.profile-shared-workspaces:empty {
  display: none;
}

.profile-shared-workspaces {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(89, 217, 139, 0.14);
  border-radius: 15px;
  display: grid;
  gap: 11px;
  background:
    radial-gradient(circle at 0% 0%, rgba(89, 217, 139, 0.1), transparent 44%),
    rgba(7, 11, 8, 0.52);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
}

.profile-shared-workspaces-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}

.profile-shared-workspaces-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.profile-shared-workspaces-title > span {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 1px solid rgba(89, 217, 139, 0.16);
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--green-2);
  background: rgba(89, 217, 139, 0.11);
}

.profile-shared-workspaces-title > span svg {
  width: 18px;
  height: 18px;
}

.profile-shared-workspaces-title > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.profile-shared-workspaces-head strong {
  color: rgba(247, 241, 223, 0.92);
  font-size: 14px;
  line-height: 1.2;
}

.profile-shared-workspaces-head small {
  color: rgba(247, 241, 223, 0.5);
  font-size: 11px;
  line-height: 1.2;
}

.profile-shared-workspaces-count {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid rgba(89, 217, 139, 0.15);
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: rgba(202, 255, 215, 0.82);
  background: rgba(89, 217, 139, 0.09);
  font-size: 11px;
  font-weight: 900;
}

.profile-shared-workspace-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
  gap: 7px;
}

.profile-shared-workspace {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 7px 9px 7px 7px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 12px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 9px;
  color: rgba(247, 241, 223, 0.88);
  text-align: left;
  background: rgba(4, 7, 5, 0.36);
  cursor: pointer;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    transform 150ms ease;
}

.profile-shared-workspace:hover,
.profile-shared-workspace:focus-visible {
  border-color: rgba(121, 226, 143, 0.26);
  background: rgba(89, 217, 139, 0.085);
}

.profile-shared-workspace:active {
  transform: translateY(1px);
}

.profile-shared-workspace > span:nth-child(2) {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 760;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.profile-shared-workspace > svg {
  width: 15px;
  height: 15px;
  color: rgba(247, 241, 223, 0.42);
}

.profile-shared-workspace-avatar {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(121, 226, 143, 0.15);
  border-radius: 10px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #d7ffe0;
  font-size: 10px;
  font-weight: 900;
  background: rgba(89, 217, 139, 0.1);
}

.profile-shared-workspace-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.profile-actions {
  display: flex;
  justify-content: stretch;
  gap: 10px;
}

.profile-public-actions {
  display: grid;
  gap: 6px;
}

.profile-primary-action {
  width: 100%;
  min-height: 44px;
  justify-content: center;
}

.profile-contact-action,
.profile-block-action {
  width: 100%;
  min-height: 42px;
  justify-content: center;
}

.profile-contact-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.profile-contact-choice .button {
  min-height: 42px;
  justify-content: center;
}

.profile-public-actions .profile-block-action {
  width: max-content;
  min-height: 34px;
  padding-inline: 10px;
  justify-self: center;
  border-color: transparent;
  color: rgba(240, 155, 148, 0.66);
  background: transparent;
  font-size: 11px;
}

.profile-public-actions .profile-block-action:hover,
.profile-public-actions .profile-block-action:focus-visible {
  border-color: rgba(216, 93, 84, 0.18);
  color: #ffb7b0;
  background: rgba(216, 93, 84, 0.055);
}

.profile-sessions {
  display: grid;
}

.profile-session-content {
  min-height: 0;
  padding: 0 10px 12px;
  display: grid;
  gap: 10px;
}

.profile-section-head {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.profile-section-head span {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(247, 241, 223, 0.82);
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
}

.profile-section-head svg {
  width: 17px;
  height: 17px;
  color: var(--green-2);
}

.profile-session-list {
  max-height: clamp(180px, calc(var(--app-height, 100dvh) - 330px), 420px);
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 8px;
  overflow: hidden auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.profile-session-group-label {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 6px 5px;
  color: rgba(151, 220, 163, 0.64);
  background: transparent;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-session-group-label::after {
  content: "";
  height: 1px;
  flex: 1 1 auto;
  background: linear-gradient(
    90deg,
    rgba(89, 217, 139, 0.16),
    rgba(89, 217, 139, 0)
  );
}

.profile-session-row {
  min-height: 58px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 12px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.profile-session-row .profile-session-confirm.inline {
  grid-column: 1 / -1;
  margin-top: 2px;
}

.profile-session-row.current {
  border-color: rgba(89, 217, 139, 0.3);
  background:
    linear-gradient(135deg, rgba(89, 217, 139, 0.12), rgba(89, 217, 139, 0.035)),
    rgba(255, 255, 255, 0.035);
}

.profile-session-icon {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(89, 217, 139, 0.18);
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #baf6c7;
  background: rgba(89, 217, 139, 0.08);
}

.profile-session-icon svg {
  width: 18px;
  height: 18px;
}

.profile-session-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.profile-session-main strong,
.profile-session-main small {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.profile-session-main strong {
  color: var(--text);
  font-size: 13px;
}

.profile-session-main small {
  color: var(--muted);
  font-size: 12px;
}

.profile-session-badge {
  padding: 5px 8px;
  border: 1px solid rgba(89, 217, 139, 0.25);
  border-radius: 999px;
  color: #bdf9ca;
  background: rgba(89, 217, 139, 0.1);
  font-size: 11px;
  font-weight: 900;
}

.profile-session-row .button.danger.ghost {
  color: #ffb7b1;
  border-color: rgba(216, 93, 84, 0.22);
  background: rgba(216, 93, 84, 0.08);
  box-shadow: none;
}

.profile-session-row .button.danger.ghost:hover:not(:disabled) {
  background: rgba(216, 93, 84, 0.16);
}

.profile-session-state,
.profile-session-error {
  min-height: 44px;
  padding: 10px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
  text-align: center;
}

.profile-session-state svg,
.profile-session-confirm .lucide-loader-2,
.profile-session-load-more .lucide-loader-2 {
  animation: spin 900ms linear infinite;
}

.profile-session-error {
  color: #ffd5d1;
  background: rgba(216, 93, 84, 0.08);
}

.profile-logout-all {
  min-height: 40px;
  justify-content: center;
  color: #ffbbb5;
  border-color: rgba(216, 93, 84, 0.22);
  background: rgba(216, 93, 84, 0.075);
  box-shadow: none;
}

.profile-session-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
  background: linear-gradient(transparent, rgba(19, 22, 18, 0.98) 24%);
}

.profile-session-load-more {
  min-height: 40px;
  justify-content: center;
}

.profile-session-refresh {
  width: 40px;
  min-width: 40px;
  min-height: 40px;
}

.profile-session-refresh .lucide-loader-2 {
  animation: spin 900ms linear infinite;
}

.profile-session-confirm {
  padding: 12px;
  border: 1px solid rgba(216, 93, 84, 0.25);
  border-radius: 12px;
  display: grid;
  gap: 8px;
  background:
    linear-gradient(135deg, rgba(216, 93, 84, 0.14), rgba(216, 93, 84, 0.055)),
    rgba(0, 0, 0, 0.16);
}

.profile-session-confirm strong {
  color: #fff0ed;
  font-size: 14px;
}

.profile-session-confirm small {
  color: rgba(247, 241, 223, 0.58);
  font-size: 12px;
}

.profile-session-confirm div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.profile-state.loading {
  min-height: 92px;
}

.profile-state.error {
  min-height: 74px;
  padding: 12px;
  border: 1px solid rgba(216, 93, 84, 0.22);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(216, 93, 84, 0.08);
  text-align: center;
}

.profile-state.error svg {
  animation: none;
}

.avatar-upload {
  min-height: 76px;
  border: 1px dashed rgba(89, 217, 139, 0.35);
  border-radius: var(--radius);
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px;
  cursor: pointer;
  background: rgba(35, 163, 95, 0.07);
}

.avatar-upload span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 850;
}

.avatar-upload svg {
  width: 18px;
  height: 18px;
}

.avatar-upload small {
  color: var(--muted);
  font-size: 12px;
}

.avatar-upload input {
  width: 100%;
  color: var(--muted);
  font-size: 12px;
}

.room-avatar-upload {
  position: relative;
  min-height: 58px;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  align-content: center;
  gap: 10px;
  padding: 10px 12px;
  border-style: solid;
  background:
    linear-gradient(145deg, rgba(35, 163, 95, 0.11), rgba(213, 168, 50, 0.04)),
    rgba(255, 255, 255, 0.025);
}

.room-avatar-upload:hover {
  border-color: rgba(89, 217, 139, 0.58);
  background:
    linear-gradient(145deg, rgba(35, 163, 95, 0.16), rgba(213, 168, 50, 0.06)),
    rgba(255, 255, 255, 0.035);
}

.room-avatar-upload .room-avatar-preview {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(89, 217, 139, 0.12);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(89, 217, 139, 0.24);
}

.room-avatar-upload .room-avatar-preview svg {
  width: 18px;
  height: 18px;
}

.room-avatar-upload .room-avatar-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
  font-weight: 850;
}

.room-avatar-upload .room-avatar-copy strong,
.room-avatar-upload .room-avatar-copy small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.room-avatar-upload .room-avatar-copy strong {
  font-size: 14px;
}

.room-avatar-upload .room-avatar-copy small {
  color: var(--muted);
  font-size: 11px;
}

.room-avatar-upload.file-selected {
  border-color: rgba(89, 217, 139, 0.7);
  background:
    linear-gradient(145deg, rgba(35, 163, 95, 0.18), rgba(213, 168, 50, 0.06)),
    rgba(255, 255, 255, 0.035);
}

.room-avatar-upload.file-selected .room-avatar-copy small {
  color: rgba(198, 255, 215, 0.94);
  font-weight: 850;
}

.room-avatar-upload input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.people-panel {
  border-right: 0;
  border-left: 1px solid var(--line);
  display: grid;
  grid-template-rows: 74px minmax(0, 1fr);
}

.people-header {
  min-height: 74px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.people-header h3 {
  margin: 0;
  color: var(--soft);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.people-header > span {
  min-width: 28px;
  height: 24px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}

.people-header-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 4px;
}

.people-header-primary {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.members-panel .people-header-copy h3 {
  overflow: hidden;
  color: var(--soft);
  font-size: 12px;
  line-height: 1.15;
  text-transform: uppercase;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.people-header-copy small,
.people-member-total {
  appearance: none;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.1;
}

.people-member-total {
  width: fit-content;
  cursor: pointer;
  transition: color 140ms ease, opacity 140ms ease;
}

.people-member-total:hover {
  color: var(--soft);
}

.people-member-total:focus-visible {
  color: var(--accent);
  outline: 2px solid color-mix(in srgb, var(--accent) 58%, transparent);
  outline-offset: 4px;
  border-radius: 3px;
}

.people-online-count {
  flex: 0 0 auto;
  min-width: 28px;
  height: 24px;
  padding: 0 7px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.member-list {
  overflow-y: auto;
  padding: 12px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.member-list-shell {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.member-list-notice-slot {
  min-width: 0;
  padding: 10px 12px 0;
}

.member-list-notice-slot:empty {
  display: none;
}

.member-list-state {
  min-height: 128px;
  padding: 24px 14px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

.member-list-state svg {
  width: 20px;
  height: 20px;
}

.member-list-state.loading svg {
  animation: spin 0.8s linear infinite;
}

.member-list-state.error {
  color: #e6aaa3;
}

.member-list-notice {
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid rgba(218, 111, 98, 0.18);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #d9aaa4;
  background: rgba(126, 50, 42, 0.08);
  font-size: 10px;
}

.member-list-notice span {
  min-width: 0;
}

.member-list-notice .button {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 0 8px;
  font-size: 9px;
}

.member {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 12px;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px;
  border: 0;
  border-radius: var(--radius);
  color: inherit;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.member:hover {
  background: rgba(255, 255, 255, 0.045);
}

.member-action {
  grid-column: 4;
  width: 34px;
  min-height: 34px;
  opacity: 0;
}

.member:hover .member-action {
  opacity: 1;
}

.presence {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #6e6d68;
  margin-left: auto;
}

.member .presence {
  grid-column: 3;
  justify-self: center;
  margin-left: 0;
}

.right-panel-kind {
  min-width: 32px;
  width: 32px;
  color: rgba(247, 241, 223, 0.74);
}

.right-panel-kind svg {
  width: 15px;
  height: 15px;
}

.direct-info-panel {
  grid-template-rows: 74px minmax(0, 1fr);
}

.direct-info-body {
  min-width: 0;
  overflow-y: auto;
  padding: 18px 14px;
  display: grid;
  align-content: start;
  gap: 14px;
}

.direct-profile-hero {
  min-width: 0;
  padding: 18px 12px;
  border: 1px solid rgba(89, 217, 139, 0.18);
  border-radius: 12px;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: inherit;
  text-align: center;
  background:
    linear-gradient(145deg, rgba(35, 163, 95, 0.16), rgba(213, 168, 50, 0.08)),
    rgba(255, 255, 255, 0.04);
}

.direct-profile-hero:hover {
  border-color: rgba(89, 217, 139, 0.34);
  background:
    linear-gradient(145deg, rgba(35, 163, 95, 0.22), rgba(213, 168, 50, 0.1)),
    rgba(255, 255, 255, 0.055);
}

.direct-profile-hero .avatar {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  font-size: 22px;
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.direct-profile-hero .clickable-avatar {
  pointer-events: none;
}

.direct-profile-hero strong {
  max-width: 100%;
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  line-height: 1.15;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.direct-profile-hero span {
  max-width: 100%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.direct-info-section {
  display: grid;
  gap: 8px;
}

.direct-info-section h4 {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.direct-room-list {
  display: grid;
  gap: 8px;
}

.direct-room-pill {
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  color: inherit;
  text-align: left;
  background: rgba(255, 255, 255, 0.035);
}

.direct-room-pill:hover {
  border-color: rgba(89, 217, 139, 0.26);
  background: rgba(89, 217, 139, 0.08);
}

.direct-room-avatar {
  width: 30px;
  height: 30px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  background:
    linear-gradient(145deg, rgba(35, 163, 95, 0.22), rgba(213, 168, 50, 0.12)),
    rgba(255, 255, 255, 0.05);
}

.direct-room-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.direct-room-pill span:last-child {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.presence.online {
  background: var(--green-2);
  box-shadow: 0 0 0 4px rgba(89, 217, 139, 0.1);
}

.notice {
  position: absolute;
  left: 50%;
  bottom: max(22px, calc(env(safe-area-inset-bottom) + 12px));
  max-width: min(520px, calc(100vw - 28px));
  transform: translateX(-50%);
  padding: 11px 14px;
  border-radius: var(--radius);
  background: rgba(36, 38, 34, 0.94);
  border: 1px solid var(--line-strong);
  color: var(--text);
  box-shadow: var(--shadow);
  z-index: 1;
  text-align: center;
}

.toast-root .notice {
  background:
    linear-gradient(135deg, rgba(89, 217, 139, 0.06), rgba(213, 168, 50, 0.025)),
    #101410;
  border-color: rgba(142, 255, 180, 0.2);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.48);
}

.personal-share-result-notice {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: left;
}

.personal-share-result-notice > span {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.personal-share-result-notice > span svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--green-2);
}

.personal-share-result-notice.pending > span svg {
  animation: spin 0.9s linear infinite;
}

.personal-share-result-notice.error {
  border-color: rgba(231, 124, 109, 0.34);
}

.personal-share-result-notice.error > span svg {
  color: #e78a7d;
}

.personal-share-result-notice > button {
  min-height: 32px;
  padding: 6px 11px;
  border: 1px solid rgba(142, 255, 180, 0.22);
  border-radius: 10px;
  color: var(--text);
  background: rgba(89, 217, 139, 0.1);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.personal-share-result-notice > button:hover,
.personal-share-result-notice > button:focus-visible {
  outline: none;
  border-color: rgba(142, 255, 180, 0.42);
  background: rgba(89, 217, 139, 0.17);
}

@media (max-width: 560px) {
  .personal-share-result-notice {
    width: min(100% - 24px, 430px);
    justify-content: space-between;
  }

  .personal-share-result-notice > span {
    font-size: 13px;
  }
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border: 3px solid transparent;
  background-clip: padding-box;
  border-radius: 999px;
}

@keyframes gridDrift {
  from {
    transform: perspective(700px) rotateX(58deg) translateY(12%);
  }
  to {
    transform: perspective(700px) rotateX(58deg) translateY(20%);
  }
}

@keyframes attachmentViewerIn {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes messageFlashContent {
  0% {
    outline-color: transparent;
  }
  10%,
  62% {
    border-color: rgba(126, 246, 166, 0.78);
    outline-color: rgba(89, 217, 139, 0.38);
    filter: brightness(1.08);
  }
  100% {
    outline-color: transparent;
  }
}

@keyframes messageFlashAvatar {
  0%,
  100% {
    box-shadow: none;
  }
  10%,
  62% {
    box-shadow: 0 0 0 3px rgba(126, 246, 166, 0.46);
  }
}

@media (prefers-reduced-motion: reduce) {
  .message.flash .message-content {
    animation: none;
    border-color: rgba(126, 246, 166, 0.78);
    outline-color: rgba(89, 217, 139, 0.38);
  }

  .message.flash .avatar {
    animation: none;
    box-shadow: 0 0 0 3px rgba(126, 246, 166, 0.46);
  }
}

@keyframes authRise {
  from {
    opacity: 0;
    transform: translate3d(0, 18px, 0) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes ribbonFlow {
  0%,
  100% {
    opacity: 0.18;
    scale: 0.98 1;
  }
  50% {
    opacity: 0.58;
    scale: 1.02 1;
  }
}

@keyframes floatPanel {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

@keyframes wave {
  0%,
  100% {
    transform: scaleY(0.55);
    opacity: 0.58;
  }
  50% {
    transform: scaleY(1.15);
    opacity: 1;
  }
}

@keyframes scanLine {
  0%,
  100% {
    transform: translateX(-8%);
    opacity: 0.12;
  }
  50% {
    transform: translateX(8%);
    opacity: 0.75;
  }
}

@keyframes screenGlow {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(89, 217, 139, 0);
  }
  50% {
    box-shadow: 0 0 36px rgba(89, 217, 139, 0.16);
  }
}

@keyframes liveDot {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

@keyframes voiceAvatarWave {
  0% {
    opacity: calc(0.12 + var(--voice-level) * 0.22);
    transform: scale(0.88);
  }
  45% {
    opacity: calc(0.2 + var(--voice-level) * 0.42);
  }
  100% {
    opacity: 0;
    transform: scale(calc(1.18 + var(--voice-level) * 0.32));
  }
}

@keyframes profileOnlinePulse {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.72);
  }
  45% {
    opacity: 0.72;
    transform: scale(1);
  }
}

@keyframes qualityFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes qualityPop {
  from {
    opacity: 0;
    transform: translate3d(0, 18px, 0) scale(0.965);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes qualityScan {
  from {
    background-position: -160px 0, 0 0;
  }
  to {
    background-position: 160px 0, 34px 0;
  }
}

@keyframes orbitPulse {
  from {
    opacity: 0.75;
    transform: scale(0.72);
  }
  to {
    opacity: 0;
    transform: scale(1.55);
  }
}

@keyframes recordReady {
  0%,
  100% {
    opacity: 0.72;
    transform: scale(0.96);
  }
  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}

@keyframes loadingSweep {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(260%);
  }
}

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

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 70px 280px minmax(0, 1fr);
  }

  .app-shell.no-right-panel {
    grid-template-columns: 70px 280px minmax(0, 1fr);
  }

  .people-panel {
    display: none;
  }

  .notification-panel {
    right: 18px;
  }
}

/* Workspace lifecycle management */
.auth-credentials-stack {
  display: grid;
  gap: 14px;
}

.auth-workspace-invite {
  min-width: 0;
  min-height: 64px;
  padding: 9px 10px;
  border: 1px solid rgba(89, 217, 139, 0.23);
  border-radius: 15px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 10px;
  background: linear-gradient(145deg, rgba(89, 217, 139, 0.1), rgba(213, 168, 50, 0.035));
}

.auth-workspace-invite:not(.active) {
  border-color: rgba(216, 93, 84, 0.22);
  background: rgba(216, 93, 84, 0.055);
}

.auth-workspace-avatar,
.auth-workspace-avatar .avatar {
  width: 44px;
  height: 44px;
}

.auth-workspace-avatar {
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #bdf4c9;
  background: rgba(89, 217, 139, 0.09);
}

.auth-workspace-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.auth-workspace-copy strong,
.auth-workspace-copy small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.auth-workspace-copy strong {
  color: var(--text);
  font-size: 13px;
}

.auth-workspace-copy small {
  color: var(--muted);
  font-size: 10px;
}

.auth-workspace-status {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #a8efb8;
  background: rgba(89, 217, 139, 0.08);
}

.auth-workspace-status svg {
  width: 15px;
  height: 15px;
}

.workspace-action-divider {
  height: 1px;
  margin: 4px 8px;
  display: block;
  background: rgba(255, 255, 255, 0.08);
}

.workspace-settings-backdrop {
  padding: clamp(14px, 3vw, 36px);
  display: grid;
  place-items: center;
  background: rgba(2, 5, 3, 0.72);
  backdrop-filter: blur(12px);
}

.workspace-settings-card {
  --music-border: rgba(218, 231, 214, 0.11);
  --music-border-strong: rgba(122, 218, 147, 0.32);
  --music-muted: #919b91;
  position: relative;
  width: min(920px, calc(100vw - 48px));
  height: min(740px, calc(100dvh - 72px));
  min-height: min(520px, calc(100dvh - 72px));
  border: 1px solid rgba(89, 217, 139, 0.28);
  border-radius: 22px;
  overflow: hidden;
  display: grid;
  grid-template-rows: 92px minmax(0, 1fr);
  color: var(--text);
  background:
    radial-gradient(circle at 0 0, rgba(89, 217, 139, 0.12), transparent 34%),
    linear-gradient(145deg, rgba(19, 27, 20, 0.985), rgba(9, 13, 10, 0.99));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  isolation: isolate;
}

.workspace-settings-card > .profile-close {
  z-index: 5;
  top: 18px;
  right: 18px;
}

.workspace-settings-header {
  min-width: 0;
  padding: 16px 72px 16px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(6, 10, 7, 0.54);
}

.workspace-settings-header .profile-avatar-wrap,
.workspace-settings-header .avatar {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
}

.workspace-settings-header .profile-avatar-wrap {
  min-height: 58px;
  overflow: visible;
  isolation: isolate;
}

.workspace-settings-header .profile-avatar-tools {
  z-index: 3;
  bottom: -6px;
}

.workspace-settings-header .profile-avatar-tools .profile-avatar-action {
  width: 28px;
  min-width: 28px;
  max-width: 28px;
  height: 28px;
  min-height: 28px;
  flex-basis: 28px;
}

.workspace-settings-header > div:last-child {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.workspace-settings-header > div:last-child > strong {
  overflow: hidden;
  font-size: 19px;
  font-weight: 950;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.workspace-settings-header > div:last-child > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.workspace-settings-layout {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
}

.workspace-settings-nav {
  min-width: 0;
  padding: 14px 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  display: grid;
  align-content: start;
  gap: 5px;
  background: rgba(0, 0, 0, 0.16);
}

.workspace-settings-nav-item {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(247, 241, 223, 0.66);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  text-align: left;
  cursor: pointer;
}

.workspace-settings-nav-item svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}

.workspace-settings-nav-item:hover,
.workspace-settings-nav-item.active {
  border-color: rgba(89, 217, 139, 0.22);
  color: #ddffe5;
  background: linear-gradient(145deg, rgba(89, 217, 139, 0.13), rgba(213, 168, 50, 0.025));
}

.workspace-settings-nav-item.danger {
  margin-top: 8px;
  color: rgba(255, 177, 169, 0.78);
}

.workspace-settings-nav-item.danger.active {
  border-color: rgba(216, 93, 84, 0.26);
  color: #ffd2ce;
  background: rgba(216, 93, 84, 0.1);
}

.workspace-settings-content {
  min-width: 0;
  min-height: 0;
  overflow: hidden auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.workspace-settings-section {
  min-height: 100%;
  padding: 24px;
  display: grid;
  align-content: start;
  gap: 16px;
}

.workspace-section-heading {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.workspace-section-heading > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.workspace-section-heading h3,
.workspace-section-heading p {
  margin: 0;
}

.workspace-section-heading h3 {
  font-size: 18px;
  font-weight: 950;
}

.workspace-section-heading p {
  max-width: 620px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.workspace-section-count {
  min-width: 34px;
  height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(89, 217, 139, 0.16);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #bdf4c9;
  background: rgba(89, 217, 139, 0.08);
  font-size: 12px;
  font-weight: 900;
}

.workspace-general-form,
.workspace-info-card,
.workspace-invite-builder,
.workspace-danger-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.workspace-general-form {
  padding: 18px;
  display: grid;
  gap: 14px;
}

.workspace-general-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.workspace-general-actions small {
  color: var(--muted);
  font-size: 11px;
}

.workspace-info-card {
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 13px;
  overflow: hidden;
}

.workspace-info-card .workspace-info-avatar {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border: 1px solid rgba(121, 226, 143, 0.22);
  border-radius: 15px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(121, 226, 143, 0.08);
  color: #c7f5d0;
  font-size: 16px;
  font-weight: 900;
}

.workspace-info-card .workspace-info-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.workspace-info-card > span:not(.workspace-info-avatar) {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.workspace-info-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}

.workspace-info-card small {
  color: var(--muted);
}

.workspace-member-tools {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 168px;
  gap: 10px;
}

.workspace-picker {
  position: relative;
  width: 100%;
  min-width: 0;
}

.workspace-settings-card .workspace-picker-trigger {
  width: 100%;
  min-width: 0;
  padding: 0 12px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 9px;
  color: var(--text);
  appearance: none;
  cursor: pointer;
}

.workspace-settings-card .workspace-picker-trigger:hover,
.workspace-settings-card .workspace-picker.open .workspace-picker-trigger {
  border-color: var(--music-border-strong);
  background: #19221b;
}

.workspace-settings-card .workspace-picker-trigger > span {
  min-width: 0;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-settings-card .workspace-picker-trigger svg {
  width: 17px;
  height: 17px;
}

.workspace-settings-card .workspace-picker-trigger svg:last-child {
  width: 15px;
  height: 15px;
  transition: transform 140ms ease;
}

.workspace-settings-card .workspace-picker.open .workspace-picker-trigger svg:last-child {
  transform: rotate(180deg);
}

.workspace-settings-card .workspace-picker-panel {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  overflow: hidden;
  padding: 7px;
  border: 1px solid rgba(218, 231, 214, 0.15);
  border-radius: 12px;
  background: #111813;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.48);
}

.workspace-settings-card .workspace-picker-panel > header {
  padding: 5px 7px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.workspace-settings-card .workspace-picker-panel > header strong {
  font-size: 12px;
}

.workspace-settings-card .workspace-picker-panel > header small {
  color: var(--music-muted);
  font-size: 10px;
}

.workspace-settings-card .workspace-picker-options {
  max-height: 286px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.workspace-settings-card .workspace-picker-options > button {
  width: 100%;
  min-height: 42px;
  padding: 6px 8px;
  border: 0;
  border-radius: 9px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 17px;
  align-items: center;
  gap: 9px;
  color: #dce2da;
  text-align: left;
  background: transparent;
  appearance: none;
  cursor: pointer;
}

.workspace-settings-card .workspace-picker-options > button:hover,
.workspace-settings-card .workspace-picker-options > button.active {
  background: #222a24;
}

.workspace-settings-card .workspace-picker-options > button.active {
  color: #a8efb8;
}

.workspace-settings-card .workspace-picker-options > button > i {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #b9c3b9;
  background: #262d27;
  font-style: normal;
}

.workspace-settings-card .workspace-picker-options svg {
  width: 15px;
  height: 15px;
}

.workspace-settings-card .workspace-picker-options span,
.workspace-settings-card .workspace-picker-options strong,
.workspace-settings-card .workspace-picker-options small {
  min-width: 0;
  overflow: hidden;
  display: block;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-settings-card .workspace-picker-options strong {
  font-size: 12px;
}

.workspace-settings-card .workspace-picker-options small {
  margin-top: 2px;
  color: var(--music-muted);
  font-size: 10px;
}

.workspace-settings-card .workspace-picker-trigger {
  height: 44px;
  min-height: 44px;
  border-color: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: #151b16;
  font-size: 12px;
  font-weight: 800;
}

.workspace-settings-card .workspace-picker-trigger:focus-visible,
.workspace-settings-card .workspace-picker-options > button:focus-visible {
  outline: 2px solid rgba(121, 226, 143, 0.78);
  outline-offset: 2px;
}

.workspace-settings-card .workspace-picker-panel {
  z-index: 40;
  width: min(300px, calc(100vw - 32px));
}

.workspace-picker.align-end .workspace-picker-panel {
  right: 0;
  left: auto;
}

.workspace-picker.open-up .workspace-picker-panel {
  top: auto;
  bottom: calc(100% + 7px);
}

.workspace-picker-member-role .workspace-picker-panel {
  right: 0;
  left: auto;
}

.workspace-search {
  min-width: 0;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.22);
}

.workspace-search:focus-within {
  border-color: rgba(89, 217, 139, 0.45);
  box-shadow: 0 0 0 3px rgba(89, 217, 139, 0.08);
}

.workspace-search svg {
  width: 16px;
  height: 16px;
}

.workspace-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
  font-size: 13px;
}

.workspace-entity-list,
.workspace-audit-list,
.profile-blocked-list {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 7px;
}

.workspace-entity-list {
  max-height: 390px;
  overflow: hidden auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.workspace-member-row {
  min-width: 0;
  min-height: 58px;
  padding-right: 10px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 13px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12px;
  align-items: center;
  gap: 10px;
  color: inherit;
  background: rgba(255, 255, 255, 0.025);
  user-select: none;
  -webkit-touch-callout: none;
}

.workspace-member-row.contextual {
  cursor: context-menu;
}

.workspace-member-row:hover {
  border-color: rgba(89, 217, 139, 0.2);
  background: rgba(89, 217, 139, 0.06);
}

.workspace-member-row.self {
  border-color: rgba(89, 217, 139, 0.14);
}

.workspace-member-main,
.member-profile-hit {
  min-width: 0;
  min-height: 56px;
  padding: 8px 10px;
  border: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.workspace-member-main .avatar,
.member-profile-hit .avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
}

.workspace-member-row > .presence,
.member.workspace-member-row > .presence {
  grid-column: 2;
  justify-self: center;
  margin: 0;
}

.workspace-member-copy,
.member-profile-hit .user-meta {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.workspace-member-copy strong,
.workspace-member-copy small,
.member-profile-hit .user-name,
.member-profile-hit .user-sub {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.workspace-member-copy strong,
.member-profile-hit .user-name {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.workspace-member-name-row,
.member-name-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.workspace-member-name-row > strong,
.member-name-row > .user-name {
  min-width: 0;
}

.workspace-member-self-label {
  flex: 0 0 auto;
  color: rgba(121, 226, 143, 0.72);
  font-size: 10px;
  font-weight: 900;
  font-style: normal;
}

.workspace-member-copy small,
.member-profile-hit .user-sub {
  color: var(--muted);
  font-size: 11px;
}

.workspace-role-marker,
.member-role-mark {
  display: inline-grid;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  color: rgba(224, 226, 219, 0.78);
  background: rgba(255, 255, 255, 0.045);
}

.workspace-role-marker.role-admin,
.member-role-mark.role-admin {
  border-color: rgba(89, 217, 139, 0.2);
  color: #bff4cb;
  background: rgba(89, 217, 139, 0.08);
}

.workspace-role-marker.role-moderator,
.member-role-mark.role-moderator {
  border-color: rgba(105, 164, 232, 0.26);
  color: #b6d9ff;
  background: rgba(86, 143, 211, 0.09);
}

.workspace-role-marker.role-owner,
.member-role-mark.role-owner {
  border-color: rgba(213, 168, 50, 0.28);
  color: #f3d884;
  background: rgba(213, 168, 50, 0.09);
}

.workspace-role-marker svg,
.member-role-mark svg {
  width: 13px;
  height: 13px;
  stroke-width: 2;
}

.workspace-invite-builder {
  padding: 13px;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
  gap: 10px;
}

.workspace-invite-field {
  display: grid;
  gap: 6px;
}

.workspace-invite-field > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.workspace-entity-row {
  min-width: 0;
  min-height: 64px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 13px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.workspace-entity-icon,
.workspace-entity-avatar {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
}

.workspace-entity-icon {
  border: 1px solid rgba(89, 217, 139, 0.16);
  border-radius: 12px;
  color: #b9efc5;
  background: rgba(89, 217, 139, 0.07);
}

.workspace-entity-avatar .avatar {
  width: 40px;
  height: 40px;
}

.workspace-entity-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.workspace-entity-copy strong,
.workspace-entity-copy small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.workspace-invite-code {
  display: block;
  max-width: min(100%, 320px);
  overflow: hidden;
  color: #bdf4c9;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-entity-copy strong {
  color: var(--text);
  font-size: 13px;
}

.workspace-entity-copy strong em {
  margin-left: 8px;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.workspace-entity-copy small {
  color: var(--muted);
  font-size: 10px;
}

.workspace-row-actions {
  display: flex;
  gap: 5px;
}

.workspace-row-actions .button,
.workspace-unblock {
  min-height: 40px;
}

.workspace-row-actions .workspace-invite-copy {
  gap: 5px;
  padding: 0 9px;
  font-size: 10px;
}

.workspace-row-actions .workspace-invite-copy svg {
  width: 14px;
  height: 14px;
}

.workspace-load-more {
  min-height: 42px;
  justify-self: center;
}

.workspace-row-skeleton {
  min-height: 58px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 13px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 70px;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.018);
}

.workspace-row-skeleton i,
.workspace-row-skeleton span,
.workspace-row-skeleton b {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,.035), rgba(255,255,255,.09), rgba(255,255,255,.035));
  background-size: 220% 100%;
  animation: workspaceSkeleton 1.3s ease-in-out infinite;
}

.workspace-row-skeleton i {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.workspace-row-skeleton b {
  width: 70px;
}

@keyframes workspaceSkeleton {
  to { background-position: -220% 0; }
}

.workspace-empty-state {
  min-height: 170px;
  padding: 24px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  color: var(--muted);
  text-align: center;
}

.workspace-empty-state.compact {
  min-height: 130px;
}

.workspace-empty-state svg {
  width: 26px;
  height: 26px;
  color: rgba(121, 226, 143, 0.72);
}

.workspace-empty-state strong {
  color: rgba(247, 241, 223, 0.8);
  font-size: 13px;
}

.workspace-empty-state span {
  font-size: 11px;
}

.workspace-inline-state {
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.workspace-inline-state.error {
  border-color: rgba(216, 93, 84, 0.22);
  color: #ffc4be;
  background: rgba(216, 93, 84, 0.07);
}

.workspace-inline-state span {
  min-width: 0;
  flex: 1;
}

.workspace-audit-list {
  max-height: 470px;
  overflow: hidden auto;
}

.workspace-audit-row {
  min-height: 54px;
  padding: 9px 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.workspace-audit-row > span {
  color: rgba(121, 226, 143, 0.7);
}

.workspace-audit-row p {
  min-width: 0;
  margin: 0;
  color: rgba(247, 241, 223, 0.68);
  font-size: 11px;
}

.workspace-audit-row p > strong {
  color: var(--text);
}

.workspace-audit-row small {
  margin-top: 3px;
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.workspace-danger-card {
  min-height: 82px;
  padding: 14px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.workspace-danger-card > span {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #f1d37d;
  background: rgba(213, 168, 50, 0.09);
}

.workspace-danger-card > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.workspace-danger-card strong {
  font-size: 13px;
}

.workspace-danger-card small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.workspace-danger-card.critical {
  border-color: rgba(216, 93, 84, 0.22);
  background: rgba(216, 93, 84, 0.055);
}

.workspace-danger-card.critical > span {
  color: #ffaaa2;
  background: rgba(216, 93, 84, 0.11);
}

.workspace-member-menu-backdrop,
.workspace-confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 240;
}

.workspace-member-menu-backdrop {
  background: transparent;
}

.voice-microphone-gain-backdrop {
  position: fixed;
  inset: 0;
  z-index: 244;
  background: transparent;
}

.voice-microphone-gain-dialog {
  position: fixed;
  top: var(--microphone-gain-top, 12px);
  left: var(--microphone-gain-left, 12px);
  width: min(336px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  box-sizing: border-box;
  overflow: hidden auto;
  padding: 10px;
  border: 1px solid rgba(89, 217, 139, 0.3);
  border-radius: 17px;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0, rgba(89, 217, 139, 0.12), transparent 42%),
    rgba(12, 18, 13, 0.988);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.54), inset 0 1px 0 rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(20px);
}

.voice-microphone-gain-dialog > header {
  min-width: 0;
  min-height: 44px;
  padding: 3px 2px 11px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 9px;
}

.voice-microphone-gain-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #dffbe7;
  background: rgba(89, 217, 139, 0.14);
  box-shadow: inset 0 0 0 1px rgba(89, 217, 139, 0.16);
}

.voice-microphone-gain-icon svg {
  width: 18px;
  height: 18px;
}

.voice-microphone-gain-dialog > header > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.voice-microphone-gain-dialog > header strong,
.voice-microphone-gain-dialog > header small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.voice-microphone-gain-dialog > header strong {
  font-size: 14px;
}

.voice-microphone-gain-dialog > header small {
  color: var(--muted);
  font-size: 10px;
}

.voice-microphone-gain-dialog > header .button {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
}

.voice-microphone-gain-control {
  min-width: 0;
  padding: 13px 12px 10px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 14px;
  display: grid;
  gap: 9px;
  background: rgba(255, 255, 255, 0.027);
}

.voice-microphone-gain-value {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.voice-microphone-gain-value output {
  color: #dffbe7;
  font-size: 16px;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.voice-microphone-gain-control input[type="range"] {
  width: 100%;
  height: 28px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.voice-microphone-gain-control input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green-2) 0 var(--microphone-gain-progress), rgba(255, 255, 255, 0.12) var(--microphone-gain-progress) 100%);
}

.voice-microphone-gain-control input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.voice-microphone-gain-control input[type="range"]::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--green-2);
}

.voice-microphone-gain-control input[type="range"]::-webkit-slider-thumb {
  width: 19px;
  height: 19px;
  margin-top: -7px;
  border: 3px solid #eaf9ed;
  border-radius: 999px;
  appearance: none;
  background: var(--green);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

.voice-microphone-gain-control input[type="range"]::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: 3px solid #eaf9ed;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

.voice-microphone-gain-control input[type="range"]:focus-visible {
  outline: 2px solid rgba(89, 217, 139, 0.5);
  outline-offset: 3px;
  border-radius: 999px;
}

.voice-microphone-gain-control input[type="range"]:disabled {
  opacity: 0.34;
  cursor: not-allowed;
}

.voice-microphone-gain-scale {
  margin-top: -7px;
  display: flex;
  justify-content: space-between;
  color: rgba(238, 235, 222, 0.42);
  font-size: 8px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.voice-microphone-gain-scale span:nth-child(2) {
  color: rgba(89, 217, 139, 0.76);
}

.voice-microphone-gain-reset {
  justify-self: end;
  min-height: 28px;
  padding: 0;
  border: 0;
  color: rgba(89, 217, 139, 0.9);
  background: transparent;
  font: inherit;
  font-size: 9px;
  font-weight: 900;
  cursor: pointer;
}

.voice-microphone-quick-actions {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.voice-microphone-effect,
.voice-microphone-more {
  width: 100%;
  min-height: 42px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-align: left;
  background: rgba(255, 255, 255, 0.025);
}

.voice-microphone-effect.active,
.voice-microphone-effect:hover,
.voice-microphone-more:hover {
  border-color: rgba(89, 217, 139, 0.25);
  background: rgba(89, 217, 139, 0.075);
}

.voice-microphone-effect:disabled,
.voice-microphone-effect.unavailable,
.voice-microphone-effect:disabled:hover {
  border-color: rgba(255, 255, 255, 0.055);
  color: rgba(247, 241, 223, 0.52);
  background: rgba(255, 255, 255, 0.018);
  cursor: not-allowed;
  opacity: 0.62;
}

.voice-microphone-effect > svg,
.voice-microphone-more > svg:first-child {
  width: 17px;
  color: var(--green-2);
}

.voice-microphone-effect span,
.voice-microphone-effect strong,
.voice-microphone-effect small {
  min-width: 0;
  display: block;
}

.voice-microphone-effect strong,
.voice-microphone-more span {
  font-size: 10px;
  font-weight: 850;
}

.voice-microphone-effect small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8.5px;
}

.voice-microphone-more > svg:last-child {
  width: 15px;
  color: var(--muted);
}

.voice-microphone-gain-reset:disabled {
  opacity: 0.34;
  cursor: default;
}

.voice-microphone-gain-hint {
  margin: 10px 4px 2px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.workspace-member-menu {
  position: fixed;
  top: var(--member-menu-top, 12px);
  left: var(--member-menu-left, 12px);
  width: min(276px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px;
  border: 1px solid rgba(89, 217, 139, 0.25);
  border-radius: 16px;
  color: var(--text);
  background: rgba(13, 19, 14, 0.985);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255,255,255,.05);
  backdrop-filter: blur(18px);
}

.workspace-member-menu > header {
  min-width: 0;
  padding: 7px 8px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.workspace-member-menu > header .avatar {
  width: 36px;
  height: 36px;
}

.workspace-member-menu > header > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.workspace-member-menu > header strong,
.workspace-member-menu > header small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.workspace-member-menu > header strong {
  font-size: 13px;
}

.workspace-member-menu > header small,
.workspace-member-menu-hint {
  color: var(--muted);
  font-size: 9px;
}

.voice-participant-volume-control {
  min-width: 0;
  margin: 0 0 5px;
  padding: 12px 10px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: grid;
  gap: 8px;
}

.voice-participant-volume-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.voice-participant-volume-heading output {
  color: #dffbe7;
  font-size: 13px;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.voice-participant-volume-slider-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

.voice-participant-volume-mute {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: rgba(238, 235, 222, 0.76);
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.voice-participant-volume-mute:hover,
.voice-participant-volume-mute:focus-visible {
  color: #dffbe7;
  border-color: rgba(89, 217, 139, 0.3);
  outline: 0;
}

.voice-participant-volume-mute.muted {
  color: #ffb1aa;
  border-color: rgba(216, 93, 84, 0.28);
  background: rgba(216, 93, 84, 0.1);
}

.voice-participant-volume-mute svg {
  width: 16px;
  height: 16px;
}

.voice-participant-volume-slider-row input[type="range"] {
  width: 100%;
  height: 26px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.voice-participant-volume-slider-row input[type="range"]::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--green-2) 0 var(--voice-volume-progress),
    rgba(255, 255, 255, 0.12) var(--voice-volume-progress) 100%
  );
}

.voice-participant-volume-slider-row input[type="range"]::-moz-range-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.voice-participant-volume-slider-row input[type="range"]::-moz-range-progress {
  height: 5px;
  border-radius: 999px;
  background: var(--green-2);
}

.voice-participant-volume-slider-row input[type="range"]::-webkit-slider-thumb {
  width: 17px;
  height: 17px;
  margin-top: -6px;
  border: 3px solid #eaf9ed;
  border-radius: 999px;
  appearance: none;
  background: var(--green);
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.36);
}

.voice-participant-volume-slider-row input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 3px solid #eaf9ed;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.36);
}

.voice-participant-volume-slider-row input[type="range"]:focus-visible {
  outline: 2px solid rgba(89, 217, 139, 0.48);
  outline-offset: 3px;
  border-radius: 999px;
}

.voice-participant-volume-scale {
  min-width: 0;
  margin: -6px 0 0 43px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(238, 235, 222, 0.4);
  font-size: 8px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.voice-participant-volume-default {
  color: rgba(89, 217, 139, 0.72);
}

.voice-participant-volume-reset {
  justify-self: end;
  min-height: 28px;
  padding: 0;
  border: 0;
  color: rgba(89, 217, 139, 0.86);
  background: transparent;
  font: inherit;
  font-size: 9px;
  font-weight: 900;
  cursor: pointer;
}

.voice-participant-volume-reset:disabled {
  opacity: 0.34;
  cursor: default;
}

.workspace-member-menu-actions {
  padding: 5px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: grid;
  gap: 2px;
}

.workspace-member-menu-actions button {
  min-height: 42px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: rgba(247, 241, 223, 0.82);
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.workspace-member-menu-actions button:hover,
.workspace-member-menu-actions button:focus-visible {
  outline: 0;
  background: rgba(255, 255, 255, 0.055);
}

.workspace-member-menu-actions button.danger-soft {
  color: #ffd0a5;
}

.workspace-member-menu-actions button.danger {
  color: #ffb1aa;
}

.workspace-member-menu-hint {
  padding: 7px 8px 3px;
  display: block;
}

.workspace-confirm-backdrop {
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
}

.workspace-action-confirm {
  width: min(470px, calc(100vw - 32px));
  max-height: min(680px, calc(100dvh - 36px));
  overflow: hidden auto;
  border: 1px solid rgba(89, 217, 139, 0.25);
  border-radius: 18px;
  color: var(--text);
  background: rgba(13, 19, 14, 0.99);
  box-shadow: 0 26px 72px rgba(0, 0, 0, 0.58);
}

.workspace-action-confirm > header {
  padding: 17px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 40px;
  align-items: start;
  gap: 11px;
}

.workspace-action-confirm > header > span {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #bdf4c9;
  background: rgba(89, 217, 139, 0.09);
}

.workspace-action-confirm > header > div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.workspace-action-confirm > header strong {
  font-size: 15px;
}

.workspace-action-confirm > header small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.workspace-action-confirm form {
  padding: 16px;
  display: grid;
  gap: 13px;
}

.platform-action-confirm-visual {
  overflow: hidden;
}

.platform-confirm-workspace-avatar {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #102016;
  background: linear-gradient(145deg, #8be3a1, #4f9f69);
  font-size: 13px;
  font-weight: 900;
}

.platform-confirm-workspace-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.platform-invite-confirm-summary {
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid rgba(89, 217, 139, 0.16);
  border-radius: 13px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  background: rgba(89, 217, 139, 0.045);
}

.platform-invite-confirm-summary > span {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #9ae7ad;
  background: rgba(89, 217, 139, 0.1);
}

.platform-invite-confirm-summary > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.platform-invite-confirm-summary strong {
  font-size: 12px;
}

.platform-invite-confirm-summary small {
  color: var(--muted);
  font-size: 10px;
}

.workspace-role-options {
  display: grid;
  gap: 7px;
}

.workspace-role-option {
  min-height: 58px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
}

.workspace-role-option:has(input:checked) {
  border-color: rgba(89, 217, 139, 0.35);
  background: rgba(89, 217, 139, 0.075);
}

.workspace-role-option > span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.workspace-role-option strong {
  font-size: 12px;
}

.workspace-role-option small,
.workspace-role-option em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
}

.workspace-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.profile-blocked-panel {
  min-height: 280px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.profile-blocked-search {
  width: 100%;
}

.profile-panel-heading {
  display: grid;
  gap: 4px;
}

.profile-panel-heading strong {
  font-size: 14px;
}

.profile-panel-heading small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.profile-blocked-list {
  max-height: 320px;
  overflow: hidden auto;
}

.profile-blocked-row {
  min-height: 58px;
  padding: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.profile-deleted-workspaces-panel {
  min-height: 250px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.profile-deleted-workspaces-list {
  max-height: 330px;
  overflow: hidden auto;
}

.profile-deleted-workspace-row {
  min-height: 64px;
  padding: 9px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.profile-deleted-workspace-icon {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(216, 93, 84, 0.16);
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: rgba(255, 184, 177, 0.78);
  background: rgba(216, 93, 84, 0.055);
}

.profile-deleted-workspace-icon svg {
  width: 18px;
  height: 18px;
}

.profile-deleted-workspace-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.profile-deleted-workspace-copy strong,
.profile-deleted-workspace-copy small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.profile-deleted-workspace-copy strong {
  font-size: 12px;
}

.profile-deleted-workspace-copy small {
  color: var(--muted);
  font-size: 9px;
}

.profile-deleted-workspace-row > .button {
  min-height: 36px;
  padding-inline: 11px;
  color: #c8fbd5;
}

@media (max-width: 560px) {
  .profile-deleted-workspace-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .profile-deleted-workspace-row > .button {
    grid-column: 2;
    justify-self: start;
  }
}

.profile-blocked-user {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.profile-blocked-user .avatar {
  width: 38px;
  height: 38px;
}

.profile-blocked-user > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.profile-blocked-user strong,
.profile-blocked-user small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.profile-blocked-user strong {
  font-size: 12px;
}

.profile-blocked-user small {
  color: var(--muted);
  font-size: 9px;
}

.member.workspace-member-row {
  padding: 0 10px 0 0;
  grid-template-columns: minmax(0, 1fr) 12px;
}

.member-profile-hit {
  padding: 7px 8px;
}

@media (prefers-reduced-motion: reduce) {
  .workspace-row-skeleton i,
  .workspace-row-skeleton span,
  .workspace-row-skeleton b {
    animation: none;
  }
}

/* Screen capture competes with the page compositor for GPU/CPU time. Keep the
   same layout while the native picker is open and while this client publishes,
   but suspend decorative work that has no effect on media quality. */
body.is-screen-capture-pending *,
body.is-screen-capture-pending *::before,
body.is-screen-capture-pending *::after {
  animation-play-state: paused !important;
}

body.is-screen-capture-pending .music-float,
body.is-local-screen-sharing .music-float,
body.is-screen-capture-pending .music-dock,
body.is-local-screen-sharing .music-dock,
body.is-screen-capture-pending .screen-float,
body.is-local-screen-sharing .screen-float,
body.is-screen-capture-pending .screen-dock,
body.is-local-screen-sharing .screen-dock {
  backdrop-filter: none;
}

body.is-screen-capture-pending .music-float,
body.is-local-screen-sharing .music-float,
body.is-screen-capture-pending .activity-dock-stack,
body.is-local-screen-sharing .activity-dock-stack,
body.is-screen-capture-pending .stream-settings-panel,
body.is-local-screen-sharing .stream-settings-panel,
body.is-screen-capture-pending .stream-settings-panel::before,
body.is-local-screen-sharing .stream-settings-panel::before,
body.is-screen-capture-pending .music-float-orbit,
body.is-local-screen-sharing .music-float-orbit,
body.is-screen-capture-pending .music-float-visual::before,
body.is-local-screen-sharing .music-float-visual::before,
body.is-screen-capture-pending .music-float-artwork.hero,
body.is-local-screen-sharing .music-float-artwork.hero,
body.is-screen-capture-pending .music-float-signal i,
body.is-local-screen-sharing .music-float-signal i,
body.is-screen-capture-pending .music-float-playing-bars b,
body.is-local-screen-sharing .music-float-playing-bars b {
  animation: none !important;
  transition: none !important;
}

/* Shared Personal material is part of the chat shell, so these styles must
   remain in the always-loaded bundle instead of a lazy Personal stylesheet. */
.message.shared-material-message .message-content {
  width: min(100%, 560px);
  max-width: min(82%, 560px);
}

.shared-material-card {
  width: min(100%, 536px);
  min-width: 0;
  margin: 1px 0 5px;
  padding: 10px;
  border: 1px solid rgba(139, 232, 165, 0.18);
  border-radius: 12px;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 11px;
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 12%, rgba(93, 210, 128, 0.15), transparent 38%),
    linear-gradient(145deg, rgba(34, 47, 36, 0.98), rgba(17, 22, 18, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(247, 241, 223, 0.05),
    0 10px 28px rgba(0, 0, 0, 0.2);
}

.shared-material-cover {
  width: 74px;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(160, 230, 177, 0.2);
  border-radius: 9px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #9ce6ab;
  background:
    radial-gradient(circle at 50% 32%, rgba(158, 118, 209, 0.36), transparent 43%),
    linear-gradient(160deg, #283129, #17191e 72%);
}

.shared-material-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.shared-material-cover > span {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(156, 230, 171, 0.2);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(7, 10, 8, 0.24);
}

.shared-material-cover svg {
  width: 22px;
  height: 22px;
}

.shared-material-copy {
  min-width: 0;
  align-self: center;
  display: grid;
  gap: 2px;
}

.shared-material-copy small {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #92dda3;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.055em;
}

.shared-material-copy small svg {
  width: 13px;
  height: 13px;
}

.shared-material-copy strong,
.shared-material-copy > span,
.shared-material-copy p,
.shared-material-copy em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shared-material-copy strong {
  color: #f6f1e6;
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
}

.shared-material-copy > span {
  color: #c2bdae;
  font-size: 12px;
  white-space: nowrap;
}

.shared-material-copy p {
  margin: 4px 0 0;
  display: -webkit-box;
  color: #a9aa9f;
  font-size: 11px;
  font-style: normal;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.shared-material-copy em {
  margin-top: 3px;
  color: #8f998d;
  font-size: 10px;
  font-style: normal;
  white-space: nowrap;
}

.shared-material-action {
  grid-column: 1 / -1;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(139, 232, 165, 0.28);
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #daf7df;
  background: rgba(83, 181, 105, 0.13);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    transform 140ms ease;
}

.shared-material-action:hover,
.shared-material-action:focus-visible {
  border-color: rgba(139, 232, 165, 0.52);
  outline: none;
  background: rgba(83, 181, 105, 0.22);
}

.shared-material-action:active {
  transform: translateY(1px);
}

.shared-material-action:disabled {
  opacity: 0.58;
  cursor: wait;
}

.shared-material-action svg {
  width: 16px;
  height: 16px;
}

.message.shared-material-message
  .message-content:has(.shared-audiobook-card) {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.message.shared-material-message
  .message-content:has(.shared-music-card) {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.message.shared-material-message
  .message-content:has(.shared-audiobook-card)
  > .shared-audiobook-card {
  margin: 0;
}

.shared-audiobook-card {
  position: relative;
}

.shared-audiobook-origin {
  grid-column: 1 / -1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  color: #92dda3;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.055em;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shared-audiobook-origin svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.shared-audiobook-footer {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}

.shared-audiobook-footer > .message-meta {
  flex: 0 0 auto;
  min-height: 0;
  margin: 0 1px 0 auto;
  white-space: nowrap;
}

.message.shared-material-message
  .message-content:has(.shared-audiobook-card)
  > .message-meta,
.message.shared-material-message
  .message-content:has(.shared-music-card)
  > .message-meta {
  margin: 4px 3px 0 0;
}

.chat-music-card.music-attachment {
  position: relative;
  width: min(100%, 438px);
  min-height: 88px;
  margin: 0;
  padding: 10px;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 10px;
  overflow: visible;
  border-radius: 15px;
  background:
    radial-gradient(circle at 9% 14%, rgba(104, 222, 137, 0.2), transparent 34%),
    linear-gradient(145deg, rgba(31, 48, 34, 0.98), rgba(15, 20, 16, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(247, 241, 223, 0.055),
    0 12px 30px rgba(0, 0, 0, 0.22);
}

.chat-music-card.music-attachment:hover {
  transform: none;
}

.chat-music-card.music-attachment.playing {
  background:
    radial-gradient(circle at 9% 14%, rgba(104, 222, 137, 0.27), transparent 36%),
    linear-gradient(145deg, rgba(34, 57, 39, 0.99), rgba(15, 21, 17, 0.99));
}

.shared-music-visual,
.shared-music-cover {
  position: relative;
  width: 64px;
  height: 64px;
}

.shared-music-cover {
  overflow: hidden;
  border: 1px solid rgba(158, 232, 177, 0.2);
  border-radius: 13px;
  display: grid;
  place-items: center;
  isolation: isolate;
  background:
    radial-gradient(
      circle at 33% 25%,
      hsl(var(--shared-music-cover-b) 72% 63% / 0.62),
      transparent 42%
    ),
    linear-gradient(
      145deg,
      hsl(var(--shared-music-cover-a) 38% 28%),
      hsl(var(--shared-music-cover-b) 32% 12%)
    );
  box-shadow: inset 0 1px 0 rgba(247, 241, 223, 0.08);
}

.shared-music-cover-fallback {
  display: grid;
  place-items: center;
  color: rgba(207, 255, 218, 0.9);
  background:
    radial-gradient(
      circle at 33% 25%,
      hsl(var(--shared-music-cover-b) 72% 63% / 0.62),
      transparent 42%
    ),
    linear-gradient(
      145deg,
      hsl(var(--shared-music-cover-a) 38% 28%),
      hsl(var(--shared-music-cover-b) 32% 12%)
    );
}

.shared-music-cover > .shared-music-cover-fallback {
  position: absolute;
  inset: 0;
}

.shared-music-cover-fallback svg {
  width: 22px;
  height: 22px;
}

.shared-music-cover > img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  opacity: 0;
  transition: opacity 150ms ease;
}

.shared-music-cover > img.is-ready {
  opacity: 1;
}

.shared-music-play.music-attachment-play {
  position: absolute;
  right: -4px;
  bottom: -4px;
  z-index: 2;
  width: 30px;
  height: 30px;
  border: 2px solid #172019;
  color: #102015;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.36);
}

.shared-music-play.music-attachment-play svg {
  width: 14px;
  height: 14px;
}

.shared-music-main.music-attachment-main {
  align-self: stretch;
  gap: 5px;
}

.shared-music-origin {
  grid-column: 1 / -1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  color: #91dda2;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.055em;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shared-music-origin svg {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
}

.shared-music-heading {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.shared-music-heading strong,
.shared-music-heading > span,
.shared-music-heading em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shared-music-heading strong {
  color: #f6f1e6;
  font-size: 14px;
  line-height: 1.2;
}

.shared-music-heading > span {
  color: #c4c0b4;
  font-size: 11px;
}

.shared-music-heading em {
  color: #8f998d;
  font-size: 9px;
  font-style: normal;
}

.chat-music-card .music-attachment-progress {
  height: 4px;
}

.chat-music-card .music-attachment-time-row {
  min-height: 15px;
}

.chat-music-card .music-attachment-time-row > .message-meta {
  position: absolute;
  right: 11px;
  bottom: 6px;
  z-index: 2;
  white-space: nowrap;
}

.shared-music-actions.music-attachment-actions {
  align-self: center;
  gap: 4px;
}

.message-reply-thumbnail.music {
  isolation: isolate;
}

.message-reply-thumbnail.music > .shared-music-cover-fallback {
  position: absolute;
  inset: 0;
}

.message-reply-thumbnail.music > img {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  transition: opacity 120ms ease;
}

.message-reply-thumbnail.music > img.is-ready {
  opacity: 1;
}

@media (min-width: 961px),
  (min-width: 761px) and (min-height: 521px),
  (min-width: 761px) and (orientation: portrait) {
  .message.shared-material-message
    .message-content:has(.shared-audiobook-card) {
    width: min(100%, 420px);
    max-width: min(76%, 420px);
  }

  .message.shared-material-message
    .message-content:has(.shared-music-card) {
    width: min(100%, 420px);
    max-width: min(76%, 420px);
  }

  .shared-audiobook-card {
    width: 100%;
    grid-template-columns: 62px minmax(0, 1fr);
    column-gap: 10px;
    row-gap: 5px;
    padding: 9px;
  }

  .shared-audiobook-card .shared-material-cover {
    width: 62px;
    grid-column: 1;
    grid-row: 2 / span 2;
    align-self: start;
  }

  .shared-audiobook-card .shared-material-copy {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
  }

  .shared-audiobook-footer {
    grid-column: 2;
    grid-row: 3;
  }

  .shared-audiobook-card .shared-material-action {
    width: max-content;
    max-width: 100%;
    min-height: 34px;
    padding: 0 12px;
    justify-self: start;
  }
}

@media (max-width: 760px),
  (max-width: 960px) and (max-height: 520px) and (orientation: landscape) {
  .message.shared-material-message .message-content {
    width: min(88vw, 390px);
    max-width: min(88vw, 390px);
  }

  .message.shared-material-message
    .message-content:has(.shared-audiobook-card) {
    width: min(88vw, 350px);
    max-width: min(88vw, 350px);
  }

  .message.shared-material-message
    .message-content:has(.shared-music-card) {
    width: min(88vw, 350px);
    max-width: min(88vw, 350px);
  }

  .message-content.has-bare-media:has(.uploaded-music-card),
  .message-content.has-captioned-media:has(.uploaded-music-card) {
    width: min(88vw, 350px);
    max-width: min(88vw, 350px);
  }

  .shared-material-card {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 9px;
    padding: 8px;
    border-radius: 11px;
  }

  .shared-material-cover {
    width: 58px;
    border-radius: 8px;
  }

  .shared-material-copy strong {
    font-size: 14px;
  }

  .shared-material-copy p {
    display: none;
  }

  .shared-material-action {
    min-height: 42px;
  }

  .shared-audiobook-card {
    grid-template-columns: 52px minmax(0, 1fr);
    column-gap: 8px;
    row-gap: 6px;
    padding: 8px;
  }

  .shared-audiobook-card .shared-material-cover {
    width: 52px;
    grid-column: 1;
    grid-row: 2;
    align-self: start;
  }

  .shared-audiobook-card .shared-material-copy {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
  }

  .shared-audiobook-footer {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .shared-audiobook-card .shared-material-action {
    width: auto;
    min-width: 0;
    min-height: 38px;
  }

  .shared-audiobook-card .shared-material-action span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .chat-music-card.music-attachment {
    min-height: 82px;
    padding: 9px;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 8px;
    border-radius: 14px;
  }

  .chat-music-card.music-attachment.has-origin-label {
    row-gap: 6px;
  }

  .shared-music-visual,
  .shared-music-cover {
    width: 58px;
    height: 58px;
  }

  .shared-music-actions.music-attachment-actions {
    display: grid;
    grid-template-columns: repeat(2, 34px);
    gap: 4px;
    transform: translateY(-6px);
  }

  .shared-music-actions .media-volume-control:not(.is-expanded),
  .shared-music-actions .music-attachment-download {
    width: 34px;
    height: 34px;
  }

  .shared-music-actions .media-volume-control:not(.is-expanded) > .media-volume-trigger {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    border-radius: 10px;
  }

  .shared-music-actions .music-attachment-download {
    border-radius: 10px;
  }

  .shared-music-heading strong {
    font-size: 13px;
  }

  .shared-music-heading em {
    display: none;
  }
}
