/*
 * The twin viewer's only styles. The viewer's CSP is style-src 'self' with no 'unsafe-inline',
 * so nothing may be styled by a <style> element or a style="" attribute: it all lives here, and
 * viewer.js only toggles `hidden` and sets CSSOM properties (which the CSP does not govern).
 */
html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #0b0d10;
  color: #e8e8ea;
  font:
    14px/1.5 -apple-system,
    system-ui,
    sans-serif;
}

#stage {
  position: fixed;
  inset: 0;
}

#stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

[hidden] {
  display: none !important;
}

.card {
  margin: 0;
  padding: 9px 13px;
  background: rgba(10, 12, 16, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

#status,
#load {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: min(420px, calc(100vw - 48px));
  text-align: center;
  z-index: 2;
}

.button {
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.button:hover,
.button:focus-visible {
  border-color: #3b7dd8;
}

#poster {
  position: fixed;
  inset: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#poster img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* With the poster showing, the message moves out of the picture's way. */
.with-poster #status {
  top: auto;
  bottom: 16px;
  transform: translateX(-50%);
}

.back {
  position: fixed;
  left: 14px;
  top: 14px;
  z-index: 3;
  color: #fff;
  text-decoration: none;
}

.back:hover,
.back:focus-visible {
  border-color: #3b7dd8;
}

.help {
  position: fixed;
  right: 14px;
  bottom: 14px;
  color: #9aa0a8;
  font-size: 12.5px;
}

.noscript {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.noscript a {
  color: #fff;
}

@media (max-width: 560px) {
  .help {
    left: 14px;
    right: 14px;
    text-align: center;
  }
}
