*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
  -webkit-overflow-scrolling: auto;
}

html,
body,
#app-root,
.app-shell,
#screen-root,
.app-screen {
  touch-action: none;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: auto;
}

body {
  position: fixed;
  inset: 0;
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

/* --- iOS/Mobile: Textauswahl, Lupe und Callout global deaktivieren --------- */
/* Best Practice fuer mobile-first Web-Apps ohne Text-Select-Bedarf.          */
/* Quelle: Apple WebKit-Dokumentation, MDN user-select.                        */

html,
body,
#app-root,
.app-shell,
.app-screen,
.app-shell *,
.app-screen * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

button,
[role="button"],
canvas,
.btn,
[data-qb-answer-index],
[data-pb-dynamic-canvas],
[data-pb-hand-canvas],
[data-ss-canvas] {
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* Eingabefelder explizit wieder freigeben, damit Tippen/Paste funktioniert. */
input,
textarea,
select,
[contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

input,
textarea,
select {
  touch-action: auto;
}
