
body {
  margin: 0;
  overflow: hidden;
  background: #000;
  font-family: monospace;
  color: #0f0;
}

html, body {
  background-color: #000;
}

#dropZone,
#video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#dropZone {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed rgba(0, 255, 0, 0.5);
  color: rgba(0, 255, 0, 0.7);
  background: rgba(0, 0, 0, 0.5);
  z-index: 9;
  pointer-events: auto;
}

#modelControls {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

#modelControls button {
  padding: 6px 12px;
  font-size: 0.9em;
}

#bgControls {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  z-index: 10;
}

#bgControls button {
  margin: 0 8px;
  padding: 8px 12px;
  font-size: 0.9em;
  background: #222;
  color: #0f0;
  border: 1px solid #0f0;
  border-radius: 4px;
  opacity: 0.95;
}

#btnCapture {
  background: yellow;
  color: black;
  font-weight: bold;
  margin-left: -100px;
}

#btnSwitchCamera {
  background: orange;
  color: black;
  font-weight: bold;
  margin-left: 10px;
  display: inline-block;
  z-index: 20;
}

video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  pointer-events: none;
}

canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  z-index: 5;
  pointer-events: auto;
}

@media screen and (max-width: 768px) {
  #bgControls button {
    padding: 6px 10px;
    font-size: 0.8em;
    margin: 0 4px;
  }

  #btnCapture,
  #btnSwitchCamera {
    font-size: 0.9em;
    padding: 6px 10px;
  }
}

/* 修正: iPadでも中央表示されるように */
#startOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #000 !important;
  z-index: 9999;
}

#startImage {
  max-width: 80vw;
  max-height: 80vh;
  object-fit: contain;
  cursor: pointer;
  box-shadow: 0 0 12px #333;
  border-radius: 16px;
}
