/* The egui canvas and the real elements inside it. */
.egui-stage { position: relative; width: 100%; height: min(68svh, 640px); min-height: 440px; border-radius: 10px; overflow: hidden; background: #1b1b1b; }
.egui-stage canvas { display: block; width: 100%; height: 100%; outline: none; touch-action: none; }
/* #region widget-css */
/* Every DOM widget sits at the canvas origin. Its layout position does not matter:
   egui decides where it is drawn and updateElementGeometry() moves its hit box there. */
.egui-stage [data-egui] {
  position: absolute; left: 0; top: 0; margin: 0; box-sizing: border-box;
  font: 14px/1.35 system-ui, sans-serif; color: #e6e6e6; color-scheme: dark;
}
.egui-stage input[data-egui], .egui-stage select[data-egui], .egui-stage textarea[data-egui] {
  background: #0f0f10; border: 1px solid #5a5a5a; border-radius: 4px; padding: 5px 7px; min-height: 30px;
}
.egui-stage [data-egui]:focus-visible { outline: 2px solid #5aa9ff; outline-offset: -2px; }
.egui-stage textarea[data-egui] { resize: none; }
.egui-stage p[data-egui] { padding: 2px 0; }
.egui-stage p[data-egui] a { color: #7ab8ff; }
/* #endregion widget-css */

.stage-msg { position: absolute; inset: auto 0 0 0; margin: 0; padding: 10px 14px; color: #c9c9c9; font-size: 14px; pointer-events: none; }
.stage-msg[hidden] { display: none; }
.qt-stage { position: relative; width: 100%; height: min(68svh, 620px); min-height: 440px; border-radius: 10px; overflow: hidden; background: #1e1f22; }
.qt-stage #qt-screen { position: absolute; inset: 0; }
.qt-stage .stage-msg { inset: 0; display: flex; flex-direction: column; gap: 10px; align-items: center; justify-content: center; text-align: center; pointer-events: auto; }
/* #region qt-css */
/* Copied inline onto each element before Qt moves it into its shadow root. */
.qt-dom {
  box-sizing: border-box; margin: 0; font: 14px/1.35 system-ui, sans-serif; color: #e6e6e6; color-scheme: dark;
  background: #101012; border: 1px solid #5a5a5a; border-radius: 4px; padding: 6px 8px; resize: none;
}
/* #endregion qt-css */
.table-scroll { overflow-x: auto; }
table.research td { vertical-align: top; min-width: 9em; }
