/* Loaded directly so the desktop frame is in CSS pixels, outside px-to-rem.
   Every rule is device-scoped; the original phone styles remain untouched. */
html.student-desktop body {
  background: #f3f3f5;
}

html.student-desktop #app {
  width: var(--student-frame-width);
  min-height: 100vh;
  margin-inline: auto;
  background: #fff;
}

html.student-desktop :is(a, button, input, textarea, select, [role="button"]):focus-visible {
  outline: 2px solid #534cca;
  outline-offset: 2px;
}

/* Fixed controls and body-teleported overlays use the same frame coordinates. */
html.student-desktop .van-nav-bar--fixed,
html.student-desktop .van-tabbar--fixed,
html.student-desktop .van-overlay,
html.student-desktop .van-popup--top,
html.student-desktop .van-popup--bottom,
html.student-desktop .van-watermark--full {
  left: var(--student-frame-offset);
  right: auto;
  width: var(--student-frame-width);
}

/* Vant caches placeholder pixel heights during resize. flexible can briefly
   measure the full desktop rem before the 430px frame is restored; use the
   actual control variables so that stale inline measurements cannot add gaps. */
html.student-desktop .van-nav-bar__placeholder {
  height: var(--van-nav-bar-height) !important;
}

html.student-desktop .van-tabbar__placeholder {
  height: calc(var(--van-tabbar-height) + env(safe-area-inset-bottom, 0px)) !important;
}

html.student-desktop .van-popup--center {
  max-width: calc(var(--student-frame-width) - var(--van-padding-md) * 2);
}

html.student-desktop .van-toast {
  max-width: calc(var(--student-frame-width) * 0.7);
}

/* ImagePreview measures its own swipe element; constraining this fixed root
   makes its image sizing/zoom use the actual 430px area as well. */
html.student-desktop .van-image-preview {
  left: var(--student-frame-offset);
  right: auto;
  width: var(--student-frame-width);
  max-width: var(--student-frame-width);
  margin: 0;
}

/* The mobile component's inline 85vw offset is preserved on phones. */
html.student-desktop .van-back-top {
  right: calc(var(--student-frame-offset) + var(--student-frame-width) * 0.85) !important;
}
