.rg-fullscreen-toggle {
  position: fixed;
  z-index: 1000;
  inset-inline-end: max(12px, env(safe-area-inset-right));
  inset-block-start: 44%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--text-primary);
  background: var(--bg-screen);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: var(--shadow-1);
  cursor: pointer;
}

.rg-fullscreen-toggle i {
  display: grid;
  pointer-events: none;
}

.rg-fullscreen-toggle:focus-visible {
  outline: 2px solid var(--text-link);
  outline-offset: 2px;
}

.rg-fullscreen-view .rg-fullscreen-toggle:not(:hover, :focus-visible) {
  opacity: .72;
}

.rg-fullscreen-view .rg-mobile-preview {
  overflow: hidden;
}

.rg-fullscreen-view .rg-mobile-preview .stage:has(.guest-phone) {
  display: flex;
  align-items: center;
  min-height: 0;
  padding: 0;
}

.rg-fullscreen-view .rg-mobile-preview .stage > .devpanel {
  display: none;
}

.rg-fullscreen-view .rg-mobile-preview .stage > .guest-phone {
  width: min(100%, 430px);
  height: 100vh;
  height: 100dvh;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

@media (max-width: 600px), (pointer: coarse) and (max-height: 600px) {
  .rg-fullscreen-toggle {
    inset-inline-end: max(3px, env(safe-area-inset-right));
  }

  .rg-fullscreen-view .rg-mobile-preview .stage > .guest-phone {
    width: 100%;
  }
}
