.launcher-curtain {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 24px;
  color: #f4f8fc;
  background:
    radial-gradient(circle at 18% 8%, rgba(49, 157, 218, 0.2), transparent 34%),
    radial-gradient(circle at 82% 24%, rgba(63, 194, 165, 0.12), transparent 30%),
    linear-gradient(155deg, #071522, #040b13 72%);
}

.launcher-curtain[hidden] {
  display: none;
}

body.launcher-covered {
  overflow: hidden;
}

.launcher-page-header.topbar {
  position: sticky;
  z-index: 120;
  top: 0;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-direction: row;
  padding: 10px clamp(18px, 3vw, 48px);
  border-bottom: 1px solid rgba(155, 190, 220, 0.12);
  background: rgba(5, 13, 22, 0.82);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(18px) saturate(135%);
}

.launcher-header-brand.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.launcher-header-brand-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(122, 199, 242, 0.26);
  border-radius: 12px;
  color: inherit;
  background: linear-gradient(145deg, rgba(43, 145, 207, 0.25), rgba(43, 190, 164, 0.14));
}

.launcher-header-brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 3px;
  object-fit: contain;
}

.launcher-header-brand-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
  color: inherit;
}

.launcher-header-brand-copy strong {
  overflow: hidden;
  color: #f4f8fc;
  font-size: 16px;
  font-weight: 720;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.launcher-header-brand-copy small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 720;
  letter-spacing: 0.19em;
}

.launcher-header-actions.userbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: nowrap;
  color: inherit;
  font-size: inherit;
}

.launcher-header-user {
  display: flex;
  align-items: center;
  gap: 9px;
}

.launcher-header-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(91, 215, 189, 0.28);
  border-radius: 50%;
  color: #dffaf4;
  background: linear-gradient(145deg, rgba(50, 162, 194, 0.42), rgba(42, 172, 143, 0.32));
  font-size: 13px;
  font-weight: 760;
}

.launcher-header-user-copy {
  display: grid;
  gap: 1px;
  text-align: right;
}

.launcher-header-user-copy strong {
  max-width: 150px;
  overflow: hidden;
  color: #f4f8fc;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.launcher-header-user-copy small {
  color: var(--muted);
  font-size: 10px;
}

.launcher-page-header .launcher-header-button {
  min-width: auto;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #bed0df;
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
  font-weight: 650;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.launcher-page-header .launcher-header-button:hover {
  border-color: rgba(85, 185, 243, 0.34);
  color: #e9f7ff;
  background: rgba(85, 185, 243, 0.09);
}

.launcher-page-header .launcher-header-button svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.launcher-page-header .launcher-status-button[data-action="publish-scene"],
.launcher-page-header .launcher-config-button.active {
  border-color: rgba(85, 185, 243, 0.4);
  color: #eaf8ff;
  background: rgba(43, 154, 217, 0.16);
}

.launcher-page-header .scene-user-dropdown .launcher-header-button {
  width: 100%;
  justify-content: flex-start;
  padding: 0 12px;
}

.launcher-viewer-active .global-loading {
  top: 80px;
}

.launcher-card {
  box-sizing: border-box;
  width: min(430px, 100%);
  min-width: 0;
  display: grid;
  justify-items: center;
  padding: 34px 30px 30px;
  border: 1px solid rgba(134, 190, 225, 0.2);
  border-radius: 20px;
  background: rgba(10, 26, 40, 0.82);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
  text-align: center;
  backdrop-filter: blur(18px);
}

.launcher-brand {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(91, 215, 189, 0.24);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(43, 145, 207, 0.25), rgba(43, 190, 164, 0.14));
}

.launcher-brand img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 3px;
  object-fit: contain;
}

.launcher-spinner {
  width: 30px;
  height: 30px;
  margin-top: 24px;
  border: 2px solid rgba(85, 185, 243, 0.16);
  border-top-color: #55b9f3;
  border-radius: 50%;
  animation: launcher-spin 0.8s linear infinite;
}

.launcher-curtain.is-error .launcher-spinner {
  position: relative;
  border: 1px solid rgba(255, 127, 135, 0.32);
  background: rgba(193, 50, 63, 0.12);
  animation: none;
}

.launcher-curtain.is-error .launcher-spinner::before,
.launcher-curtain.is-error .launcher-spinner::after {
  content: "";
  position: absolute;
  top: 13px;
  left: 6px;
  width: 16px;
  height: 2px;
  border-radius: 99px;
  background: #ff9aa1;
}

.launcher-curtain.is-error .launcher-spinner::before { transform: rotate(45deg); }
.launcher-curtain.is-error .launcher-spinner::after { transform: rotate(-45deg); }

.launcher-eyebrow {
  margin: 16px 0 0;
  color: #77c7ed;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.2em;
}

.launcher-card h1 {
  margin: 9px 0 0;
  font-size: 26px;
  letter-spacing: -0.035em;
}

.launcher-card > p:last-of-type {
  width: 100%;
  min-width: 0;
  max-width: 330px;
  max-height: min(180px, 28dvh);
  overflow: auto;
  margin: 10px 0 0;
  color: #9db2c3;
  font-size: 12px;
  line-height: 1.75;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
  scrollbar-width: thin;
}

.launcher-card a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 22px;
  padding: 0 15px;
  border: 1px solid rgba(134, 190, 225, 0.2);
  border-radius: 10px;
  color: #bfd2df;
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
}

.launcher-card a:hover {
  border-color: rgba(85, 185, 243, 0.38);
  color: #eef9ff;
  background: rgba(85, 185, 243, 0.09);
}

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

@media (max-width: 860px) {
  .launcher-page-header.topbar {
    min-height: 62px;
    gap: 12px;
    padding: 8px 14px;
  }

  .launcher-header-brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .launcher-header-user-copy,
  .launcher-header-brand-copy,
  .scene-config-actions > .launcher-header-button > span,
  .scene-library-button > span {
    display: none;
  }

  .launcher-header-user.scene-user-identity {
    max-width: none;
  }

  .launcher-header-actions .scene-config-actions {
    gap: 4px;
  }

  .launcher-page-header .launcher-header-button {
    width: 38px;
    padding: 0;
  }

  .launcher-page-header + .stage-layout {
    height: calc(100vh - 62px);
  }

  .launcher-viewer-active .global-loading {
    top: 70px;
  }
}

@media (max-width: 440px) {
  .launcher-header-brand-copy strong {
    font-size: 14px;
  }

  .launcher-header-actions.userbar {
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .launcher-spinner {
    animation-duration: 1.8s;
  }
}
