
:root {
  color-scheme: dark;
  --bg: #000000;
  --panel: rgba(12, 12, 14, 0.58);
  --panel-border: rgba(255, 255, 255, 0.12);
  --text: rgba(255, 255, 255, 0.94);
  --muted: rgba(255, 255, 255, 0.70);
  --shadow: rgba(0, 0, 0, 0.38);
  --glow-srgb: rgba(107, 145, 255, 0.32);
}

@media (color-gamut: p3) {
  :root {
    --glow-srgb: color(display-p3 0.36 0.50 1 / 0.30);
  }
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}
body {
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
}
#viewer-shell {
  position: relative;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100dvh;
  background: #000;
}
#viewer {
  position: absolute;
  inset: 0;
  background: #000;
  touch-action: none;
}
.ui-layer {
  position: absolute;
  left: max(16px, env(safe-area-inset-left));
  right: max(16px, env(safe-area-inset-right));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 10;
  transition: opacity 220ms ease, transform 220ms ease;
}
.top-ui {
  top: max(16px, env(safe-area-inset-top));
}
.bottom-ui {
  bottom: max(16px, env(safe-area-inset-bottom));
  justify-content: center;
}
.ui-layer.hidden-ui {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}
.bottom-ui.hidden-ui {
  transform: translateY(8px);
}
.brand-pill,
.hint-pill,
.glass-btn,
.info-panel {
  background: var(--panel);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid var(--panel-border);
  box-shadow: 0 12px 40px var(--shadow), 0 0 24px var(--glow-srgb);
}
.brand-pill,
.hint-pill {
  border-radius: 999px;
  padding: 12px 16px;
}
.brand-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.brand-subtitle {
  font-size: 0.81rem;
  color: var(--muted);
  margin-top: 2px;
}
.hint-pill {
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}
.button-row {
  display: flex;
  gap: 8px;
}
.glass-btn {
  appearance: none;
  border-radius: 999px;
  color: var(--text);
  padding: 11px 14px;
  min-height: 44px;
  min-width: 44px;
  font: inherit;
  cursor: pointer;
}
.glass-btn:active {
  transform: scale(0.98);
}
.info-panel {
  position: absolute;
  top: calc(max(16px, env(safe-area-inset-top)) + 64px);
  left: max(16px, env(safe-area-inset-left));
  z-index: 12;
  max-width: min(420px, calc(100vw - 32px));
  border-radius: 24px;
  padding: 18px 18px 16px;
}
.info-panel h1 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}
.info-panel p,
.info-panel li {
  color: var(--muted);
  line-height: 1.45;
}
.info-panel ul {
  padding-left: 18px;
  margin: 10px 0;
}
.info-panel .hint {
  margin-bottom: 0;
}
.openseadragon-canvas,
.openseadragon-container {
  background: #000 !important;
}
@media (max-width: 640px) {
  .brand-subtitle, .hint-pill { font-size: 0.78rem; }
  .brand-title { font-size: 0.95rem; }
  .glass-btn { padding: 10px 12px; }
}

.info-panel strong {
  color: var(--text);
  font-weight: 600;
}
