:root {
  color-scheme: dark;
  --ink: #03050a;
  --ivory: #eee8dc;
  --gold: #d8c49a;
}
* { box-sizing: border-box; }
html, body {
  width: 100%; height: 100%; margin: 0; overflow: hidden;
  background: var(--ink); color: var(--ivory);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
}
body { overscroll-behavior: none; }
#app {
  position: relative; width: 100%; height: 100%; height: 100dvh;
  min-height: 320px; overflow: hidden; isolation: isolate;
  background: radial-gradient(ellipse at 51% 48%, #101b2a 0%, #070a12 47%, #020307 100%);
}
#scene { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; touch-action: manipulation; }
#camera { position: fixed; width: 2px; height: 2px; opacity: 0; left: -10px; bottom: 0; pointer-events: none; }
.controls {
  position: absolute; z-index: 3; left: 50%; bottom: max(12px, env(safe-area-inset-bottom));
  transform: translateX(-50%); display: flex; align-items: center; justify-content: center;
  gap: 7px; max-width: calc(100% - 20px); padding: 7px;
  border: 1px solid rgba(217, 204, 177, .12); border-radius: 8px;
  background: rgba(5, 7, 12, .58); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 28px rgba(0,0,0,.22);
}
button {
  flex: 0 0 auto; border: 1px solid rgba(219, 209, 188, .28); border-radius: 4px;
  padding: 9px 12px; color: #e8e1d5; background: rgba(18, 21, 29, .76);
  font-size: 11px; letter-spacing: .04em; white-space: nowrap; cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
button:hover { border-color: rgba(235, 216, 171, .76); background: rgba(46, 47, 52, .88); }
button:active { transform: scale(.97); }
button.primary { color: #17151a; background: #d4c19a; border-color: #d4c19a; }
.volume { display: flex; align-items: center; gap: 7px; padding: 0 4px 0 6px; font-size: 10px; color: #c9c0b2; white-space: nowrap; }
.volume input { width: 78px; accent-color: #d4c19a; cursor: pointer; }
@media (max-width: 560px) {
  .controls { gap: 5px; padding: 6px; width: calc(100% - 16px); bottom: max(9px, env(safe-area-inset-bottom)); }
  button { padding: 9px 8px; font-size: 10px; }
  .volume { gap: 4px; padding: 0 2px; }
  .volume input { width: 54px; }
}
@media (max-width: 390px) {
  .controls { gap: 4px; }
  button { padding: 8px 6px; letter-spacing: 0; }
  .volume span { display: none; }
  .volume input { width: 46px; }
}

#trackingStatus { position: absolute; top: max(12px, env(safe-area-inset-top)); left: 16px; right: 16px; margin: 0; z-index: 2; color: #e8e1d5; font-size: 12px; pointer-events: none; text-shadow: 0 1px 5px #000; }
button:disabled { opacity: .65; cursor: wait; }
