/* Bare full-screen surface: the page is the site, nothing else. */
html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #fff;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
}
body {
  position: fixed;
  inset: 0;
  font: 15px/1.5 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: #5f6368;
}

/* The stage clips; #wrap is transformed for pinch-zoom on touch devices. */
#stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #fff;
  touch-action: none;
}
#wrap {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  will-change: transform;
}
#wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  opacity: 0;
  transition: opacity 0.18s ease;
  background: #fff;
}
#wrap iframe.on {
  opacity: 1;
}

/* Neutral loading indicator, like a page loading. */
#spinner {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
#spinner.gone {
  opacity: 0;
}
#spinner .ring {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2.5px solid rgba(0, 0, 0, 0.1);
  border-top-color: rgba(0, 0, 0, 0.45);
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Phones only: brief keyboard shortcut after a tap, so text fields on the site can be typed into. */
#kbd {
  position: fixed;
  right: calc(14px + env(safe-area-inset-right));
  bottom: calc(18px + env(safe-area-inset-bottom));
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(32, 33, 36, 0.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 10;
  -webkit-tap-highlight-color: transparent;
}
#kbd.show {
  opacity: 1;
  pointer-events: auto;
}
#kbd[hidden] {
  display: none;
}

.center {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  background: #fff;
}
.center[hidden] {
  display: none;
}
.center p {
  margin: 0;
}
.center button,
#code input {
  font: inherit;
  border-radius: 8px;
  padding: 9px 16px;
}
.center button {
  border: 1px solid #dadce0;
  background: #fff;
  color: #1a73e8;
  cursor: pointer;
}
#code input {
  border: 1px solid #dadce0;
  width: min(280px, 80vw);
  color: #202124;
}
#code-err {
  color: #d93025;
  font-size: 13px;
}
