/* The viewer shares the app shell; guest pixels never become app HTML. */
.browser-view {
  --dialog-width: 880px;
  position: fixed;
  z-index: 30;
  inset: 16px 16px auto auto;
  margin: 0;
  max-height: 60dvh;
}
.browser-body {
  display: grid;
  gap: 16px;
  min-height: 0;
  padding: 20px 24px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.browser-status {
  color: var(--text-2);
  font-size: 13px;
  font-weight: 550;
}
.browser-status[data-tone="danger"] {
  color: var(--danger);
}
.browser-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-subtle);
}
.browser-view canvas {
  display: block;
  max-width: 100%;
  max-height: 52dvh;
  margin: auto;
  border-radius: 6px;
  background: #111;
  touch-action: none;
}
.browser-view[data-ready="false"] canvas {
  opacity: 0;
}
.browser-view canvas:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.browser-empty {
  position: absolute;
  inset: 24px;
  display: grid;
  place-content: center;
  max-width: 44ch;
  margin-inline: auto;
  text-align: center;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.6;
  pointer-events: none;
}
.browser-keyboard {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-2);
}
.browser-keyboard input {
  min-width: 0;
  flex: 1;
}
.browser-sharing {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.55;
}
@media (max-width: 640px) {
  .browser-view {
    inset: 6px 6px auto auto;
    width: calc(100% - 12px);
    max-height: 50dvh;
  }
  .browser-body {
    gap: 14px;
    padding: 16px 16px max(20px, env(safe-area-inset-bottom));
  }
  .browser-stage {
    min-height: 180px;
    padding: 8px;
  }
  .browser-view canvas {
    max-height: 42dvh;
  }
  .browser-keyboard {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
}
