/* Device-independent safety net. Teaching coordinates remain 1600 x 900. */
html, body { width:100%; height:100%; }
.frame-host { top:0; right:0; bottom:0; left:0; }
#courseFrame, .ink-canvas { top:0; right:0; bottom:0; left:0; }
.world:before, #celebration, #upgradedReward { top:0; right:0; bottom:0; left:0; }
.scene-sign.inline { top:auto; right:auto; bottom:auto; left:auto; }

/* Metadata is deliberately non-inherited. The builder adds values beside each
   original declaration, preserving that declaration's selector and priority. */
* {
  --vtp1-raw-width:initial; --vtp1-raw-height:initial;
  --vtp1-raw-min-width:initial; --vtp1-raw-max-width:initial;
  --vtp1-raw-min-height:initial; --vtp1-raw-max-height:initial;
  --vtp1-raw-font-size:initial;
  --vtp1-raw-left:initial; --vtp1-raw-right:initial;
  --vtp1-raw-top:initial; --vtp1-raw-bottom:initial;
  --vtp1-raw-ratio:initial; --vtp1-raw-gap:initial;
  --vtp1-raw-row-gap:initial; --vtp1-raw-column-gap:initial;
}

/* Readable initial values before the asynchronous lesson mounts. The runtime
   computes authored min/max/clamp expressions only on engines needing it. */
@supports not (width:min(1px,2px)) {
  .notes-drawer { width:92vw; max-width:480px; }
  .reward-art { width:90vw; max-width:760px; }
  .upgraded-card { width:95vw; max-width:1080px; }
}

/* Legacy engines ignore inset:auto as well as inset:0. Keep mobile reset
   semantics when a lesson is opened outside its fixed logical canvas. */
@media (max-width:750px) {
  .question-in-scene, .feature-dock, .answer-in-scene,
  .feature-trail, .scene-sign { top:auto; right:auto; bottom:auto; left:auto; }
}

/* Current iOS supports these natively; do not suppress normal selection,
   scrolling, or browser zoom globally. Drag/ink suppression is per gesture. */
html.vtp1-legacy-pointer [data-drag],
html.vtp1-legacy-pointer .mail-token { -webkit-user-select:none; user-select:none; }
html.vtp1-no-aspect-ratio .portrait.crop { margin-left:auto; margin-right:auto; }
