.msc-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  background: rgba(3, 7, 18, 0.38);
  backdrop-filter: blur(7px);
  opacity: 0;
  transition: opacity 260ms ease;
}

.msc-backdrop.is-visible {
  opacity: 1;
}

.msc-panel {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 2147483001;
  width: min(430px, calc(100vw - 32px));
  height: min(760px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  background: var(--msc-surface);
  box-shadow: var(--msc-shadow);
  font-family: var(--msc-font);
  opacity: 0;
  transform: translateY(20px) scale(0.975);
  transform-origin: bottom right;
  transition: opacity 280ms ease, transform 320ms cubic-bezier(.2,.75,.25,1);
}

.msc-panel.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.msc-header {
  position: relative;
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px 18px;
  color: var(--msc-white);
  background:
    radial-gradient(circle at 16% 0%, rgba(0, 200, 255, 0.22), transparent 42%),
    radial-gradient(circle at 90% 100%, rgba(143, 92, 255, 0.17), transparent 40%),
    var(--msc-black);
}

.msc-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--msc-gradient-accent);
}

.msc-brand-avatar {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 24px rgba(0, 92, 255, 0.22);
}

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

.msc-brand-avatar span {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.msc-header-copy {
  min-width: 0;
  flex: 1;
}

.msc-header-copy h2 {
  margin: 0;
  color: var(--msc-blue);
  font-family: var(--msc-font);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.msc-header-copy p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  line-height: 1.3;
}

.msc-status-dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-right: 7px;
  border-radius: 999px;
  background: #4ee7a0;
  box-shadow: 0 0 0 4px rgba(78, 231, 160, 0.1);
}

.msc-icon-button {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: var(--msc-white);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.msc-icon-button svg {
  width: 20px;
  height: 20px;
}

.msc-view {
  min-height: 0;
  flex: 1;
}

.msc-toast {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 8;
  padding: 12px 15px;
  border-radius: 14px;
  color: var(--msc-white);
  background: rgba(5, 6, 8, 0.94);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
  font-size: 13px;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.msc-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.msc-backdrop:not([hidden]) {
  display: block;
}

.msc-panel:not([hidden]) {
  display: flex;
}

.msc-backdrop[hidden],
.msc-panel[hidden],
.msc-panel [hidden] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
