/* ==========================================================================
   苍匣 CangXia · 匣灵舞台
   开场、固定舞台、匣灵交互动效，以及下滑才出现的备案信息展示区。
   匣灵本体、匣盖、翅膀全部是手绘内联 SVG（见 index.html），不再依赖切图；
   眼睛/嘴/腮红按 stage 百分比锚定在 SVG 上方，靠 --gx/--gy 追视。
   ========================================================================== */

:root {
  --scene-paper: #eef5fe;
  --scene-paper-2: #e2eefc;
  /* 全站只准三族色：Logo 的墨蓝 + 蜜金 + 电蓝点缀。
     匣灵身上每一块都从下面这几支里取，别再引薄荷绿 / 青绿 / 粉——
     多出第四族，暖金实拍背景上就会冒出一块不属于这套视觉的色。
     统一用 --cx- 前缀，别撞 main.css 的 --ink / --blue */
  --cx-ink: #3b4252;       /* Logo 箱体的墨蓝（主色） */
  --cx-ink-lift: #8d97ad;  /* 墨蓝提亮，做受光面 */
  --cx-ink-deep: #222839;  /* 墨蓝压深，做内腔、投影 */
  --cx-gold: #ffd46b;      /* 蜜金（第二色） */
  --cx-gold-deep: #e0a13c;
  --cx-blue: #2f6bff;      /* 电蓝，只做点缀（第三色） */
  --cx-blue-pale: #cfe2ff;
  --ember: #ff8a3d;
  --ember-soft: #ffc38a;
  --ember-glow: rgba(255, 138, 61, 0.55);
  --scene-p: 0;          /* 滚动进度 0~1，由 mascot.js 写入 */
  --scene-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* 舞台 ------------------------------------------------------------------ */

/* 打开面板锁滚动时，别让滚动条消失把版面挤歪 */
html { scrollbar-gutter: stable; }

body.intro-locked { overflow: hidden; }

.scene {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-h) + clamp(6px, 1.6vh, 18px)) 18px clamp(84px, 13vh, 132px);
  overflow: hidden;
  background: radial-gradient(120% 96% at 50% -6%, #ffffff 0%, #f6fbff 40%, #e9f2fd 100%);
  isolation: isolate;
}

/* 背景视频：铺满整个舞台，默认透明，解出第一帧后由 main.js 加 .is-video 淡入。
   画面不做任何调色——原片什么样就什么样，只有开面板时才压一层模糊 */
.scene-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 46%;
  /* 只比视口大一点点，避免取整后露出 1px 白边 */
  transform: scale(1.004);
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.1s ease, filter 0.5s ease, transform 0.6s var(--scene-ease);
}

.scene.is-video .scene-video { opacity: 1; }

/* 上下两条窄渐隐：只负责让页头、页脚的字站得住，画面中间一律不盖东西 */
.scene-veil {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg,
      rgba(255, 255, 255, 0.66) 0%,
      rgba(255, 255, 255, 0.44) 5%,
      rgba(255, 255, 255, 0.12) 13%,
      rgba(255, 255, 255, 0) 25%,
      rgba(255, 255, 255, 0) 72%,
      rgba(255, 255, 255, 0.18) 86%,
      rgba(255, 255, 255, 0.46) 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.1s ease;
}

.scene.is-video .scene-veil { opacity: 1; }

/* 画面当底时：点阵、地面光斑、蓝橙光晕一起退淡——它们是自己画的底，压在实拍画面上就是那层「灰」 */
.scene.is-video .scene-dots { opacity: 0.1; }
.scene.is-video .scene-floor { opacity: 0.24; }
.scene.is-video .scene-glow { opacity: 0.4; }

/* 舞台装饰改成逐个调档：轨道和星点压下去，飘浮的小图标要留得住（现在画的是游戏 / 应用的图形） */
.scene.is-video .stage-deco { opacity: 1; }
.scene.is-video .orbit { opacity: 0.2; }
.scene.is-video .spark { opacity: 0.5; }
.scene.is-video .float-chip { opacity: 0.94; }

/* 舞台底部只剩卷轴提示这一行浅灰小字：加深一档，再压一层白色柔光 */
.scene.is-video .scene-cue {
  color: var(--muted);
  text-shadow: 0 1px 10px rgba(255, 255, 255, 0.92);
}
.scene.is-video .scene-cue:hover { color: var(--ink); }

/* 只有弹出面板（开匣 / 抽屉页 / 关于 / 登录）的时候，背景才虚化：
   视线落在卡片上，画面还留着氛围；关掉面板立刻恢复原画。
   这时候视频同时是暂停的（main.js 的 setSceneVideoPaused），模糊的是一张静帧，几乎不耗性能 */
.scene.is-open.is-video .scene-video,
body.sheet-open .scene-video,
body.panel-open .scene-video,
body.auth-open .scene-video {
  filter: blur(14px) brightness(1.02);
  transform: scale(1.06);
}

@media (max-width: 760px) {
  /* 21:9 的宽幅视频落进竖屏只会裁到中间那一条，
     把取景框挪到画面右侧（树的位置），竖屏也能看出背景 */
  .scene-video { object-position: 76% 44%; }
  .scene-veil {
    background:
      linear-gradient(180deg,
        rgba(255, 255, 255, 0.6) 0%,
        rgba(255, 255, 255, 0.4) 5%,
        rgba(255, 255, 255, 0.1) 12%,
        rgba(255, 255, 255, 0) 24%,
        rgba(255, 255, 255, 0) 70%,
        rgba(255, 255, 255, 0.16) 86%,
        rgba(255, 255, 255, 0.42) 100%);
  }
  .scene.is-open.is-video .scene-video,
  body.sheet-open .scene-video,
  body.panel-open .scene-video,
  body.auth-open .scene-video {
    filter: blur(9px) brightness(1.02);
    transform: scale(1.05);
  }
}

.scene-glow {
  position: absolute;
  inset: -10%;
  z-index: 0;
  background:
    radial-gradient(38vmax 30vmax at 50% 44%, rgba(255, 198, 138, 0.3), transparent 68%),
    radial-gradient(54vmax 46vmax at 50% 52%, rgba(47, 107, 255, 0.12), transparent 72%);
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.scene-dots {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: radial-gradient(circle, rgba(47, 107, 255, 0.16) 1px, transparent 1.2px);
  background-size: 26px 26px;
  opacity: 0.5;
  -webkit-mask-image: radial-gradient(circle at 50% 46%, #000 0%, transparent 68%);
  mask-image: radial-gradient(circle at 50% 46%, #000 0%, transparent 68%);
  pointer-events: none;
}

.scene-floor {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  height: 34%;
  background: linear-gradient(180deg, rgba(226, 238, 252, 0) 0%, rgba(214, 230, 250, 0.6) 100%);
  pointer-events: none;
}

/* 匣子靠左：画面左边是雾、右边是树，各占一半才有得看。
   上面那行小字和下面的品牌句都删掉了，这一列只剩匣子本体 */
.scene-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  padding-left: clamp(20px, 12vw, 220px);
  /* 匣子缩小后整体再往下压一点，箱底才朝画面的雾气地平线靠 */
  transform: translateY(calc(var(--scene-p) * -7vh + 22px)) scale(calc(1 - var(--scene-p) * 0.08));
}

/* 舞台是固定的，滚动只用来让备案信息升起来 */
.scene-scroll {
  height: 160vh;
  pointer-events: none;
}

/* 舞台中央 -------------------------------------------------------------- */

.mascot-stage {
  position: relative;
  /* 比原来小一档（470 → 352）：匣子不再是「占满舞台的巨人」，
     和右侧那棵远树、地面雾气的比例才说得通 */
  width: min(72vw, 352px);
  max-width: calc((100svh - var(--header-h) - 200px) * 1.2);
  /* 位置交给 .scene-inner 的 flex-start + padding-left，这里不再居中 */
  margin: 0;
}

.mascot-stage .stage-deco {
  inset: -18% -16%;
  z-index: 0;
}

.mascot-trigger {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.mascot-trigger:focus-visible .mascot-core {
  filter: drop-shadow(0 0 16px rgba(47, 107, 255, 0.5));
}

.mascot {
  --gx: 0;
  --gy: 0;
  position: relative;
  display: block;
  width: 100%;
  perspective: 1400px;
  perspective-origin: 50% 46%;
}

.mascot-tilt,
.mascot-core {
  position: relative;
  display: block;
  transform-style: preserve-3d;
}

.mascot-tilt {
  transform:
    rotateY(calc(var(--gx) * 7deg))
    rotateX(calc(var(--gy) * -5deg))
    translate3d(calc(var(--gx) * 7px), calc(var(--gy) * 5px), 0);
  transition: transform 0.28s var(--scene-ease);
  will-change: transform;
}

.mascot-core {
  animation: mascot-hover 6.4s ease-in-out infinite;
}

.mascot-body {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
}

.mascot-art {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  user-select: none;
  pointer-events: none;
  /* 光从右上来（和视频里树、太阳的方向一致）：往左下方投一道长影，外圈再补一层电蓝冷光。
     长影是「和画面同一个平面」的关键——光有接触阴影才像站在那片雾地上；
     冷光用 Logo 系统里的电蓝，只当点缀，不给箱体换色 */
  filter:
    brightness(1.03) saturate(1.04)
    drop-shadow(-12px 20px 22px rgba(52, 46, 28, 0.24))
    drop-shadow(0 7px 10px rgba(48, 42, 26, 0.18))
    drop-shadow(0 0 24px rgba(47, 107, 255, 0.22));
}

/* 落地 ---------------------------------------------------------------- */
/* 匣子本身在轻晃（mascot-hover），所以不是硬站在地上：地面上给它一滩暖光 + 一圈接触阴影，
   阴影随着轻晃一起收缩（ground-breathe），读起来就是「贴着草地飘起一点点」 */

.mascot-ground {
  position: absolute;
  left: 50%;
  bottom: -7%;
  z-index: 1;
  width: 78%;
  height: 16%;
  transform: translateX(-50%);
  pointer-events: none;
}

.mascot-ground::before,
.mascot-ground::after {
  content: '';
  position: absolute;
  border-radius: 50%;
}

/* 暖光斑：右上来的阳光在地上照出的一滩（收窄，别在箱角外侧糊出一圈白边） */
.mascot-ground::before {
  inset: 40% 12% -2% 12%;
  background: radial-gradient(closest-side,
    rgba(255, 228, 182, 0.34),
    rgba(255, 208, 146, 0.16) 56%,
    rgba(255, 208, 146, 0) 100%);
  filter: blur(9px);
}

/* 接触阴影：贴着箱底、露在箱底下面，中间实、四周散 */
.mascot-ground::after {
  inset: 42% 20% 4% 20%;
  background: radial-gradient(closest-side,
    rgba(48, 38, 24, 0.5),
    rgba(48, 38, 24, 0.2) 62%,
    rgba(48, 38, 24, 0) 100%);
  filter: blur(7px);
  animation: ground-breathe 6.4s ease-in-out infinite;
}

@keyframes ground-breathe {
  0%, 100% { transform: scale(1) translateY(0); opacity: 0.95; }
  50% { transform: scale(0.88) translateY(-6%); opacity: 0.6; }
}

/* 下半身压一层薄雾：跟着箱体走，收在箱壳底部以内，别露到箱子外面去 */
.mascot-body::after {
  content: '';
  position: absolute;
  inset: 44% 11% 14% 11%;
  border-radius: 22% / 28%;
  background: linear-gradient(180deg,
    rgba(240, 246, 252, 0) 0%,
    rgba(240, 246, 252, 0.04) 55%,
    rgba(244, 248, 252, 0.08) 100%);
  mix-blend-mode: screen;
  pointer-events: none;
}

/* 前景落叶：从匣子「前面」飘过去，前后景这才咬得上 */
.mascot-leaf {
  position: absolute;
  z-index: 3;
  width: 17px;
  height: 11px;
  border-radius: 62% 8% 62% 8%;
  background: linear-gradient(140deg, #ffe0a6, #eaa63f);
  box-shadow: 0 1px 3px rgba(120, 78, 18, 0.22);
  opacity: 0;
  pointer-events: none;
  animation: leaf-drift 12s linear infinite;
}

.mascot-leaf--a { left: 6%; top: 56%; --leaf-s: 1; animation-duration: 12.5s; animation-delay: -1.2s; }
.mascot-leaf--b { left: 76%; top: 44%; --leaf-s: 0.8; animation-duration: 9.6s; animation-delay: -5.4s; }
.mascot-leaf--c { left: 38%; top: 70%; --leaf-s: 1.2; animation-duration: 14.5s; animation-delay: -8.8s; }

@keyframes leaf-drift {
  0%   { opacity: 0; transform: translate(0, -14px) rotate(0deg) scale(var(--leaf-s, 1)); }
  14%  { opacity: 0.92; }
  82%  { opacity: 0.8; }
  100% { opacity: 0; transform: translate(28px, 38px) rotate(210deg) scale(var(--leaf-s, 1)); }
}

/* 匣子本体：纯 SVG 手绘。壳子是 Logo 箱体那支墨蓝，腰线 / 盖子 / 缝里的火是蜜金，
   铆钉点一层电蓝——三族色就齐了。
   深墨蓝在暖金实拍上容易「陷」进去，所以壳顶提亮一档（--cx-ink-lift）再加白色描边，
   靠盖子的蜜金和缝里那把火把箱体从雾里拎出来 */
.art-shadow { fill: rgba(34, 40, 57, 0.16); filter: blur(4px); }
.art-shell { fill: url(#cx-shell); stroke: rgba(255, 255, 255, 0.55); stroke-width: 1.6; }
/* 面板在墨蓝和受光面之间取一档：一圈亮边，箱面才有厚度，不然整只匣子糊成一块黑屏 */
.art-plate { fill: color-mix(in srgb, var(--cx-ink) 74%, var(--cx-ink-lift)); stroke: rgba(255, 255, 255, 0.34); stroke-width: 1.6; }
.art-inset { fill: var(--cx-ink-deep); stroke: rgba(255, 255, 255, 0.2); stroke-width: 1.6; }
.art-rivets circle { fill: var(--cx-blue-pale); fill-opacity: 0.82; }
.art-opening { fill: url(#cx-inside); }
.art-open-glow { fill: url(#cx-glow); opacity: 0; transition: opacity 0.45s ease; }
.art-rim {
  fill: none;
  stroke: url(#cx-rim);
  stroke-width: 3.4;
  stroke-linecap: round;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.art-lid-cap { fill: url(#cx-lid); stroke: rgba(255, 255, 255, 0.6); stroke-width: 1.6; }
.art-lid-sheen { fill: none; stroke: rgba(255, 255, 255, 0.62); stroke-width: 3; stroke-linecap: round; }
.art-ember { fill: url(#cx-ember); animation: ember-breathe 3.6s ease-in-out infinite; }

.art-lid {
  transform-box: view-box;
  transform-origin: 50% 62%;
  transition: transform 0.62s cubic-bezier(0.3, 1.35, 0.45, 1);
  will-change: transform;
}

/* 箱内光柱 -------------------------------------------------------------- */

.mascot-beam {
  position: absolute;
  top: 39.4%;
  left: 50%;
  z-index: 2;
  width: 78%;
  height: 62%;
  transform: translate(-50%, -100%) scaleY(0.04);
  transform-origin: 50% 100%;
  border-radius: 50% 50% 42% 42% / 30% 30% 60% 60%;
  background:
    radial-gradient(60% 90% at 50% 100%, rgba(255, 246, 226, 0.96), rgba(255, 190, 122, 0.72) 38%, rgba(255, 138, 61, 0.18) 68%, transparent 82%);
  filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.5s var(--scene-ease), opacity 0.35s ease;
}

/* 眼里飘出来的小光点 ---------------------------------------------------- */

.mascot-fx {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.mascot-fx .fx-dot {
  position: absolute;
  top: 38.6%;
  left: 50%;
  width: var(--fx-size, 7px);
  height: var(--fx-size, 7px);
  margin: calc(var(--fx-size, 7px) / -2) 0 0 calc(var(--fx-size, 7px) / -2);
  border-radius: var(--fx-radius, 50%);
  background: var(--fx-color, #ffb86b);
  box-shadow: 0 0 10px var(--fx-color, #ffb86b);
  opacity: 0;
  animation: fx-rise var(--fx-dur, 1.5s) cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}

/* 眼睛 ------------------------------------------------------------------ */

.mascot-eyes {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.mascot-eye {
  position: absolute;
  top: 49.4%;
  width: 14%;
  height: 17.6%;
}

.mascot-eye--a { left: 28.2%; }
.mascot-eye--b { left: 57.8%; }

.eye-ball {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  border-radius: 50% / 48%;
  background: radial-gradient(64% 58% at 42% 30%, #ffffff 0%, #f4f7ff 52%, #d9e2f4 100%);
  box-shadow:
    inset 0 3px 6px rgba(30, 44, 76, 0.18),
    0 3px 6px rgba(20, 32, 60, 0.16);
  transform-origin: 50% 62%;
  transition: transform 0.16s ease;
}

.eye-iris {
  position: absolute;
  top: 6%;
  left: 7%;
  display: block;
  width: 86%;
  height: 88%;
  border-radius: 50% / 48%;
  background: radial-gradient(120% 96% at 50% 96%, #ff9d55 0%, #c0632c 22%, #3d2b33 52%, #171b28 78%, #0e1120 100%);
  box-shadow: inset 0 -3px 7px rgba(255, 140, 60, 0.32);
  transform: translate(calc(var(--gx) * 20%), calc(var(--gy) * 16%));
  transition: transform 0.18s ease-out;
}

.eye-glint {
  position: absolute;
  top: 12%;
  left: 18%;
  display: block;
  width: 34%;
  height: 30%;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 36%, #ffffff 0%, rgba(255, 255, 255, 0.86) 46%, rgba(255, 255, 255, 0) 74%);
  transform: translate(calc(var(--gx) * 9%), calc(var(--gy) * 7%));
  transition: transform 0.18s ease-out;
}

.eye-glint--b {
  top: 54%;
  left: 60%;
  width: 16%;
  height: 14%;
  opacity: 0.72;
}

/* 嘴、腮红、舌头 -------------------------------------------------------- */

.mascot-mouth {
  position: absolute;
  top: 71.2%;
  left: 50%;
  z-index: 4;
  width: 5.4%;
  height: 2.6%;
  /* 面板是墨蓝，嘴角改成一道透出来的暖金缝——深色面板上用深色线会看不见 */
  border-bottom: 3px solid rgba(255, 205, 150, 0.88);
  box-shadow: 0 3px 8px rgba(255, 138, 61, 0.28);
  border-radius: 0 0 99px 99px;
  transform: translateX(-50%);
  pointer-events: none;
  transition: width 0.24s ease, height 0.24s ease, border-radius 0.24s ease, transform 0.24s ease;
}

.mascot-tongue {
  position: absolute;
  top: 73.4%;
  left: 50%;
  z-index: 3;
  width: 3.6%;
  height: 2%;
  border-radius: 0 0 99px 99px;
  /* 舌头也收进蜜金：墨蓝内腔里露出一小片暖金，比粉色更像「箱子里透着火」 */
  background: linear-gradient(180deg, var(--ember-soft), var(--ember));
  opacity: 0;
  transform: translateX(-50%) scaleY(0.2);
  transform-origin: 50% 0;
  pointer-events: none;
  transition: transform 0.26s var(--scene-ease), opacity 0.24s ease;
}

.mascot-blush {
  position: absolute;
  top: 63.4%;
  z-index: 3;
  width: 8.4%;
  height: 5.2%;
  border-radius: 50%;
  /* 腮红走蜜金（不是粉）：墨蓝面板上透出一点暖光，像被箱里的火映着 */
  background: radial-gradient(circle, rgba(255, 186, 118, 0.8), rgba(255, 186, 118, 0) 68%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mascot-blush--l { left: 17.6%; }
.mascot-blush--r { right: 17.6%; }

/* 翅膀 ------------------------------------------------------------------ */
/* 学《哈利·波特》里飞贼那对薄翅：整片是透明的薄膜，只留一圈白亮边和几根翅脉。
   扇动是翅根钉死在箱壳侧面、整片翅上下摆（像蜻蜓那样在冠状面上扑），
   不做 rotateY 翻面——翻面会让翅面缩成一条线，读起来像在扭，不像在扇 */

.mascot-wing {
  position: absolute;
  top: 39%;
  z-index: 0;
  display: block;
  width: 26%;
  filter: drop-shadow(0 2px 10px rgba(196, 220, 255, 0.5));
  transform-origin: 96% 62%;
  transition: opacity 0.5s ease, transform 0.55s var(--scene-ease);
  will-change: transform;
}

.mascot-wing svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.mascot-wing--l {
  right: 86%;
  animation: wing-flap-l 0.6s ease-in-out infinite;
}

/* 左右同步、同相：一对翅一起上去、一起下来，才是蜻蜓那种「嗡嗡」的节拍。
   右翅的翅根在它自己盒子的「左边」（贴 86% 那条箱壳侧线），所以旋转中心要镜像成 4%，
   直接继承上面的 96% 会绕翅尖转——翅根反而跟着甩出去，看着就左右不对称了 */
.mascot-wing--r {
  left: 86%;
  transform-origin: 4% 62%;
  animation: wing-flap-r 0.6s ease-in-out infinite;
}

.mascot-wing--r svg { transform: scaleX(-1); }

/* 状态：休眠 / 醒来 / 怕痒 / 开箱 -------------------------------------- */

.intro-locked .mascot-eye .eye-ball { transform: scaleY(0.06); }
.intro-locked .mascot-wing { opacity: 0; }
.intro-locked .mascot-wing--l { transform: translate(16%, 24%) rotate(-38deg) scale(0.4); }
.intro-locked .mascot-wing--r { transform: translate(-16%, 24%) rotate(38deg) scale(0.4); }
.intro-locked .art-ember { opacity: 0.4; }

.scene-in .mascot-eye .eye-ball {
  animation: eye-wake 0.5s 0.15s backwards;
}

.scene-in .mascot-wing--l { animation: wing-flap-l 0.6s ease-in-out infinite, wing-unfurl-l 0.9s 0.2s backwards; }
.scene-in .mascot-wing--r { animation: wing-flap-r 0.6s ease-in-out infinite, wing-unfurl-r 0.9s 0.2s backwards; }

/* 打盹：安静一分钟（鼠标 / 键盘都没动静）才眯起眼睛睡过去（JS 在舞台上挂 .is-sleeping） */
.mascot-stage.is-sleeping .mascot-core { animation: mascot-doze 5.6s ease-in-out infinite; }
.mascot-stage.is-sleeping .eye-ball { transform: scaleY(0.08); }
.mascot-stage.is-sleeping .mascot-mouth {
  width: 3.4%;
  height: 1.8%;
  border-radius: 99px;
  transform: translateX(-50%) rotate(-3deg);
}
.mascot-stage.is-sleeping .mascot-tongue { opacity: 0; }
.mascot-stage.is-sleeping .mascot-blush { opacity: 0.45; }
.mascot-stage.is-sleeping .mascot-wing--l { animation: wing-drowse-l 6.4s ease-in-out infinite; }
.mascot-stage.is-sleeping .mascot-wing--r { animation: wing-drowse-r 6.4s ease-in-out infinite; }
.mascot-stage.is-sleeping .mascot-hint { opacity: 0; }
.mascot-stage.is-sleeping .mascot-zzz { opacity: 1; }
.mascot-stage.is-sleeping .mascot-ground::after { animation-duration: 5.6s; }

/* 睡着的 z：三枚错开往上飘，只在 .is-sleeping 时露出来 */
.mascot-zzz {
  position: absolute;
  top: 4%;
  right: 28%;
  z-index: 6;
  display: block;
  width: 42px;
  height: 62px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

.mascot-zzz i {
  position: absolute;
  bottom: 0;
  left: 0;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 1px 8px rgba(24, 32, 52, 0.5);
  opacity: 0;
  animation: zzz-rise 3.3s ease-out infinite;
}

.mascot-zzz i:nth-child(2) { font-size: 17px; animation-delay: 1.1s; }
.mascot-zzz i:nth-child(3) { font-size: 22px; animation-delay: 2.2s; }

/* 怕痒：整只匣子抖一抖，眼睛眯起来，翅膀扇得飞快，舌头伸出来 */
.mascot.is-tickled .mascot-core { animation: mascot-giggle 0.46s ease-in-out infinite; }
.mascot.is-tickled .eye-ball { transform: scaleY(0.6); }
.mascot.is-tickled .mascot-wing--l { animation-duration: 0.24s; }
.mascot.is-tickled .mascot-wing--r { animation-duration: 0.24s; }
.mascot.is-tickled .mascot-mouth { width: 6.6%; height: 3.6%; border-radius: 44% 44% 50% 50%; }
.mascot.is-tickled .mascot-blush { opacity: 1; }
.mascot.is-tickled .mascot-tongue { opacity: 1; transform: translateX(-50%) scaleY(1); }

/* 悬停：翅根扇得更欢，右眼眨一下，嘴角歪着笑（有点得意） */
.mascot-trigger:hover .mascot-wing--l { animation-duration: 0.34s; }
.mascot-trigger:hover .mascot-wing--r { animation-duration: 0.34s; }
.mascot-trigger:hover .mascot-blush { opacity: 0.85; }
.mascot-trigger:hover .mascot-mouth {
  width: 6.2%;
  height: 3.2%;
  border-radius: 10% 10% 70% 70%;
  transform: translateX(-50%) rotate(-5deg);
}
.mascot-trigger:hover .mascot-tongue { opacity: 1; transform: translateX(-42%) scaleY(0.86) rotate(6deg); }
.mascot-trigger:hover .mascot-eye--b .eye-ball { transform: scaleY(0.4); }

/* 开箱：盖子浮起来挂着、光柱亮起、翅膀撑开、匣子手舞足蹈 */
.mascot.is-open .art-lid {
  transform: translate(-6px, -54px) rotate(-10deg);
  animation: lid-float 2.8s ease-in-out infinite;
}
.mascot.is-open .art-open-glow { opacity: 1; }
.mascot.is-open .art-rim { opacity: 1; }

.mascot.is-open .mascot-core { animation: mascot-dance 2.4s ease-in-out infinite; }

.mascot.is-open .mascot-beam {
  transform: translate(-50%, -100%) scaleY(1);
  opacity: 1;
}

.mascot.is-open .eye-ball { transform: scaleY(1.1) scaleX(1.04); }
.mascot.is-open .mascot-mouth { width: 6.8%; height: 4.6%; border-radius: 44% 44% 50% 50%; }
.mascot.is-open .mascot-blush { opacity: 1; }
.mascot.is-open .mascot-tongue { opacity: 1; transform: translateX(-50%) scaleY(1); }

/* 开箱时先来一下「撑翅」（0.55s 一次性），随后接着快速上下扇，别用 forwards 把翅钉住 */
.mascot.is-open .mascot-wing--l { animation: wing-spread-l 0.55s ease-out, wing-flap-l 0.34s 0.55s ease-in-out infinite; }
.mascot.is-open .mascot-wing--r { animation: wing-spread-r 0.55s ease-out, wing-flap-r 0.34s 0.55s ease-in-out infinite; }

.mascot.is-blinking .eye-ball { transform: scaleY(0.06); }
.mascot.is-blinking.is-tickled .eye-ball { transform: scaleY(0.06); }

.scene.is-shaking .mascot { animation: stage-thump 0.5s ease-out; }

/* 开匣之后：匣灵缩小、落到屏幕底部的「走廊」里，把整块舞台让给卡片。
   走廊高度由首页的 --hub-lane 决定，开匣卡片和抽屉页的底边都停在走廊上沿，
   这里把匣灵整体下移，让它整个身子都留在走廊内，不会被卡片盖住 */
.mascot-stage { transition: transform 0.72s cubic-bezier(0.22, 1, 0.3, 1); }

.scene.is-open .mascot-stage {
  /* 匣子本来就站在画面左边，开箱后只需要往下落到走廊里，横向只微调一点，别再往左推 */
  transform: translate(clamp(-160px, -5vw, -20px), max(170px, 32vh)) scale(0.36);
}

/* 开匣之后舞台自己的文案退场：卡片里已经有同样的信息，留着只会从卡片缝里透出来。
   用 opacity 收起，布局不变，匣灵落位也就不受影响 */
.scene-cue { transition: opacity 0.42s ease; }

.scene.is-open .scene-cue {
  opacity: 0;
  pointer-events: none;
}

.scene-cue {
  position: absolute;
  bottom: clamp(12px, 2.4vh, 26px);
  left: 50%;
  z-index: 3;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--muted-2);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  transform: translateX(-50%);
  transition: color 0.2s ease, opacity 0.3s ease;
}

.scene-cue:hover { color: var(--ink); }
.scene-cue .scroll-line {
  display: block;
  width: 1px;
  height: 26px;
  background: linear-gradient(180deg, rgba(47, 107, 255, 0.5), rgba(47, 107, 255, 0));
  overflow: hidden;
  position: relative;
}

.scene-cue .scroll-dot {
  position: absolute;
  top: 0;
  left: -1.5px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--blue);
  animation: cue-bounce 1.9s ease-in-out infinite;
}

.scene.is-filing .scene-cue { opacity: 0; pointer-events: none; }

/* 开箱之后「点一下开箱」的提示就该退场了 */
.scene.is-open .mascot-hint { opacity: 0; }

/* 钥匙帧 ---------------------------------------------------------------- */

@keyframes mascot-hover {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-1.4%) rotate(-0.5deg); }
}

/* 打盹时的呼吸：幅度比 mascot-hover 更沉、更慢，像真的趴下去了 */
@keyframes mascot-doze {
  0%, 100% { transform: translateY(1.4%) rotate(-1.1deg) scale(1, 0.985); }
  50% { transform: translateY(2.4%) rotate(-1.9deg) scale(1.012, 0.97); }
}

@keyframes mascot-giggle {
  0% { transform: translate(0, 0) rotate(0deg) scale(1, 1); }
  20% { transform: translate(-1.3%, 0.9%) rotate(-1.7deg) scale(1.03, 0.97); }
  45% { transform: translate(1.1%, -1%) rotate(1.5deg) scale(0.975, 1.035); }
  70% { transform: translate(-0.7%, 0.6%) rotate(-0.9deg) scale(1.02, 0.985); }
  100% { transform: translate(0, 0) rotate(0deg) scale(1, 1); }
}

@keyframes stage-thump {
  0% { transform: scale(1); }
  28% { transform: scale(1.045) rotate(-0.6deg); }
  60% { transform: scale(0.985) rotate(0.4deg); }
  100% { transform: scale(1); }
}

/* 开匣后匣灵的手舞足蹈：带一点挤压拉伸，循环不突兀 */
@keyframes mascot-dance {
  0% { transform: translate(0, 0) rotate(0deg) scale(1, 1); }
  16% { transform: translate(-2%, -4%) rotate(-3.2deg) scale(0.975, 1.035); }
  34% { transform: translate(2.2%, -1.2%) rotate(3deg) scale(1.025, 0.975); }
  52% { transform: translate(-1.2%, -5%) rotate(-2deg) scale(0.985, 1.02); }
  70% { transform: translate(1.8%, -2%) rotate(2.4deg) scale(1.015, 0.99); }
  86% { transform: translate(-0.6%, -3%) rotate(-1.2deg) scale(0.995, 1.01); }
  100% { transform: translate(0, 0) rotate(0deg) scale(1, 1); }
}

/* 盖子浮在匣口上方轻轻晃 */
@keyframes lid-float {
  0%, 100% { transform: translate(-6px, -54px) rotate(-10deg); }
  50% { transform: translate(-2px, -61px) rotate(-4deg); }
}

/* 匣口飘出来的小光点 */
@keyframes fx-rise {
  0% { opacity: 0; transform: translate(0, 0) scale(0.2); }
  16% { opacity: 1; }
  70% { opacity: 0.85; }
  100% { opacity: 0; transform: translate(var(--fx-dx, 0px), var(--fx-dy, -140px)) scale(0.9); }
}

@keyframes ember-breathe {
  0%, 100% { opacity: 0.62; }
  50% { opacity: 1; }
}

@keyframes eye-wake {
  0% { transform: scaleY(0.06); }
  55% { transform: scaleY(1.16); }
  78% { transform: scaleY(0.94); }
  100% { transform: scaleY(1); }
}

/* 扇动：翅根不动，整片翅在冠状面上下摆——上去是蜻蜓式的「举翅」，下来扫过箱腰。
   两只翅同相（一起上、一起下），所以这里左右角度互为镜像，中间那帧方向相反 */
@keyframes wing-flap-l {
  0%, 100% { transform: rotate(18deg) scale(1); }
  50% { transform: rotate(-14deg) scale(0.99); }
}

@keyframes wing-flap-r {
  0%, 100% { transform: rotate(-18deg) scale(1); }
  50% { transform: rotate(14deg) scale(0.99); }
}

/* 睡着：翅膀垂下来贴在箱壳边上，半天才抖一下 */
@keyframes wing-drowse-l {
  0%, 74%, 100% { transform: rotate(-12deg) scale(0.92); }
  82% { transform: rotate(-6deg) scale(0.94); }
}

@keyframes wing-drowse-r {
  0%, 74%, 100% { transform: rotate(12deg) scale(0.92); }
  82% { transform: rotate(6deg) scale(0.94); }
}

@keyframes zzz-rise {
  0% { opacity: 0; transform: translate(0, 0) scale(0.55) rotate(-8deg); }
  20% { opacity: 0.95; }
  68% { opacity: 0.7; }
  100% { opacity: 0; transform: translate(15px, -34px) scale(1.05) rotate(10deg); }
}

@keyframes wing-unfurl-l {
  0% { opacity: 0; transform: translate(16%, 24%) rotate(-38deg) scale(0.4); }
  100% { opacity: 1; transform: rotate(18deg) scale(1); }
}

@keyframes wing-unfurl-r {
  0% { opacity: 0; transform: translate(-16%, 24%) rotate(38deg) scale(0.4); }
  100% { opacity: 1; transform: rotate(-18deg) scale(1); }
}

/* 开箱：一对翅先「撑」到最高，再落回扇动的起始角（18° / −18°），和 wing-flap 的 0% 对齐，接得上不跳 */
@keyframes wing-spread-l {
  0% { opacity: 1; transform: rotate(18deg) scale(1); }
  60% { opacity: 1; transform: rotate(34deg) scale(1.14); }
  100% { opacity: 1; transform: rotate(18deg) scale(1); }
}

@keyframes wing-spread-r {
  0% { opacity: 1; transform: rotate(-18deg) scale(1); }
  60% { opacity: 1; transform: rotate(-34deg) scale(1.14); }
  100% { opacity: 1; transform: rotate(-18deg) scale(1); }
}

@keyframes hint-float {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -5px); }
}

@keyframes cue-bounce {
  0% { transform: translateY(-4px); opacity: 0; }
  30% { opacity: 1; }
  80% { transform: translateY(22px); opacity: 0; }
  100% { transform: translateY(22px); opacity: 0; }
}

@keyframes stage-rise {
  0% { opacity: 0; transform: translateY(22px) scale(0.94); }
  100% { opacity: 1; transform: none; }
}

/* 卷轴提示自带居中位移，不能套用 stage-rise，否则入场时会跑到右边 */
@keyframes cue-rise {
  0% { opacity: 0; transform: translate(-50%, 22px); }
  100% { opacity: 1; transform: translate(-50%, 0); }
}

/* 舞台入场 -------------------------------------------------------------- */

.scene-in .mascot-stage { animation: stage-rise 1s 0.05s backwards; }
.scene-in .scene-cue { animation: cue-rise 0.7s 0.8s backwards; }

/* 开场遮幕 -------------------------------------------------------------- */

.intro {
  --intro-hole: clamp(168px, 27vmin, 300px);
  position: fixed;
  inset: 0;
  z-index: 3000;
  overflow: hidden;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.intro-veil {
  position: absolute;
  inset: -8%;
  background:
    radial-gradient(circle at 50% 46%,
      rgba(238, 245, 254, 0) 0,
      rgba(238, 245, 254, 0) calc(var(--intro-hole) * 0.86),
      rgba(240, 247, 255, 0.92) var(--intro-hole),
      #eef5fe calc(var(--intro-hole) * 1.22),
      #e7f0fc 100%);
  animation: intro-veil-in 1s var(--scene-ease) backwards;
  transition: transform 0.95s var(--scene-ease), opacity 0.8s ease;
}

.intro-veil::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(47, 107, 255, 0.18) 1px, transparent 1.2px);
  background-size: 24px 24px;
  opacity: 0.55;
  -webkit-mask-image: radial-gradient(circle at 50% 46%, transparent 0 calc(var(--intro-hole) * 1.02), #000 calc(var(--intro-hole) * 1.5));
  mask-image: radial-gradient(circle at 50% 46%, transparent 0 calc(var(--intro-hole) * 1.02), #000 calc(var(--intro-hole) * 1.5));
}

.intro-ring {
  position: absolute;
  top: 46%;
  left: 50%;
  width: calc(var(--intro-hole) * 2.06);
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.intro-ring::before,
.intro-ring::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.intro-ring::before {
  inset: 0;
  border: 1px dashed rgba(47, 107, 255, 0.26);
  animation: intro-spin 26s linear infinite;
}

.intro-ring::after {
  inset: 9%;
  border: 1px solid rgba(255, 138, 61, 0.24);
  animation: intro-spin 18s linear reverse infinite;
}

.intro-center {
  position: absolute;
  top: calc(46% + var(--intro-hole) + 26px);
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
  text-align: center;
  transition: opacity 0.3s ease;
}

.intro-label {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
}

.intro-progress {
  display: block;
  width: 124px;
  height: 2px;
  border-radius: 99px;
  background: rgba(47, 107, 255, 0.14);
  overflow: hidden;
}

.intro-progress i {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--ember));
  transform-origin: 0 50%;
  animation: intro-progress 2.2s cubic-bezier(0.3, 0.7, 0.2, 1) backwards;
}

.intro-skip {
  position: absolute;
  right: clamp(16px, 3vw, 34px);
  bottom: clamp(16px, 3vh, 30px);
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border: 1px solid rgba(31, 54, 105, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, opacity 0.3s ease;
}

.intro-skip:hover {
  color: var(--ink);
  border-color: rgba(47, 107, 255, 0.32);
  transform: translateY(-1px);
}

.intro.is-leaving { pointer-events: none; }
.intro.is-leaving .intro-veil { transform: scale(1.65); opacity: 0; }
.intro.is-leaving .intro-center,
.intro.is-leaving .intro-skip { opacity: 0; }
.intro.is-leaving .intro-ring { opacity: 0; transition: opacity 0.4s ease; }

@keyframes intro-veil-in {
  0% { opacity: 0.2; transform: scale(1.32); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes intro-spin {
  to { transform: rotate(360deg); }
}

@keyframes intro-progress {
  0% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

/* 备案信息展示区 -------------------------------------------------------- */

.filing {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  padding: clamp(16px, 2.6vh, 28px) 0 clamp(12px, 2vh, 20px);
  border-top: 1px solid rgba(31, 54, 105, 0.1);
  border-radius: clamp(18px, 2.4vh, 28px) clamp(18px, 2.4vh, 28px) 0 0;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 62%, #eff6ff 100%);
  box-shadow: 0 -24px 70px rgba(24, 40, 74, 0.14);
  transform: translateY(calc((1 - var(--scene-p)) * 104%));
  will-change: transform;
  pointer-events: none;
}

body.scene-filing .filing { pointer-events: auto; }

.filing-grip {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 42px;
  height: 4px;
  margin-left: -21px;
  border-radius: 99px;
  background: rgba(31, 54, 105, 0.14);
}

.filing-inner {
  width: min(var(--container), calc(100% - 2 * clamp(16px, 4vw, 40px)));
  margin: 0 auto;
}

.filing-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: clamp(10px, 1.8vh, 16px);
  border-bottom: 1px dashed var(--line-strong);
}

.filing-title {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}

.filing-back {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.filing-back:hover {
  color: var(--blue-dark);
  border-color: rgba(47, 107, 255, 0.35);
  box-shadow: 0 8px 18px rgba(47, 107, 255, 0.14);
  transform: translateY(-1px);
}

.filing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 26px);
  margin: clamp(12px, 2vh, 20px) 0 0;
}

.filing-item {
  position: relative;
  padding-left: 13px;
}

.filing-item::before {
  content: "";
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  width: 2px;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--ember), rgba(255, 138, 61, 0));
  opacity: 0.55;
}

.filing-item dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.filing-item dd {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  word-break: break-word;
}

.filing-item dd a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(47, 107, 255, 0.28);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.filing-item dd a:hover {
  color: var(--blue-dark);
  border-color: var(--blue-dark);
}

.filing-item small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
}

.filing-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 18px;
  margin-top: clamp(12px, 2vh, 20px);
  padding-top: clamp(10px, 1.6vh, 14px);
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 12px;
}

.filing-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 12px;
}

.filing-links a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.filing-links a:hover {
  color: var(--blue-dark);
  border-bottom-color: rgba(47, 107, 255, 0.4);
}

/* 全览库（原「关于苍匣」）：整屏抽屉 ------------------------------------ */

.info-panel {
  position: fixed;
  top: var(--header-h);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 45;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  visibility: hidden;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.6s var(--scene-ease), opacity 0.45s ease, visibility 0.6s;
  will-change: transform, opacity;
}

.info-panel.is-open {
  visibility: visible;
  transform: none;
  opacity: 1;
}

body.panel-open { overflow: hidden; }

.info-panel-bar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
}

.info-panel-title {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

.info-panel-close {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.info-panel-close:hover {
  color: var(--blue-dark);
  border-color: rgba(47, 107, 255, 0.35);
  box-shadow: 0 8px 18px rgba(47, 107, 255, 0.14);
  transform: translateY(-1px);
}

.info-panel-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(18px, 3.4vh, 38px) 0 clamp(48px, 8vh, 88px);
  -webkit-overflow-scrolling: touch;
}

/* 响应式 ---------------------------------------------------------------- */

@media (max-width: 980px) {
  .mascot-stage { width: min(72vw, 340px); }
  .filing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .scene { padding-bottom: clamp(74px, 12vh, 112px); }
  /* 窄屏没有「左边区域」可分，匣子回到正中 */
  .scene-inner { align-items: center; padding-left: 0; }
  .mascot-stage {
    width: min(70vw, 300px);
    max-width: calc((100svh - var(--header-h) - 200px) * 1.06);
    margin: 0 auto;
  }
  /* 开匣之后：匣灵缩到左下角，卡片占满上方，底边照样停在走廊上沿 */
  .scene.is-open .mascot-stage {
    transform: translate(clamp(-132px, -28vw, -70px), max(250px, 36vh)) scale(0.44);
  }
  .mascot-hint { padding: 6px 12px; font-size: 12px; top: 0; }
  .filing { max-height: 74vh; overflow-y: auto; }
  .filing-head { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 560px) {
  .filing-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .filing-item small { display: none; }
  .filing-base { flex-direction: column; align-items: flex-start; }
}

@media (max-height: 720px) {
  .scene { padding-top: calc(var(--header-h) + 4px); padding-bottom: 76px; }
  .mascot-stage { max-width: calc((100svh - var(--header-h) - 190px) * 1.12); }
  .mascot-hint { display: none; }
  .filing-item small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .intro { display: none !important; }
  .mascot-core,
  .mascot-wing,
  .art-ember,
  .art-lid,
  .mascot-fx .fx-dot,
  .mascot-hint,
  .mascot-zzz i,
  .scene-cue .scroll-dot { animation: none !important; }
  .mascot-stage,
  .scene-cue { animation: none !important; }
  .mascot-stage { transition: none !important; }
  .art-lid { transition: none !important; }
  .mascot-tilt { transform: none !important; }
  .mascot-leaf,
  .mascot-ground::after { animation: none !important; }
  .mascot-leaf { display: none; }
  .scene-video { transition: opacity 0.4s ease !important; }
  .scene-inner { transform: translateY(22px); }
}

/* 提示气泡 -------------------------------------------------------------- */

.mascot-hint {
  position: absolute;
  top: 2%;
  left: 50%;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 24px rgba(31, 54, 105, 0.14);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  transform: translate(-50%, 0);
  pointer-events: none;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: opacity 0.4s ease, transform 0.4s var(--scene-ease);
}

.mascot-hint::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border-right: 1px solid rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.82);
  transform: rotate(45deg);
}

.mascot-hint.is-hot { color: #c2571d; }
.scene-in .mascot-hint { animation: hint-float 3.4s ease-in-out infinite; }

/* 飞舞粒子层 ------------------------------------------------------------ */

.mascot-stage .burst-layer {
  position: absolute;
  inset: -22% -18%;
  z-index: 6;
  overflow: visible;
  pointer-events: none;
}

/* 开箱瞬间飞出的工具符号（main.js 生成的 .burst），从匣子正中向外散开 */
.mascot-stage .burst {
  position: absolute;
  top: 48%;
  left: 50%;
  display: block;
  padding: 0 2px;
  color: var(--burst-color, var(--blue));
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 6px rgba(255, 255, 255, 0.92);
  white-space: nowrap;
  transform: translate(-50%, -50%);
  will-change: transform, opacity;
}
