
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #07111f;
  color: #f8fafc;
  font-family: Arial, Helvetica, sans-serif;
}

.app {
  max-width: 1150px;
  margin: auto;
  padding: 22px;
  background: #101e34;
  border-radius: 16px;
}

h1 {
  text-align: center;
  font-size: clamp(25px, 4vw, 36px);
  margin: 5px 0 8px;
}

.subtitle {
  text-align: center;
  color: #7dd3fc;
  margin: 0 0 18px;
  font-size: 17px;
}

.stage {
  position: relative;
  border: 1px solid #35516a;
  border-radius: 14px;
  overflow: hidden;
  background: #061625;
}

#scene3d {
  width: 100%;
  height: min(62vw, 610px);
  min-height: 360px;
}

#scene3d canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.hint {
  position: absolute;
  bottom: 12px;
  left: 14px;
  color: #9ab9cd;
  font-size: 12px;
  pointer-events: none;
}

.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 18px;
}

button {
  border: 0;
  border-radius: 8px;
  padding: 12px 17px;
  font-size: 15px;
  color: white;
  background: #2563eb;
  cursor: pointer;
}

button:hover {
  filter: brightness(1.15);
}

#pause {
  background: #0e7490;
}

#reset {
  background: #475569;
}

#measure {
  background: #147d91;
}

label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

input {
  accent-color: #38bdf8;
  width: 145px;
}

.readout {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 28px;
  padding: 20px 10px 6px;
  color: #bae6fd;
}

.readout strong {
  color: white;
}

.message {
  text-align: center;
  color: #facc15;
  min-height: 22px;
  font-size: 15px;
}
