html,
body,
#viewer {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f6f7f9;
  background: #11161b;
}

canvas {
  display: block;
}

.entry {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(17, 22, 27, 0.58);
  backdrop-filter: blur(8px);
}

.entry.minimized {
  pointer-events: none;
  background: transparent;
  backdrop-filter: none;
}

.entry.minimized .entry-panel {
  display: none;
}

.entry-panel {
  display: grid;
  gap: 14px;
  width: min(360px, calc(100vw - 32px));
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(18, 24, 30, 0.9);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

.controls {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 10;
  display: grid;
  gap: 10px;
  width: min(250px, calc(100vw - 32px));
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(18, 24, 30, 0.76);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(10px);
}

.brand {
  font-size: 18px;
  font-weight: 700;
}

.modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 28px;
  font-size: 14px;
}

label:has(input[type="checkbox"]) {
  justify-content: flex-start;
}

input[type="range"] {
  width: 118px;
}

button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  color: #101418;
  background: #f0c24b;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: #ffd56a;
}

button.active {
  color: #f6f7f9;
  background: #3b6f7c;
}

#status {
  margin: 0;
  color: #c8d0d8;
  font-size: 13px;
  line-height: 1.4;
}

.hint {
  margin: 0;
  color: #aeb8c2;
  font-size: 13px;
}

.crosshair {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 8;
  width: 14px;
  height: 14px;
  border-top: 2px solid rgba(255, 255, 255, 0.75);
  border-left: 2px solid rgba(255, 255, 255, 0.75);
  transform: translate(-50%, -50%) rotate(45deg);
  opacity: 0.8;
  pointer-events: none;
}

body:not(.locked) .crosshair {
  opacity: 0.24;
}

@media (max-width: 640px) {
  .controls {
    top: auto;
    bottom: 12px;
    left: 12px;
    width: calc(100vw - 24px);
    grid-template-columns: 1fr 1fr;
  }

  .brand,
  .modes,
  #top-view,
  #reset,
  #release {
    grid-column: 1 / -1;
  }
}
