/* Phone (Help Desk-only build, 27 Oct): below the tablet width the frame fills the screen, as the Figma "Request List"
   390 × 844 frame (2229:28671): 16px side padding, full-width cards, tabs that scroll sideways. The tablet look is unchanged. */
@media (max-width: 860px) {
  :root { --frame-w: 100%; }
  .page { padding: 0; gap: 0; height: 100vh; height: 100dvh; min-height: 0; align-items: stretch; }
  .tab-frame { width: 100%; height: auto; flex: 1 1 auto; min-height: 0; border-radius: 0; box-shadow: none; }
  .tab-frame, .tab-frame * { --ui-pad: 16px; }

  /* the prototype bar: who you are on the first line, the controls under it */
  .stage { width: 100%; flex-wrap: wrap; border-radius: 0; border-width: 0 0 1.5px; padding: 8px 12px; gap: 6px; }
  .stage > .stage__who { flex: 1 1 100%; overflow: hidden; text-overflow: ellipsis; }
  .stage > .stage__sp { display: none; }
  .stage > .stage__ctl { margin-left: 0; }
  .stage__tag { display: none; }
  .stage__switch { width: 104px; }

  .app-top, .ui-top { padding-left: 16px; padding-right: 16px; }

  /* overlays inside the frame */
  #layer .layer__box--center { width: calc(100% - 32px); max-width: 520px; }
  #toast { max-width: calc(100% - 32px); width: max-content; }
}

/* Phone preview on a wide screen (prototype bar Phone | Tablet): the frame shrinks to the Figma 390 × 844; the bar stays as it is */
html[data-device="phone"] .tab-frame { width: 390px; height: 844px; }
html[data-device="phone"] .tab-frame, html[data-device="phone"] .tab-frame * { --ui-pad: 16px; }
html[data-device="phone"] .app-top, html[data-device="phone"] .ui-top { padding-left: 16px; padding-right: 16px; }
html[data-device="phone"] #layer .layer__box--center { width: calc(100% - 32px); max-width: 520px; }
html[data-device="phone"] #toast { max-width: calc(100% - 32px); width: max-content; }
/* on a real phone the switch has nothing to do */
@media (max-width: 860px) { .stage__dev { display: none !important; } html[data-device="phone"] .tab-frame { width: 100%; height: auto; } }
