* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
  background: #172222;
  color: #fff;
  font:
    16px/1.4 system-ui,
    sans-serif;
}
main {
  position: relative;
  width: 100%;
  height: 100%;
  isolation: isolate;
  overflow: hidden;
}
canvas,
#fallback {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
canvas {
  cursor: grab;
  outline-offset: -4px;
}
canvas:active {
  cursor: grabbing;
}
#fallback {
  object-fit: contain;
}
[hidden] {
  display: none !important;
}
header,
nav {
  position: absolute;
  z-index: 1;
}
header {
  left: max(16px, env(safe-area-inset-left));
  top: max(16px, env(safe-area-inset-top));
  pointer-events: none;
  text-shadow:
    0 1px 6px #101a1a,
    0 1px 15px #101a1a;
}
h1 {
  font-size: clamp(20px, 3vw, 32px);
  font-weight: 600;
  margin: 0;
  line-height: 1.12;
}
#gallery {
  display: inline-block;
  color: white;
  pointer-events: auto;
  padding: 8px 0;
  font-size: 14px;
}
header p {
  font-size: 14px;
  margin: 5px 0;
}
nav {
  bottom: max(16px, env(safe-area-inset-bottom));
  right: max(16px, env(safe-area-inset-right));
  display: flex;
  gap: 5px;
}
button {
  min-height: 44px;
  padding: 0 13px;
  font: inherit;
  border: 1px solid #ffffff54;
  border-radius: 6px;
  color: white;
  background: #172222df;
  cursor: pointer;
}
#tip {
  position: absolute;
  bottom: max(66px, calc(env(safe-area-inset-bottom) + 60px));
  right: 16px;
  margin: 0;
  color: white;
  font-size: 13px;
  text-shadow: 0 1px 5px #000;
  background: #172222b8;
  padding: 4px 8px;
  border-radius: 4px;
  pointer-events: none;
}
#status {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
@media (min-width: 760px) {
  #tip {
    bottom: 24px;
    left: 20px;
    right: auto;
  }
}
