/* 3D scenes of the experiments (shared/scene-view.js, windows/windows-3d.js, wear/wear-3d.js).
   The 3D canvas lies under the 2D canvas at the same fixed place; html.scene-3d fades the 2D one out (it keeps the pointer
   events and the aria label), so switching never moves anything. */
canvas.scene3d {
  position: fixed; inset: 0; width: 100%; height: 100%; display: block;
  opacity: 0; transition: opacity 0.8s ease;
}
canvas.scene3d.is-on { opacity: 1; }
html.scene-3d canvas.stage { opacity: 0 !important; transition: opacity 0.8s ease !important; }

/* 3D / 2D button: 48 x 44, language-neutral text, the full name in aria-label/title */
.scene-view {
  position: fixed; z-index: 58;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  min-width: 48px; height: 44px; padding: 0 10px;
  border-radius: 999px; border: 1px solid rgba(243, 239, 230, 0.22);
  background: rgba(10, 11, 22, 0.55); color: rgba(243, 239, 230, 0.86);
  font: 600 12.5px/1 var(--font, system-ui, sans-serif); letter-spacing: 0.04em;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  cursor: pointer; transition: background 0.2s, border-color 0.2s, opacity 0.3s;
}
.scene-view[hidden] { display: none; }
.scene-view:hover { background: rgba(30, 32, 50, 0.72); }
.scene-view:focus-visible { outline: 2px solid #ffe08a; outline-offset: 2px; }
.scene-view svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.scene-view .i2 { display: none; }
.scene-view.is-3d .i3 { display: none; }
.scene-view.is-3d .i2 { display: inline; }
.scene-view.is-dropped { border-color: rgba(255, 224, 138, 0.6); color: #ffe08a; }
.scene-view--tr { right: max(12px, env(safe-area-inset-right, 0px)); top: calc(var(--bar-h, 52px) + 8px + env(safe-area-inset-top, 0px)); }
.scene-view--bl { left: max(12px, env(safe-area-inset-left, 0px)); bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 720px) {
  .scene-view--tr { right: max(16px, env(safe-area-inset-right, 0px)); top: calc(var(--bar-h, 52px) + 12px + env(safe-area-inset-top, 0px)); }
  .scene-view--bl { left: max(16px, env(safe-area-inset-left, 0px)); bottom: calc(30px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-height: 560px) {
  .scene-view--bl { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
}

/* Labels that follow a point of the 3D scene (projected each frame; transform only, never layout) */
.scene-tags { position: fixed; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; contain: strict; }
.scene-chip {
  position: absolute; left: 0; top: 0; white-space: nowrap;
  padding: 3px 9px; border-radius: 999px;
  font: 600 11px/1.3 var(--font, system-ui, sans-serif); letter-spacing: 0.02em;
  color: #ffe2aa; background: rgba(28, 18, 6, 0.62); border: 1px solid rgba(255, 214, 150, 0.45);
  box-shadow: 0 0 14px rgba(255, 200, 120, 0.25);
  will-change: transform; transition: opacity 0.5s ease;
}
.scene-chip.is-off { opacity: 0; }
.scene-num {
  position: absolute; left: 0; top: 0; white-space: nowrap;
  font: 400 14px/1 var(--font, system-ui, sans-serif); font-variant-numeric: tabular-nums;
  color: rgba(246, 240, 228, 0.8); text-shadow: 0 0 8px rgba(0, 0, 0, 0.7);
  will-change: transform, opacity;
}
.scene-num.mine { font-size: 17px; font-weight: 500; color: #eac688; }
