* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #000; overflow: hidden; font-family: system-ui, sans-serif; }

#stage { position: fixed; inset: 0; }
#camera, #photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#overlay { position: absolute; inset: 0; width: 100%; height: 100%; }

#start-screen, #sample-menu {
  position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 12px; padding: 24px; text-align: center;
  background: rgba(0,0,0,0.55); color: #fff; z-index: 20;
}
#start-screen[hidden], #sample-menu[hidden] { display: none; }
#start-screen h1, #sample-menu h1 { font-size: 20px; margin: 0; }
#start-screen p { margin: 0; font-size: 14px; opacity: 0.85; max-width: 320px; }
#start-screen button, #sample-menu button {
  font-size: 16px; padding: 12px 20px; border-radius: 8px; border: none;
  background: #2b6cb0; color: #fff; cursor: pointer; min-width: 260px;
}
#start-screen button:active, #sample-menu button:active { background: #1a4d80; }
#status { color: #ffb4b4; min-height: 18px; }

#sample-list {
  display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto;
}

#controls {
  position: fixed; left: 8px; bottom: 8px; z-index: 15; color: #fff;
  background: rgba(0,0,0,0.55); border-radius: 8px; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 6px; font-size: 12px; max-width: 260px;
}
#controls[hidden] { display: none; }
#controls label { display: flex; align-items: center; gap: 6px; }
#controls label[hidden] { display: none; }
#controls input[type="range"] { flex: 1; }
#controls input[type="number"] { width: 100px; }

#debug {
  position: fixed; right: 8px; top: 8px; z-index: 15; color: #7ed9f5;
  background: rgba(0,0,0,0.55); border-radius: 8px; padding: 8px 10px;
  font: 11px/1.5 monospace; white-space: pre;
}

#btn-capture {
  position: fixed; right: 16px; bottom: 16px; z-index: 16;
  font-size: 15px; padding: 14px 18px; border-radius: 999px; border: none;
  background: #2b6cb0; color: #fff; cursor: pointer;
}
#btn-capture[hidden] { display: none; }
#btn-capture:active { background: #1a4d80; }

#btn-back {
  position: fixed; left: 8px; top: 8px; z-index: 16;
  font-size: 13px; padding: 8px 12px; border-radius: 8px; border: none;
  background: rgba(0,0,0,0.55); color: #fff; cursor: pointer;
}
#btn-back[hidden] { display: none; }
#btn-back:active { background: rgba(0,0,0,0.8); }
