* { box-sizing: border-box; }
:root {
  font: 15px/1.5 system-ui, sans-serif;
  color: #e5e5e5;
  background: #101012;
}
body { margin: 0; }
main { width: min(100% - 48px, 1280px); margin-inline: auto; }
header { display: flex; align-items: baseline; gap: 20px; min-height: 68px; padding-block: 20px; }
.home { color: #f0f0f2; font-weight: 630; text-decoration: none; }
h1 { margin: 0; font: inherit; color: #a9a9af; }
figure { margin: 0 0 32px; }
.stage {
  position: relative; min-height: 290px; height: clamp(390px, 72svh, 800px);
  background: #19191b; border: 1px solid #3b3b40; border-radius: 10px; overflow: hidden;
}
canvas, .fallback { position: absolute; inset: 0; width: 100%; height: 100%; }
.fallback { display: block; object-fit: contain; }
canvas { display: none; }
.stage[data-live] { cursor: grab; touch-action: none; user-select: none; }
.stage[data-live][data-dragging] { cursor: grabbing; }
.stage[data-live] canvas { display: block; }
.stage[data-live] .fallback { visibility: hidden; }
figcaption { display: grid; gap: 10px; margin-top: 14px; }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.controls[hidden] { display: none; }
#orbit-help { margin-inline-start: 6px; }
button {
  min-height: 44px; padding: 7px 14px; border: 1px solid #35353b; border-radius: 7px; color: #bbbbc0;
  background: transparent; font: inherit; cursor: pointer;
}
button:hover { background: #27272b; }
a:focus-visible, button:focus-visible, .stage:focus-visible { outline: 2px solid #eee; outline-offset: 3px; }
p { margin: 0; color: #b7b7be; }
@media (max-width: 630px) {
  main { width: calc(100% - 28px); }
  header { min-height: 60px; }
  .stage { height: min(66svh, 610px); }
  #orbit-help { margin-inline-start: 4px; }
}

@media (max-width: 370px) {
  button { padding-inline: 10px; }
}

@media (pointer: coarse) {
  .keyboard-help { display: none; }
}

/* The landing embeds the study as a full-viewport scene. */
body.embedded { background: #050508; }
.embedded main, .embedded figure { width: 100%; height: 100svh; margin: 0; }
.embedded header { display: none; }
.embedded .stage { width: 100%; height: 100%; min-height: 0; border: 0; border-radius: 0; }
.embedded .stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(5,5,8,.9), rgba(5,5,8,.65) 25%, transparent 65%), linear-gradient(180deg, rgba(5,5,8,.55), transparent 24%, transparent 72%, rgba(5,5,8,.55)); }
.embedded figcaption { position: absolute; right: clamp(24px, 5vw, 80px); bottom: 26px; margin: 0; }
.embedded #view-description { display: none; }
.embedded .controls { gap: 6px; justify-content: flex-end; }
.embedded button { background: #101014db; color: #e5e5e5; font-size: 14px; }
.embedded #orbit-help { font-size: 14px; color: #e5e5e5; text-shadow: 0 1px 5px #000; }
@media (max-width: 630px) {
  .embedded .stage::after { background: linear-gradient(180deg, rgba(5,5,8,.8), rgba(5,5,8,.67) 26%, rgba(5,5,8,.12) 58%, rgba(5,5,8,.65)); }
  .embedded figcaption { right: 24px; left: 24px; bottom: 20px; }
  .embedded .controls { justify-content: flex-start; }
}
