#portal-tools {
  position: fixed;
  z-index: 99;
  right: 16px;
  bottom: 76px;
  color: #eef6ee;
  background: #111a19;
  border: 1px solid #43544b;
  border-radius: 9px;
  font: 400 14px/1.4 system-ui, sans-serif;
  max-width: calc(100vw - 24px);
  box-shadow: 0 8px 22px #0006;
}
#portal-tools summary { cursor: pointer; padding: 9px 13px; font-weight: 650; color: #b8f778; }
#portal-tools .portal-content { width: min(320px, calc(100vw - 26px)); padding: 2px 13px 13px; }
#portal-tools nav { display: flex; flex-wrap: wrap; gap: 7px 14px; margin-bottom: 12px; }
#portal-tools a { color: #b8f778; }
#portal-tools label { display: grid; gap: 4px; margin: 9px 0 5px; }
#portal-tools select, #portal-tools input, #portal-tools button {
  font: inherit;
  padding: 6px 8px;
  border: 1px solid #46564b;
  border-radius: 5px;
  color: #f1f8f1;
  background: #18231f;
}
#portal-tools button:not(:disabled) { cursor: pointer; }
#portal-tools button:disabled { opacity: .5; }
#portal-tools output { display: block; margin-top: 8px; color: #b8f778; overflow-wrap: anywhere; }
#portal-tools output:empty { display: none; }
#portal-tools [hidden] { display: none !important; }
@media (max-width: 620px) { #portal-tools { right: 10px; bottom: 65px; } }

#somataPreviewStatus { display: none; }
.somata-preview body { height: 100dvh; min-height: 0; margin: 0; padding: 0; overflow: hidden; }
.somata-preview body > :not(.app-container):not(#somataPreviewStatus),
.somata-preview .app-container > :not(#mainContainer),
.somata-preview #floatingViewportControls,
.somata-preview #fpsCounter { display: none !important; }
.somata-preview .app-container { display: flex; position: fixed; inset: 0; width: auto; height: auto; }
.somata-preview #mainContainer { position: relative; flex: 1; width: 100%; height: 100%; margin: 0; }
.somata-preview #somataPreviewStatus:not([hidden]) {
  display: block;
  position: fixed;
  z-index: 9999;
  inset: 0;
  align-content: center;
  text-align: center;
  margin: 0;
  padding: 12px;
  background: #090d16;
  color: #e0e7f5;
}
