* {
  box-sizing: border-box;
}

html,
body,
#app {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #20262d;
  color: #edf2f7;
  font: 13px/1.35 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

#scene {
  display: block;
  width: 100%;
  height: 100%;
}

.panel,
.readout {
  position: fixed;
  z-index: 5;
  background: rgba(8, 10, 13, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
}

.panel {
  top: 12px;
  left: 12px;
  width: min(340px, calc(100vw - 24px));
  padding: 12px;
}

.readout {
  left: 12px;
  bottom: 12px;
  max-width: min(720px, calc(100vw - 24px));
  padding: 10px 12px;
  white-space: pre-wrap;
}

.row {
  display: grid;
  grid-template-columns: 58px 1fr auto auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.row.split {
  grid-template-columns: 58px 1fr;
}

label {
  color: #b8c5d1;
}

select,
input,
button {
  min-width: 0;
  height: 30px;
  border: 1px solid rgba(177, 196, 214, 0.26);
  border-radius: 4px;
  background: #111820;
  color: #f5f7fa;
  font: inherit;
}

input {
  padding: 0 8px;
}

button {
  padding: 0 10px;
  cursor: pointer;
}

button:hover,
select:hover,
input:hover {
  border-color: rgba(125, 211, 252, 0.7);
}

.toggles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0 10px;
}

.toggles label {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.stats {
  color: #b8c5d1;
  border-top: 1px solid rgba(177, 196, 214, 0.18);
  padding-top: 10px;
}

.reticle {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  margin-top: -5px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  pointer-events: none;
}

.tile-label {
  color: #fff;
  text-shadow: 0 1px 2px #000, 0 0 4px #000;
}

@media (max-width: 720px) {
  .panel {
    width: calc(100vw - 24px);
  }

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