:root {
  color-scheme: dark;
  --bg: #03101c;
  --bg-soft: rgba(7, 20, 34, 0.72);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.24);
  --text: #f2f7fb;
  --muted: #9fb5c7;
  --blue: #3fbbff;
  --orange: #ff9b45;
  --success: #9bfec9;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(41, 112, 172, 0.16), transparent 42%),
    radial-gradient(circle at bottom, rgba(255, 128, 41, 0.14), transparent 36%),
    var(--bg);
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
}

body.is-locked {
  cursor: none;
}

canvas {
  display: block;
}

#app {
  position: fixed;
  inset: 0;
  isolation: isolate;
}

.bg-grid,
.vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.bg-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at center, black 30%, transparent 80%);
}

.vignette {
  background:
    radial-gradient(circle at center, transparent 42%, rgba(0, 0, 0, 0.42)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), transparent 30%, rgba(0, 0, 0, 0.3));
}

#hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.brand {
  position: absolute;
  top: 28px;
  left: 28px;
  max-width: 420px;
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 10px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.brand h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4rem);
  letter-spacing: -0.06em;
}

.tagline {
  margin: 12px 0 0;
  color: rgba(242, 247, 251, 0.8);
  line-height: 1.55;
  max-width: 34ch;
}

.panel {
  background: linear-gradient(180deg, rgba(18, 34, 51, 0.82), rgba(5, 14, 24, 0.76));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.center-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(520px, calc(100vw - 32px));
  transform: translate(-50%, -50%);
  border-radius: 28px;
  padding: 28px;
  pointer-events: auto;
  transition:
    opacity 180ms ease,
    transform 220ms ease;
}

.center-panel.hidden {
  opacity: 0;
  transform: translate(-50%, -46%);
  pointer-events: none;
}

.center-panel h2 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.04em;
}

.center-panel p {
  margin: 0;
  color: rgba(242, 247, 251, 0.84);
  line-height: 1.6;
}

#enterButton {
  margin-top: 22px;
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  background: linear-gradient(135deg, var(--blue), #86e2ff);
  color: #04131f;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

#enterButton:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(63, 187, 255, 0.4);
}

.status-panel,
.controls-panel {
  position: absolute;
  bottom: 24px;
  width: min(360px, calc(50vw - 32px));
  border-radius: 22px;
  padding: 18px 18px 16px;
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

.status-panel {
  left: 24px;
}

.controls-panel {
  right: 24px;
}

.dialogue-panel {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: min(620px, calc(100vw - 44px));
  transform: translate(-50%, 18px);
  border-radius: 28px;
  padding: 22px 24px 20px;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 220ms ease;
}

.dialogue-panel.active {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.dialogue-panel h2 {
  margin: 0 0 10px;
  font-size: clamp(1.45rem, 2vw, 2rem);
  letter-spacing: -0.04em;
}

.dialogue-panel p {
  margin: 0;
  color: rgba(242, 247, 251, 0.82);
  line-height: 1.55;
}

.dialogue-choices {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.dialogue-choice {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.dialogue-choice:hover,
.dialogue-choice.is-focused {
  transform: translateY(-1px);
  border-color: rgba(134, 226, 255, 0.34);
  background: rgba(255, 255, 255, 0.09);
}

.dialogue-choice strong {
  display: block;
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.62);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dialogue-hint {
  margin-top: 12px !important;
  color: rgba(242, 247, 251, 0.54) !important;
  font-size: 0.86rem;
 }

.status-row,
.controls-panel li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.status-row + .status-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.status-row span,
.controls-panel span {
  color: rgba(242, 247, 251, 0.72);
}

.status-row strong,
.controls-panel strong {
  font-size: 0.95rem;
}

.portal-blue {
  color: var(--blue);
}

.portal-orange {
  color: var(--orange);
}

.online {
  color: var(--success);
}

.controls-panel ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.controls-panel li + li {
  margin-top: 8px;
}

#crosshair {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28px;
  height: 28px;
  margin-left: -14px;
  margin-top: -14px;
  opacity: 0.85;
  transition: opacity 160ms ease, transform 160ms ease;
}

#crosshair span {
  position: absolute;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.22);
}

#crosshair span:first-child {
  left: 50%;
  top: 6px;
  width: 2px;
  height: 16px;
  transform: translateX(-50%);
}

#crosshair span:last-child {
  left: 6px;
  top: 50%;
  width: 16px;
  height: 2px;
  transform: translateY(-50%);
}

body.is-locked #crosshair {
  transform: scale(1);
}

body:not(.is-locked) #crosshair {
  opacity: 0;
  transform: scale(0.6);
}

.editor-launcher {
  position: absolute;
  top: 26px;
  right: 26px;
  z-index: 12;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 12px 18px;
  background: rgba(8, 18, 29, 0.84);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(16px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.24);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.editor-launcher:hover {
  transform: translateY(-1px);
  border-color: rgba(134, 226, 255, 0.42);
  background: rgba(12, 28, 42, 0.9);
}

.editor-workspace {
  position: absolute;
  inset: 14px;
  z-index: 16;
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr) minmax(360px, 440px);
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 14px;
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  transition:
    opacity 220ms ease,
    transform 240ms ease;
  pointer-events: none;
}

.editor-workspace.open {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.editor-workspace:not(.open),
.editor-workspace:not(.open) * {
  pointer-events: none !important;
}

.editor-topbar,
.editor-pane,
.editor-bottombar {
  pointer-events: auto;
}

.editor-menubar {
  grid-column: 1 / -1;
  grid-row: 1;
  border-radius: 14px;
  min-height: 38px;
  padding: 9px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background:
    linear-gradient(180deg, rgba(52, 56, 66, 0.96), rgba(33, 36, 43, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 14px 28px rgba(0, 0, 0, 0.18);
}

.editor-menu-items,
.editor-menu-status {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.editor-menu-items span,
.editor-menu-status span {
  color: rgba(241, 246, 252, 0.72);
  font-size: 0.82rem;
  letter-spacing: 0.01em;
}

.editor-topbar {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-radius: 16px;
  padding: 16px 18px;
  background:
    linear-gradient(180deg, rgba(45, 50, 60, 0.94), rgba(26, 31, 39, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 30px rgba(0, 0, 0, 0.18);
}

.editor-topbar-copy {
  max-width: 760px;
}

.editor-topbar-copy h2 {
  margin: 0;
  font-size: clamp(1.7rem, 2vw, 2.3rem);
  letter-spacing: -0.05em;
}

.editor-pane {
  min-height: 0;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background:
    linear-gradient(180deg, rgba(50, 54, 64, 0.95), rgba(28, 31, 38, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 30px rgba(0, 0, 0, 0.16);
}

.editor-hierarchy-pane {
  grid-column: 1;
  grid-row: 3;
}

.editor-scene-pane {
  grid-column: 2;
  grid-row: 3;
  background:
    linear-gradient(180deg, rgba(29, 32, 38, 0.96), rgba(20, 24, 30, 0.94));
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(182, 196, 219, 0.12);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 20px 48px rgba(0, 0, 0, 0.24);
}

.editor-inspector-pane {
  grid-column: 3;
  grid-row: 3;
}

.editor-scene-header,
.editor-scene-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.editor-scene-tabs,
.editor-scene-toolbar,
.editor-scene-state,
.editor-scene-readouts {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.editor-scene-tab,
.editor-tool-button {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(242, 247, 251, 0.76);
  font: inherit;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.editor-scene-tab:disabled {
  cursor: default;
  opacity: 0.62;
}

.editor-tool-button {
  min-width: 36px;
  justify-content: center;
}

.editor-tool-chip {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(242, 247, 251, 0.58);
  font: inherit;
  font-size: 0.78rem;
}

.editor-scene-tab.is-active,
.editor-tool-button.is-active {
  color: var(--text);
  border-color: rgba(96, 165, 250, 0.42);
  background: linear-gradient(180deg, rgba(73, 110, 154, 0.62), rgba(49, 70, 96, 0.58));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.editor-scene-state span,
.editor-scene-readouts span {
  border-radius: 6px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.22);
  color: rgba(242, 247, 251, 0.72);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.editor-scene-footer {
  align-items: flex-end;
}

.editor-scene-footer p {
  margin: 0;
  max-width: 48ch;
  color: rgba(242, 247, 251, 0.7);
  line-height: 1.45;
}

.editor-pane-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.editor-pane-header h3 {
  margin: 0;
  font-size: 1.12rem;
  letter-spacing: -0.03em;
}

.editor-pane-meta {
  color: rgba(242, 247, 251, 0.58);
  font-size: 0.84rem;
  text-align: right;
  line-height: 1.4;
}

.editor-status {
  margin: 10px 0 0;
  color: rgba(242, 247, 251, 0.8);
  line-height: 1.55;
}

.editor-search {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(9, 11, 15, 0.44);
  color: var(--text);
  font: inherit;
}

.editor-search::placeholder {
  color: rgba(242, 247, 251, 0.46);
}

.editor-scroll {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
}

.editor-scroll::-webkit-scrollbar {
  width: 10px;
}

.editor-scroll::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  background-clip: padding-box;
}

.editor-pane-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 8px;
  background: rgba(9, 11, 15, 0.34);
}

.editor-pane-tabs span {
  border-radius: 6px;
  padding: 6px 10px;
  color: rgba(242, 247, 251, 0.55);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.editor-pane-tabs span.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.editor-hierarchy {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.editor-hierarchy-group {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(14, 17, 23, 0.42);
  overflow: hidden;
}

.editor-hierarchy-group summary {
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: -0.02em;
}

.editor-hierarchy-group summary::-webkit-details-marker {
  display: none;
}

.editor-hierarchy-group-body {
  padding: 0 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.editor-hierarchy-item {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.editor-hierarchy-item:hover {
  transform: translateY(-1px);
  border-color: rgba(134, 226, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
}

.editor-hierarchy-item.is-selected {
  border-color: rgba(134, 226, 255, 0.48);
  background:
    linear-gradient(135deg, rgba(67, 97, 130, 0.4), rgba(53, 61, 72, 0.22)),
    rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 20px rgba(8, 23, 38, 0.22);
}

.editor-hierarchy-label {
  display: block;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.editor-hierarchy-meta {
  display: block;
  margin-top: 4px;
  color: rgba(242, 247, 251, 0.56);
  font-size: 0.82rem;
}

.editor-inspector {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.editor-empty {
  margin: 0;
  color: rgba(242, 247, 251, 0.64);
  line-height: 1.6;
}

.editor-readout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(242, 247, 251, 0.74);
}

.editor-readout strong {
  color: var(--text);
}

.editor-debug {
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 12px;
  background: rgba(7, 9, 13, 0.72);
  color: rgba(242, 247, 251, 0.76);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.editor-primary-action {
  border-color: rgba(92, 211, 255, 0.34) !important;
  background: linear-gradient(135deg, rgba(63, 187, 255, 0.26), rgba(134, 226, 255, 0.16)) !important;
}

.editor-bottombar {
  grid-column: 1 / -1;
  grid-row: 4;
  border-radius: 12px;
  padding: 10px 14px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  background:
    linear-gradient(180deg, rgba(38, 42, 50, 0.96), rgba(23, 26, 31, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.editor-bottom-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.editor-bottom-item span {
  color: rgba(242, 247, 251, 0.58);
  font-size: 0.9rem;
}

.editor-bottom-item strong {
  color: var(--text);
  font-size: 0.92rem;
}

.editor-scene-gizmo {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.26) 64%, transparent 66%);
  pointer-events: none;
}

.editor-scene-gizmo .axis {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  font-weight: 700;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.22);
}

.axis-x {
  right: 6px;
  top: 27px;
  background: #cf5757;
}

.axis-y {
  left: 27px;
  top: 6px;
  background: #5cce82;
}

.axis-z {
  left: 10px;
  bottom: 10px;
  background: #65a7ff;
}

body.editor-open .brand,
body.editor-open .status-panel,
body.editor-open .controls-panel {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

body.dialogue-open .brand {
  opacity: 0.24;
}

body.editor-open #crosshair {
  opacity: 0;
  transform: scale(0.6);
}

body.dialogue-open #crosshair {
  opacity: 0;
}

body.editor-fly {
  cursor: none;
}

.editor-panel {
  position: absolute;
  top: 22px;
  right: 22px;
  width: min(430px, calc(100vw - 28px));
  height: calc(100vh - 44px);
  border-radius: 28px;
  padding: 22px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  pointer-events: auto;
  opacity: 0;
  transform: translateX(calc(100% + 24px));
  transition:
    opacity 220ms ease,
    transform 240ms ease;
  z-index: 14;
}

.editor-panel.open {
  opacity: 1;
  transform: translateX(0);
}

.editor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.editor-header h2 {
  margin: 0;
  font-size: 1.7rem;
  letter-spacing: -0.04em;
}

.editor-actions {
  display: flex;
  gap: 8px;
}

.editor-actions button,
.editor-content button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.editor-actions button:hover,
.editor-content button:hover {
  transform: translateY(-1px);
  border-color: rgba(134, 226, 255, 0.32);
  background: rgba(255, 255, 255, 0.1);
}

.editor-status {
  margin: 0;
  color: rgba(242, 247, 251, 0.76);
  line-height: 1.55;
}

.editor-content {
  min-height: 0;
  overflow-y: auto;
  padding-right: 6px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.editor-content::-webkit-scrollbar {
  width: 10px;
}

.editor-content::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  background-clip: padding-box;
}

.editor-section {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(14, 17, 23, 0.52);
  overflow: hidden;
}

.editor-section summary {
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: -0.02em;
}

.editor-section summary::-webkit-details-marker {
  display: none;
}

.editor-section[open] summary {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.editor-section-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.editor-field {
  display: grid;
  gap: 8px;
}

.editor-field label {
  color: rgba(242, 247, 251, 0.74);
  font-size: 0.92rem;
}

.editor-field input,
.editor-field select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 9px 10px;
  background: rgba(9, 11, 15, 0.48);
  color: var(--text);
  font: inherit;
}

.editor-field input[type="color"] {
  min-height: 44px;
  padding: 6px;
}

.editor-field input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: var(--blue);
}

.editor-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.editor-inline-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.editor-note {
  margin: 0;
  color: rgba(159, 181, 199, 0.82);
  font-size: 0.88rem;
  line-height: 1.45;
}

.editor-group {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 12px;
}

.editor-group:first-child {
  border-top: 0;
  padding-top: 0;
}

.editor-group-title {
  margin: 0 0 10px;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

body.is-locked .brand {
  opacity: 0.24;
  transform: scale(0.88);
  transform-origin: top left;
}

body.is-locked .status-panel,
body.is-locked .controls-panel {
  opacity: 0.82;
  transform: translateY(4px);
}

body.editor-open .editor-launcher {
  background: rgba(19, 40, 56, 0.92);
  border-color: rgba(134, 226, 255, 0.32);
}

@media (max-width: 1100px), (max-height: 760px) {
  .brand {
    top: 18px;
    left: 18px;
    max-width: calc(100vw - 36px);
  }

  .status-panel,
  .controls-panel {
    width: calc(100vw - 36px);
    left: 18px;
    right: 18px;
  }

  .status-panel {
    bottom: 198px;
  }

  .controls-panel {
    bottom: 18px;
  }

  .editor-launcher {
    top: 18px;
    right: 18px;
  }

  .editor-panel {
    top: 12px;
    right: 12px;
    width: calc(100vw - 24px);
    height: calc(100vh - 24px);
  }
}

@media (max-width: 1360px) {
  .editor-workspace {
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr) minmax(320px, 380px);
  }
}

@media (max-width: 1080px), (max-height: 760px) {
  .editor-workspace {
    inset: 10px;
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
    grid-template-rows: auto auto minmax(220px, 40vh) minmax(0, 1fr) auto;
  }

  .editor-topbar {
    grid-column: 1 / -1;
    grid-row: 2;
    flex-direction: column;
  }

  .editor-hierarchy-pane {
    grid-column: 1;
    grid-row: 3;
  }

  .editor-scene-pane {
    grid-column: 1;
    grid-row: 4;
  }

  .editor-inspector-pane {
    grid-column: 2;
    grid-row: 3 / span 2;
  }

  .editor-bottombar {
    grid-column: 1 / -1;
    grid-row: 5;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .editor-workspace {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto minmax(160px, 22vh) minmax(180px, 26vh) minmax(0, 1fr) auto;
  }

  .editor-hierarchy-pane,
  .editor-inspector-pane,
  .editor-scene-pane {
    grid-column: 1;
  }

  .editor-hierarchy-pane {
    grid-row: 3;
  }

  .editor-scene-pane {
    grid-row: 4;
  }

  .editor-inspector-pane {
    grid-row: 5;
  }

  .editor-bottombar {
    grid-row: 6;
    grid-template-columns: 1fr;
  }
}
