/* Keep the original slide canvas and give touch controls the actual viewport. */
@media (max-width: 900px) {
  #frame {
    inset: 0;
    width: 100%;
    height: 100%;
    transform: none;
    grid-template: 48px minmax(0, 1fr) 64px / minmax(0, 1fr);
  }
  #scene {
    grid-row: 2;
    place-self: center;
    width: 1440px;
    height: 676px;
    transform: scale(var(--mobile-slide-scale));
  }
  :is(:fullscreen, .presentation-view) #frame { grid-template-rows: minmax(0, 1fr); }
  :is(:fullscreen, .presentation-view) #scene { grid-row: 1; height: 810px; transform: scale(var(--scale)); }
  #mast, #transport { padding-inline: 10px; gap: 6px; }
  #mast { grid-row: 1; }
  #transport { grid-row: 3; padding-top: 5px; }
  .timeline { left: 10px; right: 10px; gap: 3px; }
  .session-label, .footer-title { display: none; }
  .mast-right { width: 100%; justify-content: space-between; }
  #controls, .footer-modes, .slidect { gap: 4px; }
  .footer-modes, .playctl { margin-right: 0; }
  .round-tool, .slidect, .playctl, .prevctl, .nextctl, .tool { min-height: 44px; }
  .round-tool, .prevctl { min-width: 36px; }
  .panel { width: 96%; max-height: 96%; padding: 16px; }
  .panel-head h2 { font-size: 27px; }
  .contents, .help-grid { display: block; columns: 1; }
  .contents button { font-size: 17px; padding-block: 11px; }
  .lab-panel .panel-head { height: auto; padding: 4px 12px; gap: 8px; flex-wrap: wrap; }
  .lab-jumps { gap: 14px; }
  .lab-jumps button, .close-panel { min-height: 44px; }
  #lab-body { padding: 12px 14px 28px; }
  .wb-heading, .wb-canvas-tools, .wb-transport, .wb-play-options, .wb-signal,
  .ix-subhead, .ix-knobs, .ix-cues, .ix-transport, .ix-readouts, .ex-keys { flex-wrap: wrap; }
  .ix-readouts { gap: 15px; }
  .wb-transport-buttons { flex-wrap: wrap; }
}
@media (max-width: 650px) {
  .lab-panel .panel-head h2 { flex: 1; }
  .lab-jumps { order: 1; width: 100%; justify-content: space-between; }
  .wb-heading h2, .ix-heading h3 { font-size: 29px; }
  .wb-grid, .ix-dual, .ix-record-grid, .ix-method-grid, .wb-declarations {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .wb-inspect { padding: 12px 0; border-left: 0; }
  .wb-canvas-tools { padding: 8px; }
  .wb svg[data-wb-canvas] { height: 225px; }
  .wb-advanced-line { display: block; }
  .wb-verification { align-items: start; max-width: none; margin-top: 12px; }
  .ix-section { padding-block: 28px; }
  .ix-transport input[type="range"] { min-width: 80px; }
  .ix-subhead, .ix-tape-head { gap: 8px; }
  .ix-tape-head { flex-wrap: wrap; }
  .ix-tape-main .ex-keys { gap: 10px; }
  .wb button, .ix-section button, .ix-section select { min-height: 38px; }
}
@media (max-width: 380px) {
  .playctl > span { display: none; }
  .nextctl { padding-inline: 8px; }
}
