#camera {
  width: min(100%, 720px);
  height: 100dvh;
  max-height: 100dvh;
  margin: 0 auto;
}

#camera .camera-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 12px;
  height: 100dvh;
  padding: 16px;
  overflow: hidden;
}

#camera .camera-view,
#camera .photo-review {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: #111;
  border-radius: 8px;
}

#camera #preview,
#camera .photo-review img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  border-radius: 0;
}

#reference-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  pointer-events: none;
}

.reference-overlay-state {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  padding: 8px 10px;
  color: #fff;
  background: rgba(16, 35, 56, 0.76);
  border-radius: 6px;
  font-size: 13px;
}

.reference-overlay-controls {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  padding: 8px 10px;
  color: #fff;
  background: rgba(16, 35, 56, 0.76);
  border-radius: 6px;
  font-size: 13px;
}

.reference-overlay-controls input {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: #68a7ff;
}

.camera-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.camera-actions[hidden] {
  display: none;
}

#camera #camera-hint {
  margin: 0;
  color: #536a83;
  font-size: 14px;
}
