:root {
  color-scheme: dark;
  background: #090909;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: #090909;
}

body {
  min-width: 320px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.demo-badge {
  position: fixed;
  top: max(6px, env(safe-area-inset-top));
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(20, 20, 20, 0.82);
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.04em;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

.viewer {
  display: flex;
  min-height: 100vh;
  justify-content: center;
  align-items: flex-start;
  padding: 34px 14px max(72px, env(safe-area-inset-bottom));
}

.viewer img {
  display: block;
  width: min(1120px, calc(100vw - 28px));
  height: auto;
  background: #fff;
  box-shadow: 0 3px 22px rgba(0, 0, 0, 0.55);
}

@media (max-width: 640px) {
  .viewer {
    padding: 30px 8px max(48px, env(safe-area-inset-bottom));
  }

  .viewer img {
    width: calc(100vw - 16px);
  }

  .demo-badge {
    padding: 3px 8px;
    font-size: 11px;
  }
}
