:root {
  color-scheme: dark;
  --bg: #091422;
  --panel: #0b1a2bea;
  --line: #9edcff28;
  --cyan: #71e3ff;
  --text: #e4f1ff;
  --muted: #91a6bf;
  --accent: #b4edff;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 16px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  color: inherit;
  cursor: pointer;
  border: 1px solid var(--line);
  background: #102438b0;
  border-radius: 7px;
  transition:
    background 0.18s,
    border-color 0.18s;
}
button:hover {
  background: #244358;
  border-color: #70defe80;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}
button:disabled {
  opacity: 0.4;
  cursor: wait;
}
[hidden] {
  display: none !important;
}
#world {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  outline: none;
}
body:after {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  box-shadow: inset 0 0 150px #020a1570;
  z-index: 1;
}
.hud {
  position: fixed;
  z-index: 3;
  top: 0;
  left: 0;
  right: 0;
  height: 95px;
  padding: 25px 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(#071321d9, transparent);
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 24px;
  letter-spacing: 6px;
  font-weight: 600;
}
.brand small {
  display: block;
  font-size: 10px;
  letter-spacing: 2.5px;
  color: var(--muted);
  margin-top: 3px;
}
.brand-icon {
  color: var(--cyan);
  font-size: 43px;
  line-height: 1;
}
.divider {
  height: 31px;
  width: 1px;
  background: var(--line);
  margin: 0 8px;
}
.edition {
  font: 12px monospace;
  letter-spacing: 1px;
  color: var(--muted);
}
.hud-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.status {
  font-size: 12px;
  color: #bad4df;
  margin-right: 17px;
}
.status:before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #70e5c6;
  box-shadow: 0 0 10px #70e5c6;
  margin: 0 9px;
}
.icon-button {
  height: 34px;
  width: 34px;
}
.zone-caption {
  position: fixed;
  top: 125px;
  left: 40px;
  z-index: 2;
  pointer-events: none;
}
.eyebrow,
.tiny {
  font-family: monospace;
  letter-spacing: 1.9px;
  font-size: 11px;
  color: var(--muted);
}
.eyebrow {
  color: var(--cyan);
}
h1 {
  font-weight: 450;
  font-size: 31px;
  line-height: 1.25;
  letter-spacing: -0.7px;
  margin: 14px 0 9px;
}
h1 span {
  font-size: 15px;
  vertical-align: top;
  margin: 0 4px;
}
.zone-caption p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
#zones {
  position: fixed;
  top: 325px;
  left: 39px;
  z-index: 3;
  display: grid;
  gap: 5px;
}
#zones button {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
}
#zones .zone-index {
  font: 11px monospace;
  opacity: 0.7;
}
#zones button.active {
  color: #def7ff;
  background: #4196bc1c;
  box-shadow: inset 2px 0 var(--cyan);
  border-radius: 0;
}
#zones button:hover {
  color: white;
  background: #4196bc2b;
}
.scene-label {
  position: fixed;
  top: 136px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 2;
  pointer-events: none;
}
.scene-label .tiny {
  font-size: 10px;
  color: #94d6e4;
}
.scene-label i {
  display: inline-block;
  width: 4px;
  height: 4px;
  background: var(--cyan);
  border-radius: 50%;
  margin: 1px 4px;
}
.scene-label div {
  font-size: 16px;
  margin: 8px 0;
}
.scene-label code {
  font-size: 12px;
  color: var(--cyan);
}
.right-hud {
  position: fixed;
  z-index: 3;
  right: 36px;
  top: 39%;
  display: grid;
  gap: 7px;
  width: 140px;
}
.right-hud .tiny {
  margin: 0 9px 10px;
}
.right-hud button {
  text-align: left;
  border: 0;
  padding: 10px;
  font-size: 19px;
  background: transparent;
  color: var(--muted);
}
.right-hud button span {
  font-size: 12px;
  margin-left: 5px;
}
.right-hud button.selected {
  background: #153149aa;
  color: var(--cyan);
}
.hud-line {
  height: 1px;
  background: var(--line);
  margin: 12px 8px;
}
.experiment-dock {
  position: fixed;
  z-index: 3;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1px solid #8acfe547;
  border-top-color: #b3ebff68;
  background: linear-gradient(120deg, #142b3fea, #0b1b2bea);
  padding: 17px 20px;
  border-radius: 12px;
  box-shadow: 0 12px 50px #0005;
  backdrop-filter: blur(20px);
  white-space: nowrap;
}
.dock-icon {
  display: grid;
  place-items: center;
  font: 32px Georgia;
  color: var(--cyan);
  width: 42px;
  height: 42px;
  border: 1px solid #77d8f83b;
  border-radius: 9px;
}
.experiment-dock strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-top: 5px;
}
.primary {
  background: #a6eaff;
  color: #0a2536;
  border-color: #a6eaff;
  font-size: 13px;
  font-weight: 650;
  padding: 12px 16px;
}
.primary:hover {
  background: #d3f6ff;
}
.primary kbd {
  margin-left: 15px;
  border-color: #0b30444d;
  color: #0a2536;
}
kbd {
  font: 10px monospace;
  border: 1px solid #6383a559;
  border-radius: 3px;
  padding: 3px 5px;
  color: #bed0e3;
  background: #3c769214;
}
footer {
  position: fixed;
  z-index: 3;
  bottom: 0;
  left: 0;
  right: 0;
  min-height: 61px;
  padding: 18px 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #87c1d619;
  background: #08152299;
  gap: 15px;
  font-size: 11px;
  color: var(--muted);
}
footer span {
  margin: 0 8px;
}
footer button {
  border: 0;
  background: transparent;
  font-size: 11px;
}
#coordinates {
  font: 10px monospace;
  letter-spacing: 1px;
}
#explorer {
  position: fixed;
  z-index: 6;
  top: 96px;
  right: 26px;
  bottom: 80px;
  width: 395px;
  background: var(--panel);
  backdrop-filter: blur(28px);
  border: 1px solid #73c1e74d;
  box-shadow: 0 20px 80px #0006;
  border-radius: 15px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #285069 transparent;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 21px 21px 17px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 {
  font-size: 19px;
  margin: 4px 0 0;
  font-weight: 500;
}
.panel-body {
  padding: 20px;
}
.tabs {
  display: flex;
  border: 1px solid var(--line);
  padding: 4px;
  border-radius: 8px;
  gap: 3px;
  margin-bottom: 21px;
}
.tabs button {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 9px 2px;
  font-size: 12px;
}
.tabs button.active {
  background: #29465c;
  color: var(--cyan);
}
label {
  display: block;
  color: #aac0d3;
  font-size: 12px;
  margin-bottom: 8px;
}
input,
select,
textarea {
  width: 100%;
  background: #071624;
  color: var(--text);
  border: 1px solid #6894b841;
  border-radius: 6px;
  padding: 10px;
  font-size: 13px;
}
textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
  font-family: monospace;
}
select {
  margin-bottom: 14px;
}
input[type="range"] {
  padding: 0;
  accent-color: #76e3ff;
}
input[type="checkbox"] {
  width: auto;
  accent-color: var(--cyan);
}
.field {
  margin-bottom: 15px;
}
.hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  margin: 6px 0 14px;
}
.row {
  display: flex;
  gap: 9px;
  align-items: center;
}
.row > * {
  flex: 1;
  min-width: 0;
}
.full {
  width: 100%;
}
.section-title {
  font-size: 11px;
  font-family: monospace;
  letter-spacing: 1.6px;
  color: #91bbd1;
  margin: 24px 0 12px;
}
.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.mode-grid button {
  font-size: 11px;
  padding: 9px 1px;
}
.mode-grid button.active {
  background: #18465b;
  color: var(--cyan);
  border-color: #57c6e880;
}
.preset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.preset-grid button {
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 12px 10px;
  text-align: left;
  font-size: 12px;
}
.preset-grid button small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 5px;
  font-family: monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.preset-filter {
  margin-bottom: 12px;
}
.error {
  padding: 10px;
  border: 1px solid #f5987877;
  color: #ffc0a8;
  font-size: 12px;
  border-radius: 6px;
  margin-bottom: 12px;
}
.object-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.object-row span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.object-row button {
  padding: 3px 6px;
}
.swatch {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none !important;
}
.analysis {
  font-size: 12px;
  line-height: 1.85;
  color: #b5cde0;
  white-space: pre-line;
}
.analysis strong {
  color: var(--cyan);
}
details {
  border-top: 1px solid var(--line);
  padding-top: 15px;
  margin-top: 16px;
}
summary {
  font-size: 13px;
  color: #c5e3f2;
  cursor: pointer;
  margin-bottom: 15px;
}
.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}
.mini-grid label {
  font-size: 11px;
}
.mini-grid input {
  padding: 7px;
}
.open .right-hud {
  display: none;
}
.open .experiment-dock {
  display: none;
}
.open .scene-label {
  left: 43%;
}
#toast {
  position: fixed;
  bottom: 171px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background: #17354a;
  padding: 12px 20px;
  border: 1px solid #6dccea70;
  border-radius: 8px;
  font-size: 13px;
  max-width: 85%;
}
#crosshair {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 2;
  color: #c4eaff99;
  pointer-events: none;
}
#proximity {
  position: fixed;
  bottom: 200px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  background: #092034cd;
  border: 1px solid #61cde880;
  padding: 12px 20px;
  font-size: 13px;
  border-radius: 6px;
}
#touch-pad {
  display: none;
  position: fixed;
  z-index: 4;
  left: 20px;
  bottom: 135px;
  grid-template-columns: repeat(3, 40px);
  gap: 5px;
}
#touch-pad button {
  height: 40px;
  font-size: 20px;
  touch-action: none;
}
#touch-pad button:first-child {
  grid-column: 2;
}
#touch-pad button:nth-child(2) {
  grid-column: 1;
}
#help-panel {
  position: fixed;
  z-index: 12;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #0a1c2ef5;
  border: 1px solid #75c6e85c;
  border-radius: 14px;
  padding: 28px;
  max-width: 580px;
  width: 90%;
  max-height: 85vh;
  overflow: auto;
  box-shadow: 0 0 0 100vmax #020b19b0;
}
#help-panel h2 {
  font-size: 22px;
  font-weight: 500;
}
#help-panel p,
#help-panel li {
  font-size: 14px;
  line-height: 1.8;
  color: #b7cddd;
}
#help-panel code {
  color: var(--cyan);
}
@media (max-height: 750px) {
  .zone-caption {
    top: 108px;
  }
  h1 {
    font-size: 25px;
  }
  #zones {
    top: 265px;
    gap: 1px;
  }
  #zones button {
    padding: 8px 12px;
  }
  .experiment-dock {
    bottom: 77px;
  }
  .scene-label {
    top: 112px;
  }
}
@media (max-width: 1000px) {
  .zone-caption h1 {
    font-size: 25px;
  }
  .zone-caption {
    left: 24px;
  }
  .right-hud {
    right: 20px;
    width: 120px;
  }
  #zones {
    left: 20px;
  }
  #coordinates {
    display: none;
  }
  .experiment-dock strong {
    font-size: 12px;
  }
  .experiment-dock {
    gap: 12px;
    padding: 13px;
  }
  .open #zones,
  .open .zone-caption {
    display: none;
  }
  .open .scene-label {
    left: 24%;
  }
}
@media (max-width: 700px) {
  .hud {
    height: 75px;
    padding: 17px 19px;
  }
  .brand {
    font-size: 19px;
    gap: 8px;
  }
  .brand small {
    font-size: 8px;
  }
  .brand-icon {
    font-size: 32px;
  }
  .edition,
  .divider,
  .status {
    display: none;
  }
  .zone-caption {
    top: 99px;
    left: 22px;
  }
  .zone-caption h1 {
    font-size: 23px;
  }
  .zone-caption p {
    display: none;
  }
  #zones {
    top: 208px;
    left: 12px;
  }
  #zones button {
    font-size: 0;
    padding: 10px;
  }
  .zone-index {
    font-size: 12px !important;
  }
  .right-hud {
    right: 10px;
    width: 44px;
    top: 35%;
  }
  .right-hud .tiny,
  .right-hud button span {
    display: none;
  }
  .right-hud button {
    text-align: center;
    padding: 9px;
  }
  .scene-label {
    top: 98px;
    right: 18px;
    left: auto;
    transform: none;
    text-align: right;
    max-width: 45%;
  }
  .scene-label div {
    font-size: 12px;
  }
  .scene-label code {
    font-size: 10px;
  }
  .scene-label .tiny {
    font-size: 8px;
  }
  .experiment-dock {
    bottom: 68px;
    width: calc(100% - 30px);
    justify-content: space-between;
  }
  .experiment-dock strong {
    display: none;
  }
  .experiment-dock .tiny {
    font-size: 9px;
  }
  .dock-icon {
    width: 30px;
    height: 35px;
  }
  .primary {
    font-size: 12px;
    padding: 11px;
  }
  .primary kbd {
    display: none;
  }
  footer {
    padding: 13px 18px;
    min-height: 47px;
  }
  .key-guide {
    font-size: 0;
  }
  .key-guide kbd {
    font-size: 9px;
  }
  .key-guide span {
    margin: 3px;
  }
  .key-guide kbd:first-child {
    display: none;
  }
  #explorer {
    top: 78px;
    bottom: 60px;
    right: 12px;
    width: min(395px, calc(100% - 24px));
  }
  .open .scene-label {
    display: none;
  }
  .panel-head {
    padding: 15px 20px;
  }
  .panel-body {
    padding: 16px;
  }
  #touch-pad {
    display: grid;
  }
  body.open #touch-pad {
    display: none;
  }
  #proximity {
    bottom: 150px;
    width: max-content;
    max-width: 90%;
  }
  .hud-right {
    gap: 6px;
  }
  .icon-button {
    height: 30px;
    width: 30px;
  }
}
.action-row {
  margin-top: 16px;
}
.action-row button:not(.primary) {
  padding: 11px;
  font-size: 12px;
}
.check-row {
  display: flex;
  gap: 8px;
  align-items: center;
  line-height: 1.6;
}
.check-options {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
}
.check-options label {
  display: flex;
  align-items: center;
  gap: 7px;
}
.view-actions {
  margin-top: 8px;
}
.view-actions button {
  padding: 8px;
  font-size: 11px;
}
.object-select {
  flex: 1;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 0;
  background: transparent;
  font-size: 12px;
}
.object-select.selected {
  color: var(--cyan);
}
#reanalyze {
  margin-top: 14px;
}
#opacity-label {
  float: right;
}
select {
  cursor: pointer;
}
label {
  font-size: 13px;
}
.panel-body .hint {
  font-size: 12px;
}
.tabs button {
  font-size: 13px;
}
.mode-grid button {
  font-size: 12px;
}
.analysis {
  font-size: 14px;
}
.preset-grid button {
  font-size: 14px;
}
.preset-grid button small {
  font-size: 11px;
}
.primary {
  font-size: 14px;
}
.panel-body input,
.panel-body textarea,
.panel-body select {
  font-size: 14px;
}
input[type="color"] {
  padding: 3px;
  height: 40px;
}
.check-options label {
  font-size: 12px;
  gap: 4px;
}
.panel-head .tiny {
  font-size: 10px;
}
.panel-head h2 {
  font-size: 17px;
}
