:root {
  color-scheme: dark;
  background: #080a0e;
  color: #f4f6fb;
  font-family: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background:
    radial-gradient(circle at 50% 40%, rgb(44 53 72 / 42%), transparent 48%),
    linear-gradient(145deg, #0d1119, #050609 70%);
}

#viewer {
  position: fixed;
  inset: 0;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#viewer:active { cursor: grabbing; }

#viewer canvas {
  display: block;
  width: 100%;
  height: 100%;
}

#status {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgb(244 246 251 / 72%);
  font-size: 13px;
  letter-spacing: 0.04em;
  pointer-events: none;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgb(255 255 255 / 18%);
  border-top-color: rgb(255 255 255 / 85%);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.hint {
  position: fixed;
  z-index: 2;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  white-space: nowrap;
  padding: 10px 14px;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 999px;
  background: rgb(8 10 14 / 64%);
  backdrop-filter: blur(12px);
  color: rgb(244 246 251 / 62%);
  font-size: 11px;
  letter-spacing: 0.035em;
  pointer-events: none;
}

.dot { margin: 0 8px; opacity: 0.45; }

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 480px) {
  .hint {
    bottom: max(14px, env(safe-area-inset-bottom));
    padding: 9px 12px;
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 1.5s; }
}
