/* ===== nenecookie Browser overlay (the browser itself lives on the relay, inside the iframe) ===== */
.browser-panel {
  left: 12px; right: 12px; width: auto; margin-left: 0;
  top: calc(12px + env(safe-area-inset-top)); bottom: calc(12px + env(safe-area-inset-bottom));
  border-radius: 30px; background: #0b0b10; z-index: 29;
}
/* hidden but alive: tabs keep their pages while the launcher is in front */
.browser-panel:not(.in) { visibility: hidden; pointer-events: none; transition: opacity .35s var(--ease), transform .35s var(--ease), visibility 0s .35s; }
.browser-panel iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: inherit; background: #0b0b10; opacity: 0; transition: opacity .3s var(--ease); }
.browser-panel.ready iframe { opacity: 1; }

.bw-cover { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; color: var(--label2); }
.browser-panel.ready .bw-cover { display: none; }
.bw-cover .bw-slow { display: none; }
.browser-panel.slow .bw-slow { display: block; }
.browser-panel.slow .bw-actions .bw-slow { display: inline-flex; }
.browser-panel.slow .bw-wait, .browser-panel.slow .spinner { display: none; }
.bw-cover p { max-width: 42ch; line-height: 1.5; }
.bw-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

html.browser-open #panels::before { opacity: 1; }

@media (max-width: 700px) {
  /* full screen on phones; the iframe can't see the notch, so the panel steps around it */
  .browser-panel { left: 0; right: 0; top: env(safe-area-inset-top); bottom: env(safe-area-inset-bottom); border-radius: 0; }
}
/* one more dock button: keep 8 buttons (admins) inside narrow phones */
@media (max-width: 480px) {
  .mbtn { width: min(11.6vw, calc((94vw - 12px) / 8)); }
}
