.frost-native-browser {
  position: fixed;
  top: 5vh;
  right: 1rem;
  width: min(760px, calc(100vw - 2rem));
  height: min(720px, 85vh);
  min-width: min(320px, 100vw);
  min-height: min(240px, 100vh);
  max-width: 100vw;
  max-height: 100vh;
  resize: both;
  zoom: 1;
  z-index: 12000;
  overflow: auto;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--bg2);
  color: var(--text);
  box-shadow: 0 1rem 4rem #0008;
  overscroll-behavior: contain;
}
.frost-native-browser[hidden] { display: none; }
.frost-native-browser-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  cursor: move;
  touch-action: none;
}
.frost-native-browser h2 { margin: 0; }
.frost-native-browser form,
.frost-native-browser-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-block: .5rem;
}
.frost-native-browser input {
  flex: 1 1 15rem;
  min-width: 0;
  color: inherit;
  background: transparent;
}
.frost-native-browser :is(button, input, select) {
  min-height: 2.5rem;
  padding: .4rem .7rem;
  border: 1px solid var(--border);
  border-radius: .4rem;
  font: inherit;
}
.frost-native-browser button,
.frost-native-browser select {
  color: inherit;
  background: var(--surface-control);
}
.frost-native-browser :focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.frost-native-browser button:disabled { opacity: .5; cursor: not-allowed; }
.frost-native-browser-screen {
  display: block;
  width: 100%;
  padding: 0 !important;
  min-height: 8rem;
  cursor: crosshair;
}
.frost-native-browser-screen img { display: block; width: 100%; height: auto; }
.frost-native-browser-screen img[hidden] { display: none; }
@media (max-width: 640px) {
  .frost-native-browser {
    top: .5rem;
    right: .5rem;
    width: calc(100vw - 1rem);
    height: calc(100dvh - 1rem);
    border-radius: .5rem;
  }
}
