:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #07090f;
  color: #f8fafc;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 20%, rgba(34, 197, 94, 0.16), transparent 34rem),
    #07090f;
}

#xr-canvas {
  display: block;
  width: 100vw;
  height: 100vh;
}

.panel {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 2;
  width: min(28rem, calc(100vw - 2rem));
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.84);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.32);
}

h1 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

p {
  margin: 0 0 1rem;
  color: #cbd5e1;
  line-height: 1.6;
}

code {
  color: #86efac;
}

.controls {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
  align-items: end;
}

label {
  display: grid;
  gap: 0.3rem;
  grid-column: 1 / -1;
  color: #cbd5e1;
  font-size: 0.85rem;
}

select,
button {
  min-height: 2.5rem;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 8px;
  background: #111827;
  color: #f8fafc;
  font: inherit;
}

button {
  cursor: pointer;
  font-weight: 700;
}

button:hover:not(:disabled) {
  border-color: #86efac;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

#log {
  min-height: 8rem;
  max-height: 14rem;
  margin: 1rem 0 0;
  padding: 0.75rem;
  overflow: auto;
  white-space: pre-wrap;
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.72);
  color: #dbeafe;
  font-size: 0.82rem;
}

@media (max-width: 620px) {
  .panel {
    inset: auto 0.75rem 0.75rem;
    width: auto;
  }

  .controls {
    grid-template-columns: 1fr;
  }
}
