* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: #c6c6c6; overflow: hidden; }
body {
  font-family: "Helvetica Neue", "PingFang SC", Arial, sans-serif;
  color: #1a1a1a;
  display: grid;
  place-items: center;
  -webkit-font-smoothing: antialiased;
}
.stage {
  position: relative;
  width: min(100vw, 100vh);
  height: min(100vw, 100vh);
  overflow: hidden;
  background: #c6c6c6;
  perspective: 1400px;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.stage.dragging { cursor: grabbing; }
.card {
  position: absolute;
  left: 0; top: 0;
  aspect-ratio: 3 / 4;
  background-size: cover;
  background-position: center;
  box-shadow: 0 1.2vmin 3.5vmin rgba(0, 0, 0, .16);
  will-change: transform, opacity;
  backface-visibility: hidden;
  pointer-events: none;
}
.head { position: absolute; left: 6%; top: 3.2%; z-index: 999; pointer-events: none; }
.head small {
  display: block;
  font: 500 max(7px, 0.95vmin)/1 ui-monospace, Menlo, monospace;
  letter-spacing: .12em;
  opacity: .6;
  margin-bottom: .9vmin;
}
.head h1 { font-size: max(16px, 4.1vmin); font-weight: 400; letter-spacing: -.01em; }
.spec {
  position: absolute; right: 4%; bottom: 3.5%; z-index: 999;
  font: 500 max(7px, 0.95vmin)/1.9 ui-monospace, Menlo, monospace;
  letter-spacing: .12em; text-align: right; opacity: .55; pointer-events: none;
  white-space: pre-line;
}
.nav {
  position: absolute; left: 6%; bottom: 3.5%; z-index: 999;
  display: flex; gap: 2.4vmin;
  font: 500 max(9px, 1.25vmin)/1 ui-monospace, Menlo, monospace;
  letter-spacing: .1em;
}
.nav a { color: inherit; text-decoration: none; opacity: .55; padding: .6vmin 0; }
.nav a:hover { opacity: 1; }
.embed .nav { display: none; }
.embed .stage { cursor: pointer; }

/* —— 第二组效果（火烧 / 魔方 / 碎玻璃 / 水滴）—— */
body.dark, body.dark .stage { background: #111012; color: #f1eee9; }
.stage canvas.full { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage canvas.paper {
  position: absolute; left: 50%; top: 52%; width: 48%; aspect-ratio: 3 / 4;
  transform: translate(-50%, -50%); display: block;
  box-shadow: 0 3vmin 9vmin rgba(0, 0, 0, .6);
}
.hint {
  position: absolute; left: 50%; bottom: 3.5%; transform: translateX(-50%); z-index: 999;
  font: 500 max(9px, 1.15vmin)/1 ui-monospace, Menlo, monospace; letter-spacing: .12em;
  opacity: .5; pointer-events: none; white-space: nowrap;
}
.embed .hint { display: none; }
@media (max-width: 760px), (max-height: 760px) { .hint { bottom: 9.5%; } }
