/* White paper, edge to edge. Everything else is deliberately almost invisible. */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #fff;
  color-scheme: light;                 /* the paper stays white in dark mode */
  font: 13px/1.4 system-ui, -apple-system, sans-serif;
}

body {
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#paper {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;                  /* a finger draws, it does not scroll */
}

footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  padding-bottom: max(.6rem, env(safe-area-inset-bottom));
  pointer-events: none;                /* the paper below stays touchable */
}
footer > * { pointer-events: auto; }

/* Presence: grey when you are alone here, warm when they have it open. */
#together {
  width: 34px;
  height: 1px;
  background: #e9e7e4;
  transition: background .6s ease, width .6s ease;
}
#together.here {
  width: 54px;
  background: #d9a49b;
}

#lab-offline-status:empty { display: none; }
#lab-offline-status {
  margin: 0;
  color: #b9b5b0;
  font-size: 11px;
  letter-spacing: .04em;
}

#lab-install-open {
  border: 0;
  background: none;
  padding: .35rem .8rem;
  min-height: 32px;
  color: #ceccc8;
  font: inherit;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: lowercase;
  cursor: pointer;
}
#lab-install-open:hover, #lab-install-open:focus-visible { color: #8d8a85; }

/* The install dialog is ordinary; it is only ever seen on a deliberate tap. */
dialog {
  max-width: min(24rem, 88vw);
  border: 1px solid #e6e3df;
  border-radius: .75rem;
  padding: 1.25rem;
  font-size: 15px;
  color: #33312e;
}
dialog::backdrop { background: rgba(255, 255, 255, .7); }
dialog h2 { margin: 0 0 .5rem; font-size: 1.05rem; font-weight: 600; }
dialog p { margin: 0 0 1rem; }
dialog button {
  min-height: 44px;
  padding: .6rem 1rem;
  margin-right: .5rem;
  border: 1px solid #ddd9d4;
  border-radius: .5rem;
  background: #fff;
  font: inherit;
  cursor: pointer;
}
