/* The toolkit's canvas and the real elements inside it. */
.ui-stage { position: relative; width: 100%; max-width: 460px; border-radius: 10px; overflow: hidden; background: #1b1e26; }
/* pan-y: a vertical swipe on the canvas scrolls the page, a horizontal drag reaches the slider. */
.ui-stage canvas { display: block; width: 100%; height: 390px; touch-action: pan-y; }
/* #region widget-css */
/* Every element sits at the canvas origin. The program decides where each one is drawn. */
.ui-stage canvas > [data-ui] {
  position: absolute; left: 0; top: 0; margin: 0; box-sizing: border-box;
  font: 15px/1.4 system-ui, sans-serif; color: #e6e8ee; color-scheme: dark;
}
.ui-stage h3[data-ui] { font-size: 18px; }
.ui-stage input[data-ui], .ui-stage textarea[data-ui] {
  font-size: 16px; background: #10131a; border: 1px solid #596073; border-radius: 6px; padding: 8px 10px; resize: none;
}
.ui-stage [data-ui]:focus-visible { outline: 2px solid #6aa6ff; outline-offset: -2px; }
.ui-stage [data-ui="delete-label"] { text-align: center; font-weight: 600; }
.ui-stage [data-ui="dialog"] p { margin: 0 0 14px; }
.ui-stage [data-ui="dialog"] div { display: flex; gap: 10px; justify-content: flex-end; }
.ui-stage [data-ui="dialog"] button {
  font: inherit; color: inherit; min-height: 40px; padding: 6px 16px; border-radius: 8px; border: 1px solid #596073; background: #3a3f4b;
}
.ui-stage [data-ui="dialog"] button[data-ui="dialog-ok"] { background: #8a2f2f; border-color: #b04a4a; }
/* #endregion widget-css */
.ui-msg { position: absolute; inset: 0; margin: 0; padding: 16px; display: flex; align-items: center; justify-content: center; text-align: center; color: #e6e8ee; background: #1b1e26; font-size: 15px; }
.ui-msg[hidden] { display: none; }
.loop-state { font-variant-numeric: tabular-nums; min-height: 3em; }
.edge-out { display: block; max-width: 100%; margin: 8px 0; border-radius: 6px; background: #000; }
.edge-out[hidden] { display: none; }
/* Text the program draws as labels: taps go through to the canvas, where the program reads the pointer. */
.ui-stage :is(h3, label, p, span)[data-ui] { pointer-events: none; user-select: none; }
