@font-face {
  font-family: "Iosevka";
  src: url("https://cdn.jsdelivr.net/npm/@fontsource/iosevka/files/iosevka-latin-400-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "Iosevka";
  src: url("https://cdn.jsdelivr.net/npm/@fontsource/iosevka/files/iosevka-latin-600-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
}

:root {
  --bg-top: #10151c;
  --bg-bottom: #07090d;
  --ink: #d9e6f2;
  --muted: rgba(217, 230, 242, 0.68);
  --glass-edge: rgba(183, 213, 255, 0.12);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --editor-surface: rgba(6, 10, 14, 0.34);
  --editor-surface-filter: brightness(0.5) blur(20px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Iosevka", monospace;
  color: var(--ink);
  background: var(--bg-bottom);
}

body {
  position: relative;
}

.backdrop {
  display: none;
}

.auth-badge {
  position: relative;
  z-index: 36;
  display: inline-flex;
  align-items: center;
  gap: 0.68rem;
  max-width: min(100%, 24rem);
  padding: 0.48rem 0.62rem;
  border: 1px solid rgba(183, 213, 255, 0.14);
  border-radius: 999px;
  background: rgba(6, 10, 14, 0.58);
  box-shadow: var(--shadow);
  backdrop-filter: var(--editor-surface-filter);
  -webkit-backdrop-filter: var(--editor-surface-filter);
}

.auth-badge-scene {
  position: fixed;
  top: 1rem;
  left: 1rem;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    visibility 0s linear 0s;
}

.auth-badge-scene.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-0.4rem);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    visibility 0s linear 180ms;
}

.auth-badge-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(183, 213, 255, 0.18);
}

.auth-badge-copy {
  display: grid;
  min-width: 0;
}

.auth-badge-label {
  color: var(--muted);
  font-size: 0.48rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-badge-name {
  color: #f4fbff;
  font-size: 0.68rem;
  line-height: 1.15;
  white-space: nowrap;
}

.auth-badge-help {
  color: rgba(217, 230, 242, 0.72);
  font-size: 0.52rem;
  line-height: 1.35;
  white-space: nowrap;
}

.auth-badge form {
  margin: 0;
}

.auth-badge-action {
  appearance: none;
  border: 1px solid rgba(159, 215, 200, 0.22);
  border-radius: 999px;
  padding: 0.3rem 0.62rem;
  background: rgba(159, 215, 200, 0.1);
  color: #f3fbff;
  font: inherit;
  font-size: 0.54rem;
  letter-spacing: 0.05em;
  text-transform: lowercase;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.auth-badge-action:hover,
.auth-badge-action:focus-visible {
  border-color: rgba(159, 215, 200, 0.46);
  background: rgba(159, 215, 200, 0.18);
  transform: translateY(-1px);
}

.auth-badge-action:focus-visible {
  outline: none;
}

body:not(.hub-page):not(.login-page) {
  overflow: hidden;
}

.room-transition {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: #000;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 500ms linear,
    visibility 0s linear 0s;
  will-change: opacity;
}

.room-transition.is-clear {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 500ms linear,
    visibility 0s linear 500ms;
}

.scene-shell,
a-scene {
  width: 100vw;
  height: 100vh;
}

.html-panel-root {
  position: fixed;
  inset: 0;
  z-index: 24;
  pointer-events: none;
}

.html-panel {
  position: fixed;
  min-width: min(18rem, calc(100vw - 2rem));
  width: min(28rem, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
  max-height: min(34rem, calc(100vh - 2rem));
  overflow: auto;
  border-radius: 14px;
  background: var(--editor-surface);
  box-shadow: var(--shadow);
  pointer-events: auto;
  backdrop-filter: var(--editor-surface-filter);
  -webkit-backdrop-filter: var(--editor-surface-filter);
  outline: none;
}

.html-panel:focus,
.html-panel:focus-visible {
  outline: none;
}

.html-panel-content {
  position: relative;
  display: grid;
  gap: 0.75rem;
  padding: 1rem 1.05rem;
  color: var(--ink);
  font-size: 0.84rem;
  line-height: 1.55;
}

.html-panel-content > :first-child {
  margin-top: 0;
}

.html-panel-content > :last-child {
  margin-bottom: 0;
}

.html-panel-content h1,
.html-panel-content h2,
.html-panel-content h3 {
  margin: 0;
  color: #f4fbff;
  font-size: 0.96rem;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.html-panel-content p,
.html-panel-content ul,
.html-panel-content ol,
.html-panel-content blockquote {
  margin: 0;
}

.html-panel-content ul,
.html-panel-content ol {
  padding-left: 1.1rem;
}

.html-panel-content a {
  color: #9fdbc8;
}

.html-panel-content strong {
  color: #f4fbff;
}

.html-panel-content hr {
  width: 100%;
  height: 1px;
  margin: 0;
  border: 0;
  background: rgba(183, 213, 255, 0.12);
}

.a-enter-vr,
.a-enter-ar {
  display: none !important;
}

.editor-shell {
  --chat-pane-size: 2.2rem;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  width: min(34rem, 33vw);
  border: 0;
  border-radius: 0;
  background: var(--editor-surface);
  box-shadow: none;
  overflow: visible;
  transform: translateX(100%);
  opacity: 0;
  transition: transform 220ms ease, opacity 220ms ease;
}

.editor-shell,
.editor-pane-header,
.editor-tab,
.chat-pane,
.hub-stat,
.hub-panel,
.hub-disclosure,
.hub-table thead th,
.hub-empty-state,
.asset-vr-button,
.asset-shell {
  backdrop-filter: var(--editor-surface-filter);
  -webkit-backdrop-filter: var(--editor-surface-filter);
}

.editor-shell.is-visible {
  transform: translateX(0);
  opacity: 1;
}

#editor {
  min-height: 0;
  flex: 1 1 auto;
  background: var(--editor-surface);
  backdrop-filter: var(--editor-surface-filter);
  -webkit-backdrop-filter: var(--editor-surface-filter);
  overflow: visible;
}

#editor.is-hidden {
  display: none;
}

.editor-pane {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: visible;
}

.room-options-panel {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 1rem 0.92rem 1.08rem;
  background: var(--editor-surface);
  backdrop-filter: var(--editor-surface-filter);
  -webkit-backdrop-filter: var(--editor-surface-filter);
}

.room-options-panel[hidden] {
  display: none;
}

.editor-help-panel {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0.92rem;
  background: var(--editor-surface);
  backdrop-filter: var(--editor-surface-filter);
  -webkit-backdrop-filter: var(--editor-surface-filter);
}

.editor-help-panel[hidden] {
  display: none;
}

.editor-help-card {
  display: grid;
  gap: 1rem;
  padding: 0.92rem;
  border: 1px solid rgba(183, 213, 255, 0.12);
  background: rgba(255, 255, 255, 0.035);
}

.editor-help-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.editor-help-kicker {
  margin: 0 0 0.15rem;
  color: rgba(196, 231, 255, 0.6);
  font-size: 0.56rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.editor-help-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.editor-help-section {
  display: grid;
  gap: 0.65rem;
}

.editor-help-copy {
  margin: 0;
  color: var(--ink);
  font-size: 0.66rem;
  line-height: 1.55;
}

.editor-help-list {
  display: grid;
  gap: 0.46rem;
  margin: 0;
  padding-left: 1rem;
  color: var(--ink);
  font-size: 0.64rem;
  line-height: 1.55;
}

.editor-help-list kbd,
.welcome-note-copy kbd,
.auth-badge-help kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  min-height: 1.5rem;
  padding: 0.08rem 0.38rem;
  border: 1px solid rgba(183, 213, 255, 0.14);
  background: rgba(5, 10, 14, 0.62);
  color: #f4fbff;
  font: inherit;
  font-size: 0.62rem;
  line-height: 1;
}

.editor-help-links {
  display: grid;
  gap: 0.52rem;
}

.editor-help-link {
  display: grid;
  gap: 0.16rem;
  padding: 0.66rem 0.72rem;
  border: 1px solid rgba(183, 213, 255, 0.1);
  color: inherit;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.025);
  transition: border-color 140ms ease, background 140ms ease;
}

.editor-help-link strong {
  color: #f4fbff;
  font-size: 0.66rem;
  font-weight: 600;
}

.editor-help-link span {
  color: var(--muted);
  font-size: 0.58rem;
  line-height: 1.45;
}

.editor-help-link:hover,
.editor-help-link:focus-visible {
  border-color: rgba(159, 215, 200, 0.32);
  background: rgba(159, 215, 200, 0.08);
  outline: none;
}

.room-options-card-kicker {
  margin: 0;
  color: rgba(196, 231, 255, 0.6);
  font-size: 0.56rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.room-options-card-title {
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.room-options-grid {
  display: grid;
  gap: 0.72rem;
}

.room-options-card {
  display: grid;
  gap: 0.72rem;
  padding: 0.8rem 0.82rem;
  border: 1px solid rgba(183, 213, 255, 0.12);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.room-options-card-head {
  display: grid;
  gap: 0.18rem;
}

.room-options-card-title {
  font-size: 0.78rem;
}

.room-options-field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.room-options-field-grid-ssao {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.room-options-field {
  display: grid;
  gap: 0.34rem;
}

.room-options-label {
  color: #f3fbff;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

.room-options-help {
  display: block;
  margin-top: 0.14rem;
  color: rgba(221, 235, 246, 0.58);
  font-size: 0.54rem;
  line-height: 1.35;
}

.room-options-color-inputs {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.48rem;
  align-items: center;
}

.room-options-color-picker,
.room-options-text-input,
.room-options-number-input,
.room-options-select {
  width: 100%;
  border: 1px solid rgba(183, 213, 255, 0.14);
  border-radius: 7px;
  background: rgba(5, 10, 14, 0.62);
  color: var(--ink);
  font: inherit;
}

.room-options-text-input,
.room-options-number-input,
.room-options-select {
  min-height: 2.1rem;
  padding: 0.46rem 0.58rem;
  font-size: 0.64rem;
}

.room-options-color-picker {
  width: 2.5rem;
  min-width: 2.5rem;
  height: 2.1rem;
  padding: 0.18rem;
  cursor: pointer;
}

.room-options-select {
  appearance: none;
}

.room-options-color-picker:focus-visible,
.room-options-text-input:focus-visible,
.room-options-number-input:focus-visible,
.room-options-select:focus-visible,
.room-options-checkbox:focus-visible {
  outline: none;
  border-color: rgba(143, 214, 197, 0.44);
  box-shadow: 0 0 0 1px rgba(143, 214, 197, 0.2);
}

.room-options-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.58rem 0.62rem;
  border: 1px solid rgba(183, 213, 255, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
}

.room-options-checkbox {
  width: 1rem;
  height: 1rem;
  accent-color: #8fd6c5;
}

.editor-reload-badge {
  position: absolute;
  left: 0.72rem;
  bottom: 0.72rem;
  z-index: 4;
  max-width: calc(100% - 1.44rem);
  padding: 0.34rem 0.58rem;
  border: 1px solid rgba(159, 215, 200, 0.26);
  border-radius: 999px;
  background: rgba(6, 10, 14, 0.82);
  color: #f3fbff;
  font-size: 0.54rem;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  pointer-events: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.shader-error-banner {
  position: absolute;
  left: 0.72rem;
  right: 0.72rem;
  bottom: 3rem;
  z-index: 4;
  padding: 0.48rem 0.62rem;
  border: 1px solid rgba(255, 144, 144, 0.34);
  border-radius: 0.75rem;
  background: rgba(34, 10, 12, 0.9);
  color: #ffd8d8;
  font-size: 0.6rem;
  letter-spacing: 0.02em;
  line-height: 1.45;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.editor-pane-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.45rem;
  border-bottom: 1px solid rgba(183, 213, 255, 0.09);
  background: var(--editor-surface);
}

.editor-tabs {
  display: inline-flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 0.18rem;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.editor-tab-actions {
  display: inline-flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.shader-creator {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding-top: 0.15rem;
}

.shader-creator.is-hidden {
  display: none;
}

.shader-creator-label {
  color: var(--muted);
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

.shader-creator-form {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.shader-creator-input {
  min-width: 12rem;
  border: 1px solid rgba(159, 215, 200, 0.18);
  border-radius: 999px;
  padding: 0.28rem 0.72rem;
  background: rgba(4, 12, 18, 0.55);
  color: #f3fbff;
  font: inherit;
  font-size: 0.66rem;
}

.shader-creator-input:focus-visible {
  outline: none;
  border-color: rgba(159, 215, 200, 0.42);
}

.editor-tab-action {
  appearance: none;
  border: 1px solid rgba(159, 215, 200, 0.18);
  border-radius: 999px;
  padding: 0.2rem 0.62rem;
  background: rgba(255, 255, 255, 0.03);
  color: #dbe9ea;
  font: inherit;
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.editor-tab-action:hover,
.editor-tab-action:focus-visible {
  border-color: rgba(159, 215, 200, 0.42);
  background: rgba(159, 215, 200, 0.12);
  color: #f3fbff;
}

.editor-tab-action:focus-visible {
  outline: none;
}

.editor-tab {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 0;
  padding: 0.22rem 0.58rem;
  background: var(--editor-surface);
  color: var(--muted);
  font: inherit;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.editor-tab:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.03);
}

.editor-tab.is-active {
  color: #f3fbff;
  border-color: rgba(159, 215, 200, 0.24);
  background: rgba(255, 255, 255, 0.05);
}

#editor .monaco-editor .margin {
  box-sizing: border-box;
  padding-left: 8px;
}

#editor .monaco-editor,
#editor .monaco-editor.focused,
#editor .monaco-editor .overflow-guard,
#editor .monaco-editor-background,
#editor .monaco-editor .margin,
#editor .monaco-editor .monaco-editor-background,
#editor .monaco-editor .inputarea.ime-input {
  background: transparent !important;
  outline: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

#editor .monaco-editor .suggest-widget,
#editor .monaco-editor .monaco-hover,
#editor .monaco-editor .parameter-hints-widget,
.context-view.monaco-menu-container {
  background: rgba(6, 10, 14, 0.4) !important;
  backdrop-filter: var(--editor-surface-filter);
  -webkit-backdrop-filter: var(--editor-surface-filter);
  border: 1px solid rgba(183, 213, 255, 0.12) !important;
  box-shadow: var(--shadow);
}

#editor .monaco-editor .margin-view-overlays .line-numbers {
  box-sizing: border-box;
  padding-right: 6px;
  font-size: 11px;
  text-align: right;
}

#editor .monaco-editor .aframe-prop-key {
  color: #4ec9b0;
  font-weight: 600;
}

#editor .monaco-editor .aframe-prop-string {
  font-style: italic;
}

#editor .monaco-editor .aframe-prop-number {
  color: #b5cea8;
}

#editor .monaco-editor .aframe-prop-boolean {
  color: #569cd6;
}

#editor .monaco-editor .aframe-prop-punctuation {
  color: #d4d4d4;
}

.editor-chat-divider {
  position: relative;
  z-index: 1;
  flex: 0 0 10px;
  cursor: row-resize;
  touch-action: none;
  background: transparent;
}

.editor-chat-divider::before {
  content: "";
  position: absolute;
  left: 0.72rem;
  right: 0.72rem;
  top: 50%;
  height: 1px;
  transform: translateY(-50%);
  background: rgba(183, 213, 255, 0.14);
}

.editor-chat-divider::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3rem;
  height: 0.3rem;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  background: rgba(183, 213, 255, 0.18);
  box-shadow: 0 0 0 1px rgba(8, 11, 17, 0.2);
}

.chat-pane {
  position: relative;
  flex: 0 0 var(--chat-pane-size);
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0.72rem;
  background: var(--editor-surface);
  overflow: hidden;
}

.chat-status {
  margin: 0 0 0.62rem;
  font-size: 0.5rem;
  color: var(--muted);
}

.chat-messages {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: 0 0.08rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  overflow: auto;
  list-style: none;
}

.chat-message {
  width: fit-content;
  max-width: min(86%, 34rem);
  padding: 0.48rem 0.56rem;
  border: 1px solid rgba(183, 213, 255, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
}

.chat-message.is-self {
  align-self: flex-end;
  border-color: rgba(159, 215, 200, 0.24);
  background: rgba(122, 203, 184, 0.07);
}

.chat-message.is-self .chat-message-meta {
  text-align: right;
}

.chat-message-meta,
.chat-message-body {
  margin: 0;
}

.chat-message-meta {
  color: var(--muted);
  font-size: 0.46rem;
  margin-bottom: 0.18rem;
}

.chat-message-body {
  color: var(--ink);
  font-size: 0.56rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.chat-form {
  margin-top: 0.62rem;
}

.chat-input {
  width: 100%;
  resize: none;
  border: 1px solid rgba(183, 213, 255, 0.14);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  font: inherit;
  font-size: 0.58rem;
  line-height: 1.4;
  padding: 0.62rem 0.7rem;
}

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

@media (max-width: 880px) {
  .room-options-field-grid {
    grid-template-columns: 1fr;
  }

  .room-options-field-grid-ssao {
    grid-template-columns: 1fr;
  }

  .welcome-grid,
  .welcome-tutorial-grid {
    grid-template-columns: 1fr;
  }
}

.asset-chrome {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 35;
  width: min(21rem, calc(100vw - 2rem));
  display: grid;
  gap: 0.55rem;
  transform: translateX(calc(-100% - 2rem));
  opacity: 0;
  transition: transform 220ms ease, opacity 220ms ease;
}

.asset-chrome.is-visible {
  transform: translateX(0);
  opacity: 1;
}

.hub-page {
  overflow-x: hidden;
  overflow-y: auto;
  background: #000;
}

.hub-shell {
  position: relative;
  z-index: 1;
  width: min(92rem, calc(100vw - 2.5rem));
  margin: 0 auto;
  padding: 1.4rem 1.25rem 2rem;
}

.welcome-shell {
  display: grid;
  gap: 1rem;
}

.welcome-page {
  background: #000;
}

.welcome-grid,
.welcome-tutorial-grid {
  display: grid;
  gap: 0.72rem;
}

.welcome-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.welcome-tutorial-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.welcome-card,
.welcome-note {
  border: 1px solid rgba(183, 213, 255, 0.12);
  background: rgba(6, 10, 14, 0.38);
  backdrop-filter: var(--editor-surface-filter);
  -webkit-backdrop-filter: var(--editor-surface-filter);
}

.welcome-card {
  display: grid;
  gap: 0.32rem;
  min-height: 10.5rem;
  padding: 0.92rem;
  color: inherit;
  text-decoration: none;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.welcome-card:hover,
.welcome-card:focus-visible {
  border-color: rgba(159, 215, 200, 0.3);
  background: rgba(10, 16, 22, 0.52);
  outline: none;
  transform: translateY(-1px);
}

.welcome-card-primary {
  min-height: 12.4rem;
}

.welcome-card-label {
  color: rgba(196, 231, 255, 0.6);
  font-size: 0.56rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.welcome-card-title {
  color: #f4fbff;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.welcome-card-copy,
.welcome-copy,
.welcome-section-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.55;
}

.welcome-note {
  padding: 0.82rem 0.92rem;
}

.welcome-note-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.38rem;
  margin: 0;
  color: #f4fbff;
  font-size: 0.68rem;
  line-height: 1.55;
}

.welcome-section {
  display: grid;
  gap: 0.72rem;
}

.welcome-section-head {
  display: grid;
  gap: 0.22rem;
}

.welcome-section-title {
  margin: 0;
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.hub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.hub-heading-group {
  display: grid;
  gap: 0.55rem;
}

.hub-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.hub-nav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.hub-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.36rem 0.72rem;
  border: 1px solid rgba(144, 183, 255, 0.18);
  border-radius: 999px;
  background: rgba(30, 42, 61, 0.54);
  color: #dce9ff;
  font-size: 0.74rem;
  line-height: 1.1;
  text-decoration: none;
  text-transform: lowercase;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.hub-nav-link:hover,
.hub-nav-link:focus-visible {
  border-color: rgba(144, 183, 255, 0.42);
  background: rgba(45, 61, 84, 0.9);
  transform: translateY(-1px);
}

.hub-nav-link.is-active {
  border-color: rgba(159, 215, 200, 0.34);
  background: rgba(122, 203, 184, 0.14);
  color: #f4fbff;
}

body.login-page {
  overflow: auto;
  background: #000;
}

.login-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.login-panel {
  width: min(30rem, calc(100vw - 2.5rem));
  display: grid;
  gap: 0.9rem;
  padding: 1.3rem;
  border: 1px solid rgba(183, 213, 255, 0.14);
  border-radius: 16px;
  background: rgba(6, 10, 14, 0.56);
  box-shadow: var(--shadow);
  backdrop-filter: var(--editor-surface-filter);
  -webkit-backdrop-filter: var(--editor-surface-filter);
}

.login-kicker {
  margin: 0;
  color: rgba(196, 231, 255, 0.62);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.login-title {
  margin: 0;
  font-size: clamp(1.8rem, 6vw, 2.8rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.login-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.login-copy code {
  color: #f4fbff;
  font-family: inherit;
  font-size: 0.94em;
}

.login-error {
  margin: 0;
  padding: 0.72rem 0.8rem;
  border: 1px solid rgba(255, 145, 145, 0.28);
  border-radius: 10px;
  background: rgba(56, 15, 19, 0.84);
  color: #ffd8d8;
  font-size: 0.74rem;
  line-height: 1.5;
}

.login-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 3rem;
  padding: 0.72rem 1rem;
  border: 1px solid rgba(159, 215, 200, 0.26);
  border-radius: 999px;
  background: rgba(30, 42, 61, 0.86);
  color: #f4fbff;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.login-button:hover,
.login-button:focus-visible {
  border-color: rgba(159, 215, 200, 0.5);
  background: rgba(36, 50, 72, 0.94);
  transform: translateY(-1px);
}

.login-button:focus-visible {
  outline: none;
}

.hub-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.1rem;
}

.hub-create-room {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1.1rem;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(183, 213, 255, 0.14);
  border-radius: 12px;
  background: var(--editor-surface);
  box-shadow: var(--shadow);
}

.hub-create-room-copy {
  display: grid;
  gap: 0.3rem;
}

.hub-create-room-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.hub-create-room-form {
  display: grid;
  gap: 0.7rem;
}

.hub-create-room-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: rgba(231, 243, 255, 0.92);
}

.hub-create-room-controls {
  display: block;
}

.hub-create-room-input {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  min-height: 3.5rem;
  padding: 0.95rem 1.1rem;
  border: 1px solid rgba(183, 213, 255, 0.22);
  border-radius: 12px;
  background: rgba(2, 4, 7, 0.98);
  color: #f4fbff;
  caret-color: #f4fbff;
  font-family: inherit;
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0.015em;
  line-height: 1.2;
}

.hub-create-room-input::placeholder {
  color: rgba(199, 215, 234, 0.44);
  -webkit-text-fill-color: rgba(199, 215, 234, 0.44);
}

.hub-create-room-input:focus-visible {
  outline: none;
  border-color: rgba(144, 183, 255, 0.56);
  box-shadow: 0 0 0 3px rgba(144, 183, 255, 0.14);
}

.hub-create-room-input.is-collision {
  border-color: rgba(255, 102, 102, 0.92);
  box-shadow: 0 0 0 1px rgba(255, 102, 102, 0.28);
}

.hub-create-room-actions {
  display: flex;
  justify-content: flex-end;
}

.hub-create-room-button {
  min-width: 12rem;
  padding: 0.68rem 1rem;
  font-family: inherit;
  font-size: 0.96rem;
}

.hub-create-room-help,
.hub-create-room-feedback {
  margin: 0;
  font-size: 0.82rem;
}

.hub-create-room-help {
  color: var(--muted);
}

.hub-create-room-feedback {
  color: #ffb1b1;
}

.hub-create-room-feedback.is-visible {
  display: block;
}

.hub-stat {
  min-width: 10rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid rgba(183, 213, 255, 0.14);
  border-radius: 10px;
  background: var(--editor-surface);
  box-shadow: var(--shadow);
}

.hub-stat-label,
.hub-cell-secondary {
  color: var(--muted);
}

.hub-stat-label {
  display: block;
  font-size: 0.82rem;
  margin-bottom: 0.3rem;
}

.hub-stat-value {
  font-size: 1.1rem;
  font-weight: 600;
}

.hub-panel {
  border: 1px solid rgba(183, 213, 255, 0.14);
  border-radius: 12px;
  background: var(--editor-surface);
  box-shadow: var(--shadow);
  overflow: auto;
}

.hub-directory-stack {
  display: grid;
  gap: 1rem;
}

.hub-section {
  display: grid;
  gap: 0.7rem;
}

.hub-section-heading,
.hub-disclosure-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.hub-section-title {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.hub-section-count {
  color: var(--muted);
  font-size: 0.82rem;
}

.hub-disclosure {
  border: 1px solid rgba(183, 213, 255, 0.12);
  border-radius: 12px;
  background: var(--editor-surface);
  box-shadow: var(--shadow);
}

.hub-disclosure-summary {
  padding: 0.9rem 1rem;
  cursor: pointer;
  list-style: none;
}

.hub-disclosure-summary::-webkit-details-marker {
  display: none;
}

.hub-disclosure-summary::after {
  content: "+";
  color: #90b7ff;
  font-size: 1.1rem;
  line-height: 1;
}

.hub-disclosure[open] .hub-disclosure-summary::after {
  content: "−";
}

.hub-disclosure-body {
  padding: 0 0.55rem 0.55rem;
}

.hub-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 70rem;
}

.hub-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 1rem 1.1rem;
  text-align: left;
  font-size: 0.84rem;
  font-weight: 600;
  color: rgba(231, 243, 255, 0.92);
  background: var(--editor-surface);
  border-bottom: 1px solid rgba(183, 213, 255, 0.14);
}

.hub-table tbody tr {
  border-bottom: 1px solid rgba(183, 213, 255, 0.08);
}

.hub-table tbody tr:last-child {
  border-bottom: 0;
}

.hub-table tbody th,
.hub-table tbody td {
  padding: 1rem 1.1rem;
  text-align: left;
  vertical-align: top;
}

.hub-room-cell {
  min-width: 15rem;
}

.hub-preview-cell {
  width: 12.5rem;
}

.hub-actions-cell {
  min-width: 10rem;
}

.hub-thumbnail-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 11rem;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(183, 213, 255, 0.16);
  border-radius: 10px;
  background: rgba(10, 14, 22, 0.96);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  text-decoration: none;
}

.hub-thumbnail-frame:hover,
.hub-thumbnail-frame:focus-visible {
  border-color: rgba(144, 183, 255, 0.4);
}

.hub-thumbnail-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hub-thumbnail-empty {
  padding: 0 0.85rem;
  color: rgba(224, 235, 248, 0.82);
  font-size: 0.78rem;
  line-height: 1.35;
  text-align: center;
  text-wrap: balance;
}

.hub-room-link,
.hub-room-secondary {
  display: inline-block;
}

.hub-room-link {
  color: #90b7ff;
  font-size: 1rem;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.15em;
}

.hub-room-secondary {
  margin-left: 0.5rem;
  color: #c7d7ea;
  font-size: 0.82rem;
}

.hub-cell-primary {
  font-size: 0.98rem;
}

.hub-cell-secondary {
  margin-top: 0.18rem;
  font-size: 0.82rem;
}

.hub-breakdown-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hub-breakdown-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  column-gap: 1.1rem;
  color: var(--ink);
  font-size: 0.68rem;
  line-height: 1.2;
  margin-bottom: 0.18rem;
}

.hub-breakdown-label {
  min-width: 0;
  color: var(--muted);
  opacity: 0.56;
}

.hub-breakdown-value {
  color: var(--ink);
  font-size: 0.74rem;
  opacity: 0.94;
  white-space: nowrap;
}

.hub-breakdown-item.is-empty {
  color: var(--muted);
}

.hub-breakdown-item.is-empty .hub-breakdown-value {
  opacity: 0.72;
}

.hub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.hub-actions form {
  margin: 0;
}

.hub-action-button {
  appearance: none;
  border: 1px solid rgba(144, 183, 255, 0.2);
  border-radius: 999px;
  padding: 0.38rem 0.72rem;
  background: rgba(30, 42, 61, 0.86);
  color: #dce9ff;
  font: inherit;
  font-size: 0.78rem;
  line-height: 1.1;
  text-transform: lowercase;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.hub-action-button:hover,
.hub-action-button:focus-visible {
  border-color: rgba(144, 183, 255, 0.45);
  background: rgba(45, 61, 84, 0.96);
  transform: translateY(-1px);
}

.hub-action-button.is-danger {
  border-color: rgba(255, 122, 122, 0.24);
  color: #ffd5d5;
  background: rgba(70, 24, 28, 0.82);
}

.hub-action-button.is-danger:hover,
.hub-action-button.is-danger:focus-visible {
  border-color: rgba(255, 122, 122, 0.48);
  background: rgba(96, 34, 39, 0.94);
}

.hub-empty-state {
  padding: 1rem 1.1rem;
  border: 1px dashed rgba(183, 213, 255, 0.16);
  border-radius: 12px;
  color: var(--muted);
  background: var(--editor-surface);
}

@media (max-width: 900px) {
  .auth-badge-scene {
    top: 0.75rem;
    left: 0.75rem;
    right: 0.75rem;
    justify-content: space-between;
  }

  .hub-shell {
    width: calc(100vw - 1rem);
    padding: 0.75rem 0.5rem 1rem;
  }

  .hub-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  }

  .hub-create-room-controls {
    display: block;
  }

  .hub-create-room-actions,
  .hub-create-room-button {
    width: 100%;
  }

  .hub-panel {
    overflow-x: auto;
  }

  .hub-disclosure-summary {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}

.asset-vr-button {
  appearance: none;
  border: 1px solid rgba(183, 213, 255, 0.16);
  border-radius: 0;
  width: 2.8rem;
  height: 2.8rem;
  padding: 0;
  background: var(--editor-surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  box-shadow: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.asset-vr-button:hover,
.asset-vr-button:focus-visible {
  border-color: rgba(159, 215, 200, 0.48);
  background: rgba(255, 255, 255, 0.03);
  transform: translateY(-1px);
}

.asset-vr-button:focus-visible {
  outline: 2px solid rgba(159, 215, 200, 0.28);
  outline-offset: 2px;
}

.asset-shell {
  display: grid;
  gap: 0.55rem;
  padding: 0.56rem;
  border: 1px solid var(--glass-edge);
  border-radius: 7px;
  background: var(--editor-surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.asset-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: none;
}

.asset-dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 4.4rem;
  padding: 0.8rem;
  border: 1px dashed rgba(159, 215, 200, 0.32);
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.asset-dropzone:hover,
.asset-dropzone.is-dragging,
.asset-dropzone.is-uploading {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(159, 215, 200, 0.56);
  transform: translateY(-1px);
}

.asset-dropzone-copy {
  text-align: center;
  font-size: 0.57rem;
  line-height: 1.4;
}

.asset-upload-progress {
  width: min(100%, 15rem);
  height: 0.36rem;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(159, 215, 200, 0.08);
}

.asset-upload-progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: rgba(125, 218, 201, 0.96);
  transition: width 120ms linear;
}

.asset-upload-progress-label {
  text-align: center;
  font-size: 0.52rem;
  line-height: 1.35;
  color: var(--muted);
}

.scene-asset-status {
  padding: 0.46rem 0.58rem;
  border: 1px solid rgba(159, 215, 200, 0.2);
  border-radius: 7px;
  background: rgba(122, 203, 184, 0.08);
  color: var(--ink);
  font-size: 0.54rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.asset-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.asset-library-disclosure {
  border: 1px solid rgba(183, 213, 255, 0.12);
  border-radius: 7px;
  background: transparent;
  overflow: hidden;
}

.asset-disclosure-label {
  display: block;
  padding: 0.54rem 0.64rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  font-size: 0.6rem;
}

.asset-disclosure-label::-webkit-details-marker {
  display: none;
}

.asset-library-disclosure > summary::after {
  content: "+";
  float: right;
  color: var(--muted);
}

.asset-library-disclosure[open] > summary::after {
  content: "-";
}

.asset-list {
  max-height: 17rem;
  margin: 0;
  padding: 0 0.52rem 0.52rem;
  overflow: auto;
  list-style: none;
  display: grid;
  gap: 0.65rem;
}

.asset-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.15rem;
  color: rgba(217, 230, 242, 0.92);
  font-size: 0.48rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.asset-section-title {
  min-width: 0;
}

.asset-section-count {
  padding: 0.1rem 0.36rem;
  border: 1px solid rgba(159, 215, 200, 0.22);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.42rem;
}

.asset-section-empty {
  padding: 0.5rem 0.64rem;
  border: 1px dashed rgba(183, 213, 255, 0.12);
  border-radius: 7px;
  color: var(--muted);
  background: rgba(12, 17, 25, 0.24);
  font-size: 0.456rem;
}

.asset-card {
  padding: 0.64rem;
  border: 1px solid rgba(183, 213, 255, 0.12);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
}

.asset-preview {
  display: grid;
  place-items: center;
  min-height: 6.6rem;
  margin-bottom: 0.7rem;
  border: 1px solid rgba(183, 213, 255, 0.12);
  border-radius: 7px;
  overflow: hidden;
  background: rgba(6, 9, 14, 0.88);
}

.asset-preview-media {
  display: block;
  width: 100%;
  max-height: 10rem;
  object-fit: cover;
}

.asset-preview-audio {
  width: calc(100% - 0.8rem);
  margin: 0 0.4rem 0.4rem;
  height: 2rem;
}

.asset-preview-audio-icon,
.asset-preview-model {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 6.6rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: rgba(217, 230, 242, 0.9);
  background: rgba(17, 24, 34, 0.68);
}

.asset-card-header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
}

.asset-name,
.asset-meta,
.asset-path,
.asset-snippet {
  margin: 0;
}

.asset-name {
  font-size: 0.54rem;
  font-weight: 600;
  word-break: break-word;
}

.asset-meta,
.asset-path,
.asset-attachment {
  margin-top: 0.35rem;
  font-size: 0.456rem;
  color: var(--muted);
  word-break: break-word;
}

.asset-attachment {
  color: rgba(159, 215, 200, 0.86);
}

.asset-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.asset-copy-button {
  padding: 0.29rem 0.5rem;
  border: 1px solid rgba(159, 215, 200, 0.25);
  border-radius: 999px;
  background: rgba(159, 215, 200, 0.12);
  color: var(--ink);
  font: inherit;
  font-size: 0.468rem;
  cursor: pointer;
}

.asset-copy-button:hover {
  background: rgba(159, 215, 200, 0.2);
}

.asset-snippet {
  margin-top: 0.75rem;
  padding: 0.52rem;
  border-radius: 7px;
  background: rgba(6, 9, 14, 0.7);
  color: #c5d8e9;
  font-size: 0.432rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

.asset-empty {
  padding: 0.64rem;
  border: 1px dashed rgba(183, 213, 255, 0.14);
  border-radius: 7px;
  color: var(--muted);
  background: rgba(12, 17, 25, 0.46);
  font-size: 0.456rem;
}

@media (max-width: 960px) {
  body {
    overflow: auto;
  }

  .asset-shell {
    width: min(22rem, calc(100vw - 2rem));
  }

  .editor-shell {
    top: auto;
    left: 1rem;
    right: 1rem;
    bottom: 5.75rem;
    width: auto;
    height: 46vh;
  }
}
