/* =========================================================================
   硅基风评鉴定局 v3.0 · 无框 3D 体素空间样式系统
   ========================================================================= */
:root {
  --bg-deep: #070914;
  --surface-glass: rgba(16, 19, 38, 0.56);
  --surface-hover: rgba(28, 33, 66, 0.78);
  --text: #f5f7ff;
  --muted: #a1abd8;
  --gold: #ffd166;
  --cyan: #4cc9f0;
  --green: #06d6a0;
  --red: #ff4d6d;
  --purple: #b583ff;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", monospace;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--font-mono);
  overflow-x: hidden;
  user-select: none;
}

/* ---------- 底层 3D 像素方块矩阵海 & 粒子覆盖层 ---------- */
#voxelFieldCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100lvh;
  z-index: 0;
  display: block;
  pointer-events: none;
}

#fxOverlayCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100lvh;
  z-index: 900;
  pointer-events: none;
}

/* 极轻 CRT 质感，不抢 3D 体素主体 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 50% 50%, transparent 56%, rgba(4, 5, 12, 0.62) 100%),
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.11) 0px,
      rgba(0, 0, 0, 0.11) 1px,
      transparent 1px,
      transparent 3px
    );
  pointer-events: none;
  z-index: 980;
}

body.crt-off::before {
  display: none;
}

/* 个人 IP 主页（浅色白方块主题）下减轻暗角，保持明亮通透的画廊质感 */
body.theme-light::before {
  background:
    radial-gradient(circle at 50% 50%, transparent 70%, rgba(18, 22, 40, 0.08) 100%),
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.03) 0px,
      rgba(0, 0, 0, 0.03) 1px,
      transparent 1px,
      transparent 3px
    );
}

body.theme-light .hud-brand-pill {
  color: #141726;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 4px 16px rgba(15, 20, 42, 0.12), inset 0 0 0 2px #141726;
}

body.theme-light .hud-icon-btn {
  color: #141726;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 4px 14px rgba(15, 20, 42, 0.10), inset 0 0 0 1px rgba(20, 23, 38, 0.28);
}

body.theme-light .hud-icon-btn:hover {
  color: #141726;
  box-shadow: 0 6px 18px rgba(15, 20, 42, 0.16), inset 0 0 0 2px #141726;
}

/* ---------- 个人 IP 主页：参考图三行左对齐巨型仿像素宣言 + 像素小人互动 ---------- */
#sceneIpHome {
  justify-content: center;
  align-items: center;
  padding: 72px 28px 48px;
}

.ip-editorial-stage {
  width: 100%;
  max-width: 980px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.ip-hero-row {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: clamp(10px, 2.2vw, 28px);
  position: relative;
}

.ip-typo-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  pointer-events: none;
}

.ip-stacked-headline {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: clamp(62px, 10.4vw, 144px);
  line-height: 0.94;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #141726;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.ip-line {
  display: block;
  white-space: nowrap;
  /* 干净利落的 3D 实体挤出厚度与柔和底影 */
  text-shadow:
    1px 1px 0 #2b3252,
    2px 2px 0 #384169,
    3px 3px 0 #475282,
    4px 4px 0 #556196,
    5px 5px 0 #262c4a,
    6px 6px 0 #121524,
    12px 16px 26px rgba(18, 21, 36, 0.22);
}

.ip-line-idea {
  display: inline-block;
  pointer-events: auto;
  cursor: pointer;
  color: #141726;
}

.ip-period {
  color: #121524;
}

/* 参考图底部身份标签行 */
.ip-identity-bar {
  margin-top: clamp(22px, 3.2vh, 34px);
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
}

.ip-identity-name {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: #121524;
  letter-spacing: 3px;
}

.ip-identity-roles {
  font-size: 12px;
  font-weight: 600;
  color: rgba(20, 23, 38, 0.56);
  letter-spacing: 2px;
}

.ip-home-actions {
  margin-top: clamp(24px, 4vh, 38px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  pointer-events: none;
}

/* 右侧紧靠文字的像素数字 IP 小人舞台 */
.ip-mascot-stage {
  position: relative;
  width: clamp(136px, 18vw, 224px);
  height: clamp(150px, 20vw, 246px);
  margin-left: clamp(-24px, -2vw, -10px);
  margin-bottom: clamp(86px, 11vh, 118px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  pointer-events: auto;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.55s cubic-bezier(0.35, 0, 0.2, 1), opacity 0.4s ease;
  will-change: transform;
}

.ip-mascot-stage.sprint-out {
  transform: translateX(64vw) translateY(-10px) scale(1.06);
  opacity: 0;
}

.ip-mascot-sprite {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  position: relative;
  z-index: 3;
  transform-origin: bottom center;
  filter: drop-shadow(0 10px 16px rgba(15, 20, 42, 0.22));
  transition: transform 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.35);
}

.ip-mascot-stage:hover .ip-mascot-sprite {
  transform: translateY(-4px) scale(1.04);
}

.ip-mascot-sprite.bounce-pop {
  animation: mascotPop 0.38s cubic-bezier(0.2, 0.95, 0.3, 1.35);
}

@keyframes mascotPop {
  0% { transform: scale(1, 1) translateY(0); }
  35% { transform: scale(1.12, 0.88) translateY(4px); }
  65% { transform: scale(0.94, 1.10) translateY(-16px); }
  100% { transform: scale(1, 1) translateY(0); }
}

.ip-mascot-shadow {
  width: 64%;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(18, 21, 36, 0.28) 0%, transparent 72%);
  margin-top: -10px;
  z-index: 1;
}

/* 小人头顶像素情绪气泡 */
.ip-emotion-bubble {
  position: absolute;
  top: -18px;
  right: 8px;
  width: clamp(46px, 5.8vw, 68px);
  height: auto;
  image-rendering: pixelated;
  z-index: 6;
  pointer-events: none;
  filter: drop-shadow(0 6px 12px rgba(15, 20, 42, 0.2));
  animation: bubbleFloatIn 0.32s cubic-bezier(0.2, 0.95, 0.3, 1.35);
}

@keyframes bubbleFloatIn {
  0% { transform: translateY(14px) scale(0.5); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.btn-ip-enter {
  pointer-events: auto;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: clamp(14px, 1.5vw, 17px);
  font-weight: 900;
  letter-spacing: 1px;
  color: #ffffff;
  background: #141726;
  padding: 17px 34px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow:
    0 5px 0 #3a446e,
    0 9px 0 #090b14,
    0 18px 40px rgba(20, 23, 38, 0.24);
  transition: transform 0.16s cubic-bezier(0.2, 0.9, 0.3, 1.3), box-shadow 0.16s ease, background 0.2s;
}

.btn-ip-enter:hover {
  background: #1c223b;
  transform: translateY(-5px) scale(1.02);
  box-shadow:
    0 7px 0 #3a446e,
    0 12px 0 #090b14,
    0 24px 48px rgba(20, 23, 38, 0.32);
}

.btn-ip-enter:active {
  transform: translateY(4px);
  box-shadow:
    0 2px 0 #3a446e,
    0 4px 0 #090b14,
    0 10px 22px rgba(20, 23, 38, 0.2);
}

.btn-ip-dot {
  width: 9px;
  height: 9px;
  background: #ff5e6e;
  box-shadow: 0 0 10px #ff5e6e;
  display: inline-block;
}

.ip-home-hint {
  font-size: 12px;
  font-weight: 700;
  color: rgba(20, 23, 38, 0.62);
  letter-spacing: 0.8px;
  text-align: center;
}

body.screen-shake {
  animation: screenShake 0.34s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes screenShake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-6px, -3px); }
  40% { transform: translate(6px, 3px); }
  60% { transform: translate(-4px, 4px); }
  80% { transform: translate(4px, -2px); }
}

/* ---------- 悬浮极简顶栏 HUD（无大框） ---------- */
.floating-hud {
  position: fixed;
  top: 16px;
  left: 20px;
  right: 20px;
  z-index: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.floating-hud > * {
  pointer-events: auto;
}

.hud-brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--gold);
  background: rgba(9, 11, 22, 0.62);
  backdrop-filter: blur(8px);
  padding: 6px 12px;
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 209, 102, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hud-brand-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 209, 102, 0.8);
}

.hud-dot {
  width: 7px;
  height: 7px;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: blinkDot 1.3s steps(2) infinite;
}

@keyframes blinkDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.hud-controls {
  display: flex;
  gap: 8px;
}

.hud-icon-btn {
  background: rgba(9, 11, 22, 0.62);
  backdrop-filter: blur(8px);
  border: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(76, 201, 240, 0.35);
  color: var(--cyan);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.hud-icon-btn:hover {
  color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 209, 102, 0.7);
}

.hud-icon-btn.muted {
  color: var(--muted);
  box-shadow: inset 0 0 0 1px rgba(154, 163, 204, 0.2);
}

/* ---------- 视图层与平滑运镜过渡（采用原生文档流滚动，兼容移动端丝滑翻页） ---------- */
.stage-viewport {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  z-index: 10;
}

.scene-layer {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 76px 24px 64px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(24px) scale(0.96);
  transition:
    opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.45s;
}

/* 激活场景回归原生文档流，由浏览器原生页面滚动接管，彻底消除 fixed 滚动冲突 */
.scene-layer.active {
  position: relative;
  inset: auto;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.scene-layer.exit-zoom {
  position: fixed;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-18px) scale(1.05);
}

/* =========================================================================
   HERO LANDING STAGE：左右无框布局（左侧像素艺术字标题按钮 + 右侧 3D 堆叠闪卡）
   ========================================================================= */
#sceneHero {
  overflow: hidden;
  perspective: 1400px;
}

.hero-split-layout {
  width: 100%;
  max-width: 1120px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 56px;
  padding: 0 24px;
}

.hero-left-stage {
  flex: 1 1 54%;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  z-index: 40;
}

.hero-right-stage {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  perspective: 1400px;
  z-index: 35;
}

/* 右侧 3D 立体堆叠卡堆 */
.hero-deck-stack {
  position: relative;
  width: 248px;
  aspect-ratio: 3 / 4.25;
  transform-style: preserve-3d;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.25, 1.1);
}

.hero-deck-stack:hover {
  transform: translateY(-8px) scale(1.03);
}

.deck-card {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform:
    translate3d(var(--dx, 0px), var(--dy, 0px), var(--dz, 0px))
    rotate(var(--rot, 0deg))
    rotateX(6deg)
    rotateY(-10deg);
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease;
  will-change: transform;
}

/* 悬停卡堆时，堆叠卡片呈现微扇形散开预览效果 */
.hero-deck-stack:hover .deck-card {
  transform:
    translate3d(var(--hdx, 0px), var(--hdy, 0px), var(--hdz, 0px))
    rotate(var(--hrot, 0deg))
    rotateX(2deg)
    rotateY(-4deg);
}

.deck-card-body {
  position: relative;
  width: 100%;
  height: 100%;
  background: linear-gradient(155deg, #21274d 0%, #0d1022 100%);
  border: 3px solid var(--card-accent, var(--gold));
  padding: 10px;
  display: flex;
  flex-direction: column;
  /* Flatten inner elements onto each card's own 3D plane so lower cards' text never pokes through upper cards */
  transform-style: flat;
  backface-visibility: hidden;
  box-shadow:
    0 4px 0 #101326,
    0 8px 0 #090b16,
    0 24px 48px rgba(0, 0, 0, 0.72),
    0 0 24px rgba(76, 201, 240, 0.16);
}

.hero-deck-stack:hover .deck-card.is-top .deck-card-body {
  box-shadow:
    0 6px 0 #181c36,
    0 11px 0 #090b16,
    0 32px 64px rgba(0, 0, 0, 0.85),
    0 0 38px var(--card-accent, var(--gold));
}

.deck-card-art-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #080a14;
  border: 2px solid #090a14;
  overflow: hidden;
  transform: translateZ(12px);
}

.deck-card-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: pixelated;
}

.deck-card-meta {
  margin-top: 10px;
  transform: translateZ(18px);
}

.deck-card-code {
  font-size: 18px;
  font-weight: 900;
  color: var(--card-accent, var(--gold));
  letter-spacing: 0.5px;
  text-shadow: 2px 2px 0 #090a14;
}

.deck-card-name {
  font-size: 13px;
  color: #fff;
  font-weight: 700;
  margin-top: 3px;
}

.deck-card-tag {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  background: rgba(9, 10, 20, 0.86);
  color: var(--card-accent, var(--gold));
  border: 1px solid var(--card-accent, var(--gold));
  transform: translateZ(22px);
}

.deck-card-foil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.045) 0px,
      rgba(255, 255, 255, 0.045) 2px,
      transparent 2px,
      transparent 6px
    ),
    linear-gradient(
      125deg,
      transparent 16%,
      rgba(76, 201, 240, 0.24) 38%,
      rgba(255, 209, 102, 0.30) 50%,
      rgba(255, 77, 109, 0.22) 62%,
      transparent 84%
    );
  background-size: 220% 220%;
  background-position: 18% 18%;
  mix-blend-mode: screen;
  opacity: 0.58;
  transition: background-position 0.55s ease, opacity 0.35s ease;
  transform: translateZ(24px);
}

.hero-deck-stack:hover .deck-card-foil {
  background-position: 82% 82%;
  opacity: 0.92;
}

.deck-hint {
  margin-top: 26px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.6px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
  opacity: 0.9;
}

/* 图鉴卡片 FLIP 飞散铺开 / 聚合收拢辅助状态 */
.gallery-item {
  will-change: transform, opacity;
}

.hero-eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 14px;
  text-shadow: 0 0 14px rgba(76, 201, 240, 0.65);
}

/* 立体像素艺术字主标题（纯 CSS 多层体素挤出 + 像素发光） */
.pixel-art-title {
  margin: 0;
  font-size: clamp(38px, 6.2vw, 72px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: 4px;
  color: #ffffff;
  position: relative;
  text-shadow:
    0 2px 0 #cfd8ff,
    0 4px 0 #7b88d6,
    0 6px 0 #485199,
    0 8px 0 #262c5c,
    0 10px 0 #121533,
    0 12px 0 #070914,
    0 22px 36px rgba(0, 0, 0, 0.78),
    0 0 32px rgba(76, 201, 240, 0.42);
  animation: titleFloat 3.6s ease-in-out infinite alternate;
}

.pixel-art-title .title-accent {
  color: var(--gold);
  display: inline-block;
  text-shadow:
    0 2px 0 #e6ac2e,
    0 4px 0 #b87c14,
    0 6px 0 #7a4b09,
    0 8px 0 #472904,
    0 10px 0 #1f1102,
    0 12px 0 #070914,
    0 22px 36px rgba(0, 0, 0, 0.8),
    0 0 36px rgba(255, 209, 102, 0.55);
}

@keyframes titleFloat {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-7px); }
}

.hero-subtitle {
  margin: 22px 0 34px;
  font-size: clamp(13px, 1.55vw, 16px);
  line-height: 1.75;
  color: #d6deff;
  max-width: 500px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
}

/* 悬浮立体像素启动按钮 */
.hero-cta-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.btn-hero-launch {
  position: relative;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #14121d;
  background: linear-gradient(180deg, #ffe28a 0%, #ffd166 55%, #f4b93b 100%);
  padding: 18px 44px;
  box-shadow:
    0 4px 0 #c98c18,
    0 8px 0 #7a4f07,
    0 11px 0 #070914,
    0 20px 42px rgba(255, 209, 102, 0.38);
  transition: transform 0.14s cubic-bezier(0.2, 0.9, 0.3, 1.3), box-shadow 0.14s ease, filter 0.16s;
  animation: ctaHoverBreath 2.8s ease-in-out infinite alternate;
}

@keyframes ctaHoverBreath {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-5px); }
}

.btn-hero-launch:hover {
  animation-play-state: paused;
  transform: translateY(-6px) scale(1.03);
  filter: brightness(1.07);
  box-shadow:
    0 6px 0 #c98c18,
    0 11px 0 #7a4f07,
    0 14px 0 #070914,
    0 26px 56px rgba(255, 209, 102, 0.56);
}

.btn-hero-launch:active {
  transform: translateY(5px);
  box-shadow:
    0 2px 0 #c98c18,
    0 4px 0 #7a4f07,
    0 6px 0 #070914,
    0 10px 24px rgba(255, 209, 102, 0.3);
}

.hero-secondary-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

/* =========================================================================
   开放式无框测试空间（BOXLESS TEST WORKSPACE）
   ========================================================================= */
.open-workspace {
  width: 100%;
  max-width: 780px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: auto;
}

/* 顶部极简步骤轨迹（无边框纯空间节点） */
.step-track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}

.step-node {
  font-size: 12px;
  font-weight: 700;
  color: rgba(161, 171, 216, 0.58);
  padding: 5px 12px;
  background: rgba(9, 11, 24, 0.42);
  backdrop-filter: blur(6px);
  transition: all 0.25s ease;
}

.step-node.active {
  color: var(--gold);
  background: rgba(255, 209, 102, 0.14);
  box-shadow: 0 0 18px rgba(255, 209, 102, 0.24), inset 0 -2px 0 var(--gold);
  transform: translateY(-2px);
}

.step-node.done {
  color: var(--green);
  box-shadow: inset 0 -2px 0 rgba(6, 214, 160, 0.65);
}

.step-sep {
  color: rgba(161, 171, 216, 0.35);
  font-size: 11px;
}

/* 开放式区块标题 */
.open-title {
  margin: 0 0 10px;
  font-size: clamp(22px, 3.2vw, 32px);
  font-weight: 900;
  text-align: center;
  color: #fff;
  text-shadow: 0 4px 0 #090a14, 0 10px 26px rgba(0, 0, 0, 0.8);
  letter-spacing: 1px;
}

.open-lead {
  margin: 0 0 26px;
  font-size: 13px;
  line-height: 1.65;
  color: #ccd6ff;
  text-align: center;
  max-width: 580px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

/* Step 1：开放悬浮 AI 卡带矩阵 */
.ai-floating-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.ai-tile {
  position: relative;
  border: none;
  background: var(--surface-glass);
  backdrop-filter: blur(10px);
  color: var(--text);
  padding: 16px 10px 14px;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  box-shadow:
    0 5px 0 rgba(7, 9, 20, 0.9),
    0 12px 24px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform 0.18s cubic-bezier(0.2, 0.9, 0.3, 1.3), background 0.18s, box-shadow 0.18s;
}

.ai-tile:hover {
  background: var(--surface-hover);
  transform: translateY(-5px);
  box-shadow:
    0 8px 0 rgba(7, 9, 20, 0.92),
    0 18px 34px rgba(0, 0, 0, 0.58),
    inset 0 0 0 1px rgba(76, 201, 240, 0.55);
}

.ai-tile.selected {
  background: rgba(24, 34, 68, 0.88);
  transform: translateY(-4px);
  box-shadow:
    0 6px 0 rgba(7, 9, 20, 0.95),
    0 0 26px var(--tile-color, rgba(76, 201, 240, 0.45)),
    inset 0 0 0 2px var(--tile-color, var(--cyan));
}

.ai-mini-icon {
  width: 26px;
  height: 26px;
  image-rendering: pixelated;
  display: block;
}

.ai-tile-name {
  font-size: 13px;
  font-weight: 800;
}

/* 通用 3D 悬浮像素按钮 */
.btn-3d {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 15px 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.15s;
}

.btn-3d:hover {
  transform: translateY(-3px);
  filter: brightness(1.06);
}

.btn-3d:active {
  transform: translateY(3px);
}

.btn-gold {
  background: linear-gradient(180deg, #ffe082, #ffd166);
  color: #14121d;
  box-shadow: 0 5px 0 #a8740e, 0 12px 28px rgba(255, 209, 102, 0.3);
}

.btn-cyan {
  background: linear-gradient(180deg, #72d6f5, #4cc9f0);
  color: #091824;
  box-shadow: 0 5px 0 #1f7b9c, 0 12px 26px rgba(76, 201, 240, 0.28);
}

.btn-green {
  background: linear-gradient(180deg, #2ef0bd, #06d6a0);
  color: #062118;
  box-shadow: 0 5px 0 #04805f, 0 12px 26px rgba(6, 214, 160, 0.28);
}

.btn-red {
  background: linear-gradient(180deg, #ff708a, #ff4d6d);
  color: #fff;
  box-shadow: 0 5px 0 #a31d36, 0 12px 26px rgba(255, 77, 109, 0.32);
}

.btn-ghost {
  background: rgba(14, 18, 38, 0.65);
  backdrop-filter: blur(8px);
  color: var(--text);
  box-shadow: 0 4px 0 #070914, inset 0 0 0 1px rgba(154, 163, 204, 0.35);
  font-size: 13px;
  padding: 12px 18px;
}

.action-cluster {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.link-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  padding: 6px 8px;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color 0.15s;
}

.link-btn:hover {
  color: var(--gold);
}

.prompt-preview {
  width: 100%;
  max-width: 640px;
  margin-top: 12px;
  background: rgba(7, 9, 20, 0.84);
  backdrop-filter: blur(10px);
  padding: 14px;
  font-size: 11px;
  line-height: 1.55;
  color: #c2ccf5;
  max-height: 220px;
  overflow-y: auto;
  white-space: pre-wrap;
  text-align: left;
  box-shadow: inset 0 0 0 1px rgba(76, 201, 240, 0.25);
}

/* Step 2：无框激光扫描输入槽 */
.scanner-stage {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin-bottom: 16px;
  overflow: hidden;
}

textarea {
  width: 100%;
  min-height: 155px;
  background: rgba(8, 10, 22, 0.72);
  backdrop-filter: blur(10px);
  color: var(--text);
  border: none;
  box-shadow:
    inset 0 0 0 1px rgba(76, 201, 240, 0.35),
    0 14px 36px rgba(0, 0, 0, 0.55);
  padding: 16px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  display: block;
  user-select: text;
}

textarea:focus {
  box-shadow:
    inset 0 0 0 2px var(--cyan),
    0 0 28px rgba(76, 201, 240, 0.25);
}

.laser-beam {
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--cyan);
  box-shadow: 0 0 16px var(--cyan), 0 0 32px var(--green);
  top: -8px;
  opacity: 0;
  pointer-events: none;
}

.scanner-stage.scanning .laser-beam {
  opacity: 1;
  animation: laserSweep 0.62s ease-in-out forwards;
}

@keyframes laserSweep {
  0% { top: 0%; opacity: 1; }
  85% { top: 96%; opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.status-banner {
  width: 100%;
  max-width: 640px;
  margin-top: 12px;
  padding: 12px 16px;
  font-size: 12px;
  line-height: 1.5;
  backdrop-filter: blur(8px);
}

.status-ok {
  background: rgba(6, 214, 160, 0.14);
  box-shadow: inset 3px 0 0 var(--green);
  color: #b7ffea;
}

.status-err {
  background: rgba(255, 77, 109, 0.16);
  box-shadow: inset 3px 0 0 var(--red);
  color: #ffd0da;
}

/* Step 3：悬浮心电图测谎仪与无框选项 */
.polygraph-strip {
  width: 100%;
  max-width: 600px;
  background: rgba(7, 9, 19, 0.68);
  backdrop-filter: blur(8px);
  padding: 10px 14px;
  margin-bottom: 22px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), inset 0 -2px 0 rgba(6, 214, 160, 0.45);
}

.polygraph-header {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 6px;
}

.polygraph-header.alert {
  color: var(--red);
}

#ecgCanvas {
  width: 100%;
  height: 54px;
  display: block;
  image-rendering: pixelated;
}

.choice-stack {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.choice-pill {
  width: 100%;
  text-align: left;
  border: none;
  background: var(--surface-glass);
  backdrop-filter: blur(10px);
  color: var(--text);
  padding: 16px 18px;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow:
    0 5px 0 rgba(7, 9, 20, 0.92),
    0 14px 28px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: transform 0.16s cubic-bezier(0.2, 0.9, 0.3, 1.3), background 0.16s, box-shadow 0.16s;
}

.choice-pill:hover {
  background: rgba(34, 40, 78, 0.84);
  transform: translateX(8px) translateY(-2px);
  box-shadow:
    0 6px 0 rgba(7, 9, 20, 0.96),
    0 18px 34px rgba(0, 0, 0, 0.55),
    inset 3px 0 0 var(--gold);
}

.choice-key {
  min-width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(76, 201, 240, 0.18);
  color: var(--cyan);
  font-weight: 900;
  font-size: 14px;
}

.choice-pill:hover .choice-key {
  background: var(--gold);
  color: #14121d;
}

.choice-title {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}

.choice-desc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

/* =========================================================================
   STEP 4：高拟物 3D 实体收藏闪卡展示舞台（PHYSICAL 3D TRADING CARD）
   ========================================================================= */
.result-open-stage {
  width: 100%;
  max-width: 1020px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.card-showcase-zone {
  perspective: 1400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

/* 3D 实体闪卡容器：具备真实多 Z 轴分层与实体侧边厚度 */
.holo-card-3d {
  position: relative;
  width: min(360px, 82vw);
  aspect-ratio: 9 / 16;
  flex-shrink: 0;
  transform-style: preserve-3d;
  transition: transform 0.12s ease-out;
  will-change: transform;
  cursor: grab;
}

.holo-card-3d:active {
  cursor: grabbing;
}

.holo-card-3d.unseal-flip {
  animation: cardFlipIn 0.78s cubic-bezier(0.2, 0.9, 0.25, 1.05);
}

@keyframes cardFlipIn {
  0% { transform: rotateY(180deg) rotateX(14deg) scale(0.76); opacity: 0; }
  100% { transform: rotateY(0deg) rotateX(0deg) scale(1); opacity: 1; }
}

/* 拟物卡砖 3D 侧边厚度切面（底面阴影层 + 金属包边层） */
.card-thickness-slab {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #2e3561 0%, #101326 50%, #2a3059 100%);
  transform: translateZ(-12px);
  box-shadow:
    0 32px 72px rgba(0, 0, 0, 0.85),
    0 0 42px var(--result-glow, rgba(76, 201, 240, 0.35));
  pointer-events: none;
}

.card-thickness-mid {
  position: absolute;
  inset: -2px;
  border: 3px solid var(--result-accent, var(--gold));
  background: #14172e;
  transform: translateZ(-6px);
  pointer-events: none;
}

/* 实体海报正面（完整 9:16 PNG，可直接手机长按保存） */
#posterImg,
#posterCanvas.poster-live {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border: 3px solid var(--result-accent, var(--gold));
  background: #101223;
  image-rendering: pixelated;
  transform: translateZ(0px);
}

/* Z 轴浮起层 1：像素全息斜纹 + 动态镜面光带 + 金属颗粒高光 */
.holo-foil-layer {
  position: absolute;
  inset: 3px;
  pointer-events: none;
  transform: translateZ(18px);
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.045) 0px,
      rgba(255, 255, 255, 0.045) 2px,
      transparent 2px,
      transparent 6px
    ),
    linear-gradient(
      var(--foil-angle, 120deg),
      transparent 12%,
      rgba(76, 201, 240, 0.24) 30%,
      rgba(255, 209, 102, 0.32) 45%,
      rgba(181, 131, 255, 0.26) 58%,
      rgba(255, 77, 109, 0.24) 70%,
      transparent 88%
    ),
    radial-gradient(
      circle at var(--glare-x, 50%) var(--glare-y, 35%),
      rgba(255, 255, 255, 0.42),
      transparent 48%
    );
  background-size: 100% 100%, 240% 240%, 100% 100%;
  background-position: 0 0, var(--holo-x, 50%) var(--holo-y, 50%), 0 0;
  mix-blend-mode: screen;
  opacity: 0.72;
}

/* Z 轴浮起层 2：3D 悬浮角色视差窗口（倾斜时可直观看到插画浮于卡面之上） */
.card-parallax-hero-float {
  position: absolute;
  left: 23.4%;
  top: 19.5%;
  width: 53.1%;
  aspect-ratio: 1 / 1;
  pointer-events: none;
  transform: translateZ(26px);
  border: 2px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.52);
  overflow: hidden;
  opacity: 0.94;
}

.card-parallax-hero-float img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: pixelated;
}

/* Z 轴浮起层 3：四角金属浮雕铆钉 & 实体砸章 */
.card-corner-rivets {
  position: absolute;
  inset: 8px;
  pointer-events: none;
  transform: translateZ(34px);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.stamp-impact-badge {
  position: absolute;
  top: 10%;
  right: 5%;
  pointer-events: none;
  border: 3px solid var(--red);
  background: rgba(255, 77, 109, 0.28);
  color: var(--red);
  font-weight: 900;
  font-size: 15px;
  padding: 5px 12px;
  transform: translateZ(48px) rotate(10deg) scale(2.8);
  opacity: 0;
  text-shadow: 1px 1px 0 #090a14;
  box-shadow: 0 8px 20px rgba(255, 77, 109, 0.48);
}

.stamp-impact-badge.stamped {
  animation: stampSlam3D 0.44s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

@keyframes stampSlam3D {
  0% { transform: translateZ(90px) rotate(16deg) scale(3); opacity: 0; }
  65% { transform: translateZ(44px) rotate(8deg) scale(0.92); opacity: 1; }
  100% { transform: translateZ(48px) rotate(10deg) scale(1); opacity: 0; }
}

.save-hint {
  margin-top: 14px;
  font-size: 12px;
  color: var(--gold);
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

/* 结果页右侧/下方无框操作面板 */
.result-controls-zone {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.result-verdict-banner {
  background: rgba(10, 12, 26, 0.62);
  backdrop-filter: blur(8px);
  padding: 16px 18px;
  box-shadow: inset 3px 0 0 var(--result-accent, var(--gold));
}

.result-verdict-code {
  font-size: 28px;
  font-weight: 900;
  color: var(--result-accent, var(--gold));
  text-shadow: 0 3px 0 #090a14;
}

.result-verdict-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-top: 4px;
}

.result-verdict-roast {
  font-size: 13px;
  line-height: 1.6;
  color: #d6e0ff;
  margin-top: 10px;
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.compare-card {
  background: rgba(10, 12, 26, 0.68);
  backdrop-filter: blur(8px);
  padding: 12px;
  font-size: 12px;
  box-shadow: inset 0 2px 0 var(--purple);
}

.compare-code {
  font-size: 18px;
  font-weight: 900;
  color: var(--gold);
  margin: 4px 0;
}

.compare-roast {
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.5;
  color: #cbd5ff;
}

/* ---------- 拟真镭射塑封卡包撕开仪式 ---------- */
.unseal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 15, 0.88);
  backdrop-filter: blur(12px);
  z-index: 880;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.foil-pack-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  user-select: none;
  touch-action: none;
  perspective: 1400px;
}

.pack-status-caption {
  font-size: 13px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 1px;
  margin-bottom: 18px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
  transition: color 0.25s;
}

.foil-pack-wrapper {
  position: relative;
  width: min(290px, 76vw);
  height: min(440px, 114vw);
  transform-style: preserve-3d;
  transition: transform 0.14s ease-out;
  will-change: transform;
  animation: packDropIn 0.45s cubic-bezier(0.18, 0.89, 0.32, 1.2);
}

@keyframes packDropIn {
  0% { transform: translateY(-48px) scale(0.84) rotate(-4deg); opacity: 0; }
  100% { transform: translateY(0) scale(1) rotate(0deg); opacity: 1; }
}

/* 隐藏在卡包内部的实体闪卡，撕开后连贯抽出 */
.pack-inner-card {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 74px;
  bottom: 24px;
  background: linear-gradient(155deg, #21274d 0%, #0d1022 100%);
  border: 3px solid var(--pack-accent, var(--gold));
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
  opacity: 0;
  transform: translate3d(0, 18px, -4px) scale(0.92);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.85), 0 0 32px var(--pack-accent, var(--gold));
  transition: transform 0.72s cubic-bezier(0.2, 0.9, 0.24, 1.08), opacity 0.18s ease;
}

.pack-inner-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  image-rendering: pixelated;
  border: 2px solid #090a14;
  background: #080a14;
}

.pack-inner-code {
  margin-top: 12px;
  font-size: 22px;
  font-weight: 900;
  color: var(--pack-accent, var(--gold));
  text-shadow: 2px 2px 0 #090a14;
}

.pack-inner-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-top: 4px;
}

/* 镭射塑封包装下半主体 */
.foil-pack-body {
  position: absolute;
  left: 0;
  right: 0;
  top: 66px;
  bottom: 0;
  z-index: 4;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(
      130deg,
      #1a203e 0%,
      #2c386e 22%,
      #1b2448 45%,
      #34265c 68%,
      #141830 100%
    );
  border: 2px solid rgba(255, 255, 255, 0.26);
  border-top: none;
  box-shadow:
    inset 10px 0 18px rgba(255, 255, 255, 0.08),
    inset -10px 0 22px rgba(0, 0, 0, 0.55),
    0 26px 60px rgba(0, 0, 0, 0.85);
  transform: translateZ(14px);
  /* 滑落过程保持完全不透明，只在彻底脱离闪卡底边后才淡出，杜绝重影 */
  transition:
    transform 0.68s cubic-bezier(0.32, 0, 0.2, 1),
    opacity 0.16s ease 0.54s;
}

/* 镭射塑封金属反光扫光层（联动 3D 鼠标倾角） */
.foil-pack-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.045) 0px,
      rgba(255, 255, 255, 0.045) 2px,
      transparent 2px,
      transparent 7px
    ),
    linear-gradient(
      var(--pack-foil-angle, 115deg),
      transparent 15%,
      rgba(76, 201, 240, 0.32) 34%,
      rgba(255, 209, 102, 0.38) 48%,
      rgba(255, 77, 109, 0.30) 62%,
      transparent 82%
    ),
    radial-gradient(
      circle at var(--pack-glare-x, 50%) var(--pack-glare-y, 35%),
      rgba(255, 255, 255, 0.34),
      transparent 52%
    );
  background-size: 100% 100%, 240% 240%, 100% 100%;
  background-position: 0 0, var(--pack-glare-x, 50%) var(--pack-glare-y, 50%), 0 0;
  mix-blend-mode: screen;
}

.foil-pack-brand {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 14px;
  z-index: 2;
}

.foil-pack-emblem {
  font-size: 32px;
  line-height: 1.08;
  font-weight: 900;
  text-align: center;
  letter-spacing: 2px;
  color: #fff;
  padding: 16px 22px;
  border: 3px solid var(--pack-accent, var(--gold));
  background: rgba(9, 11, 24, 0.58);
  box-shadow: 0 6px 0 #070914, 0 0 26px rgba(255, 209, 102, 0.28);
  text-shadow: 0 3px 0 #070914;
  z-index: 2;
}

.foil-pack-meta {
  margin-top: 18px;
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--cyan);
  z-index: 2;
}

/* 拟真锯齿热压封边（底部与顶部） */
.foil-crimp-bottom,
.foil-crimp-top {
  position: absolute;
  left: 0;
  right: 0;
  height: 16px;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.22) 0px,
    rgba(255, 255, 255, 0.22) 3px,
    rgba(7, 9, 20, 0.55) 3px,
    rgba(7, 9, 20, 0.55) 6px
  );
}

.foil-crimp-bottom {
  bottom: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.foil-crimp-top {
  top: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* 镭射包装顶部可撕开封条 */
.foil-pack-top {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 66px;
  z-index: 5;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 12px;
  background: linear-gradient(125deg, #273261 0%, #3a4685 50%, #1d254a 100%);
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-bottom: none;
  box-shadow: inset 8px 0 14px rgba(255, 255, 255, 0.12);
  transform-origin: left bottom;
  transform: translateZ(16px);
  transition: transform 0.55s cubic-bezier(0.25, 0.9, 0.3, 1), opacity 0.22s ease 0.32s;
}

.foil-pack-top-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.78);
}

/* 稀有隐藏款红光警戒封装 */
.foil-pack-wrapper.rare-alert .foil-pack-body,
.foil-pack-wrapper.rare-alert .foil-pack-top {
  border-color: rgba(255, 77, 109, 0.75);
  box-shadow: 0 0 42px rgba(255, 77, 109, 0.48);
}

/* 从左到右撕开的虚线轨道与滑块（Z 轴抬升至外袋之上，随 3D 包装同步偏转不穿模） */
.tear-track {
  position: absolute;
  left: -10px;
  right: -10px;
  top: 46px;
  height: 40px;
  z-index: 10;
  display: flex;
  align-items: center;
  cursor: ew-resize;
  transform: translateZ(22px);
  transform-style: preserve-3d;
}

.tear-line-bg {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  border-top: 2px dashed rgba(255, 209, 102, 0.85);
  pointer-events: none;
}

.tear-line-progress {
  position: absolute;
  left: 10px;
  top: 50%;
  height: 4px;
  width: 0%;
  transform: translateY(-50%);
  background: #070914;
  box-shadow: 0 0 10px var(--cyan);
  pointer-events: none;
}

.tear-handle {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 32px;
  padding: 0 10px;
  background: var(--gold);
  color: #14121d;
  font-size: 12px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 0 #8a5c08, 0 0 18px rgba(255, 209, 102, 0.72);
  cursor: grab;
  animation: handleNudge 1.2s ease-in-out infinite alternate;
}

.tear-handle.dragging {
  animation: none;
  cursor: grabbing;
}

@keyframes handleNudge {
  0% { margin-left: 0px; }
  100% { margin-left: 8px; }
}

/* 撕开完成后的连贯三段演出状态 */
.foil-pack-wrapper.torn .tear-track {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
}

.foil-pack-wrapper.torn .foil-pack-top {
  transform: translate3d(130px, -135px, 24px) rotate(34deg);
  opacity: 0;
}

.foil-pack-wrapper.torn .pack-inner-card {
  opacity: 1;
  transform: translate3d(0, -108px, 6px) scale(1.04);
}

.foil-pack-wrapper.card-emerge .foil-pack-body {
  /* 实体不透明向下彻底滑出闪卡下方，再于末尾淡出 */
  transform: translate3d(0, 420px, 14px) rotate(-3deg);
  opacity: 0;
}

.foil-pack-wrapper.card-emerge .pack-inner-card {
  transform: translate3d(0, -12px, 28px) scale(1.16);
}

/* ---------- 20 型图鉴全开放网格 ---------- */
.gallery-open-stage {
  width: 100%;
  max-width: 1140px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 16px;
  margin: 10px 0 22px;
}

.gallery-item {
  border: none;
  background: var(--surface-glass);
  backdrop-filter: blur(8px);
  padding: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  text-align: left;
  font-family: inherit;
  color: inherit;
  box-shadow: 0 5px 0 rgba(7, 9, 20, 0.9), 0 12px 24px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.3), box-shadow 0.2s;
}

.gallery-item:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 10px 0 rgba(7, 9, 20, 0.95), 0 20px 36px rgba(0, 0, 0, 0.65), inset 0 0 0 1px var(--gold);
}

.gallery-item.hidden-type {
  box-shadow: 0 5px 0 rgba(7, 9, 20, 0.9), inset 0 2px 0 var(--purple);
}

.gallery-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: #080a14;
  margin-bottom: 8px;
  image-rendering: pixelated;
}

.gallery-code { font-size: 14px; font-weight: 900; }
.gallery-name { font-size: 12px; color: #fff; font-weight: 700; margin: 2px 0 4px; }
.gallery-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(9, 10, 20, 0.92);
  color: var(--green);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.7), inset 0 0 0 1px var(--green);
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: all 0.22s;
  z-index: 995;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.hidden {
  display: none !important;
}

/* =========================================================================
   横屏 / 竖屏双形态响应式适配
   ========================================================================= */
/* 横屏宽屏：结果页左右开放并排，散落闪卡全展开 */
@media (min-width: 900px), (orientation: landscape) and (min-width: 740px) {
  .result-open-stage {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 54px;
  }

  .holo-card-3d {
    width: 340px;
  }
}

/* 竖屏窄屏：流式安全间距，避免闪卡与文字挤压重叠 */
@media (max-width: 799px) {
  .scene-layer.active {
    padding: 72px 16px 64px;
    justify-content: flex-start;
  }

  #sceneIpHome.active,
  #sceneHero.active {
    justify-content: center;
  }

  .open-workspace {
    margin: 0 auto;
  }

  .result-open-stage {
    gap: 24px;
  }

  .floating-hud {
    top: 10px;
    left: 12px;
    right: 12px;
  }

  .hud-brand-pill span:last-child {
    font-size: 10px;
    letter-spacing: 0.5px;
  }

  .ip-hero-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .ip-stacked-headline {
    font-size: clamp(48px, 14.5vw, 76px);
  }

  .ip-mascot-stage {
    position: absolute;
    right: -6px;
    top: -12px;
    margin: 0;
    width: 112px;
    height: 122px;
  }

  .ip-identity-bar {
    gap: 10px;
  }

  .ip-identity-roles {
    font-size: 10px;
    letter-spacing: 1px;
  }

  .btn-ip-enter {
    padding: 14px 22px;
    font-size: 13px;
  }

  .hero-split-layout {
    flex-direction: column;
    justify-content: center;
    gap: 30px;
    padding: 0 8px;
  }

  .hero-left-stage {
    align-items: center;
    text-align: center;
  }

  .hero-cta-wrap {
    align-items: center;
  }

  .hero-subtitle {
    margin: 14px 0 22px;
  }

  .hero-deck-stack {
    width: 176px;
  }

  .deck-card-code {
    font-size: 14px;
  }

  .deck-card-name {
    font-size: 11px;
  }

  .deck-hint {
    margin-top: 18px;
    font-size: 11px;
  }

  .ai-floating-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .action-row {
    grid-template-columns: 1fr;
  }

  .btn-hero-launch {
    padding: 15px 30px;
    font-size: 16px;
  }
}
