html,
body {
  margin: 0;
  height: 100%;
  background: #000;
  color: #eee;
  font:
    14px system-ui,
    sans-serif;
  overflow: hidden;
}
#canvas {
  display: block;
  width: 100vw;
  height: 100vh;
  touch-action: none;
}
#panel {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 280px;
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: rgba(20, 20, 20, 0.85);
  padding: 10px 12px;
  border-radius: 6px;
}
#panel h1 {
  font-size: 16px;
  margin: 6px 0;
}
#panel label {
  display: block;
  margin: 4px 0;
}
#panel input[type='number'] {
  width: 70px;
}
#panel a {
  color: #8cf;
}
#description,
.note {
  color: #bbb;
  font-size: 12px;
}
#status {
  position: absolute;
  top: 50%;
  width: 100%;
  text-align: center;
  font-size: 18px;
}
@media (max-width: 600px) {
  #panel {
    width: auto;
    right: 10px;
    max-height: 40vh;
  }
}
.open-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, 90vw);
  background: rgba(20, 20, 20, 0.92);
  padding: 20px 24px;
  border-radius: 8px;
}
.open-panel h1 {
  font-size: 20px;
  margin-top: 0;
}
.button {
  display: inline-block;
  background: #2a6db0;
  color: #fff;
  padding: 8px 14px;
  border-radius: 4px;
  cursor: pointer;
}
.button.small {
  padding: 4px 10px;
  font-size: 13px;
  margin-left: 6px;
}
.button input[type='file'] {
  display: none;
}
code {
  background: #333;
  padding: 1px 4px;
  border-radius: 3px;
}
.credits {
  position: absolute;
  bottom: 4px;
  right: 8px;
  font-size: 11px;
  margin: 0;
}
.credits a {
  color: #888;
}
.project {
  position: absolute;
  top: 10px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ddd;
  text-decoration: none;
  font-weight: 600;
  background: rgba(20, 20, 20, 0.7);
  padding: 4px 10px 4px 4px;
  border-radius: 6px;
}
.project:hover {
  color: #fff;
}
.open-panel h2 {
  font-size: 15px;
  margin: 16px 0 4px;
}
.samples {
  margin: 4px 0;
  padding-left: 20px;
}
.samples li {
  margin: 4px 0;
}
.open-panel a,
#panel a {
  color: #8cf;
}
#download,
#video {
  display: block;
  margin: 6px 0;
}
/* the hidden attribute wins over the panel's display rules (e.g. the up-axis label) */
[hidden] {
  display: none !important;
}
#precision {
  color: #ffb347;
  font-size: 13px;
}
#ceiling-controls input[type='range'] {
  display: block;
  width: 100%;
}
.panel-head {
  display: flex;
  align-items: center;
  gap: 6px;
}
#panel-toggle {
  flex: none;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #ddd;
  font-size: 16px;
  cursor: pointer;
}
#panel-toggle:hover {
  background: #333;
}
#panel.collapsed {
  width: auto;
  max-width: min(280px, calc(100vw - 80px));
  right: auto;
  padding: 4px 10px 4px 4px;
}
#panel.collapsed > :not(.panel-head) {
  display: none !important;
}
#panel.collapsed h1 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#view-tools {
  position: absolute;
  right: 12px;
  bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#view-tools button {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid #555;
  background: rgba(30, 30, 30, 0.9);
  color: #eee;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#view-tools button:hover {
  background: rgba(60, 60, 60, 0.95);
}
#view-tools .zoom {
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 6px #0007;
}
#view-tools .zoom button:first-child {
  border-radius: 5px 5px 0 0;
}
#view-tools .zoom button:last-child {
  border-radius: 0 0 5px 5px;
  border-top: 0;
}
#settings-button[aria-expanded='true'] {
  background: #2a6db0;
}
#settings {
  position: absolute;
  right: 60px;
  bottom: 28px;
  width: 260px;
  max-width: calc(100vw - 84px);
  max-height: calc(100vh - 60px);
  overflow: auto;
  background: rgba(20, 20, 20, 0.92);
  padding: 10px 12px;
  border-radius: 6px;
}
#settings h2 {
  font-size: 14px;
  margin: 0 0 6px;
}
#settings label {
  display: block;
  margin: 6px 0 2px;
}
#settings .note {
  margin: 2px 0 6px;
}
#settings input[type='range'] {
  display: block;
  width: 100%;
}
