/* =============================================================================
   scene-04.css · 罚单与公章
   冷光深色桌面 / 公文体纸张特写 / 鲜红公章沉重下压（约 1.53s）
   红章为画面唯一高饱和色；纸面质感全部程序化（CSS + 内联 SVG），无外部图片。
   ========================================================================== */

/* ---------- 桌面 ---------- */
.s04-root {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 56% 42% at 49% 24%, rgba(100, 124, 140, 0.20) 0%, rgba(40, 54, 66, 0.10) 44%, rgba(0, 0, 0, 0) 72%),
    radial-gradient(ellipse 120% 96% at 50% 54%, #0c1218 0%, #070b10 48%, #030507 100%);
  isolation: isolate;
}

.s04-haze {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 44% 28% at 50% 4%, rgba(184, 208, 222, 0.10), rgba(0, 0, 0, 0) 72%),
    radial-gradient(ellipse 90% 58% at 50% 112%, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0) 70%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.24) 0%, rgba(0, 0, 0, 0) 26%, rgba(0, 0, 0, 0) 72%, rgba(0, 0, 0, 0.34) 100%);
}

/* 失焦的键盘（桌面语境，极低对比） */
.s04-root::after {
  content: '';
  position: absolute;
  left: 300px;
  bottom: -160px;
  width: 1320px;
  height: 330px;
  pointer-events: none;
  opacity: 0.5;
  transform: perspective(900px) rotateX(64deg);
  transform-origin: 50% 100%;
  background:
    repeating-linear-gradient(90deg, rgba(190, 214, 228, 0.055) 0 2px, rgba(0, 0, 0, 0) 2px 58px, rgba(190, 214, 228, 0.04) 58px 60px, rgba(0, 0, 0, 0) 60px 74px),
    repeating-linear-gradient(0deg, rgba(190, 214, 228, 0.05) 0 2px, rgba(0, 0, 0, 0) 2px 46px, rgba(190, 214, 228, 0.035) 46px 48px, rgba(0, 0, 0, 0) 48px 62px);
  filter: blur(7px);
  -webkit-mask-image: linear-gradient(0deg, rgba(0, 0, 0, 0.9) 6%, rgba(0, 0, 0, 0) 82%);
  mask-image: linear-gradient(0deg, rgba(0, 0, 0, 0.9) 6%, rgba(0, 0, 0, 0) 82%);
  mix-blend-mode: screen;
}

.s04-dust {
  position: absolute;
  left: 0;
  top: 0;
  width: 1920px;
  height: 1080px;
  pointer-events: none;
  opacity: 0.9;
}

/* ---------- 镜头 / 震屏 / 抛落 / 3D 纸面 ---------- */
.s04-shake {
  position: absolute;
  inset: 0;
  will-change: transform;
}
.s04-root.is-run .s04-shake {
  animation: s04-shake 380ms 1530ms cubic-bezier(0.3, 0.06, 0.3, 1) both;
}
@keyframes s04-shake {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  7% { transform: translate3d(-5px, 3px, 0) rotate(-0.1deg); }
  20% { transform: translate3d(4px, -3px, 0) rotate(0.075deg); }
  36% { transform: translate3d(-3px, 2px, 0) rotate(-0.055deg); }
  55% { transform: translate3d(2px, -1px, 0) rotate(0.03deg); }
  76% { transform: translate3d(-1px, 1px, 0) rotate(-0.015deg); }
}

.s04-cam {
  position: absolute;
  inset: 0;
  transform-origin: 53% 58%;
  will-change: transform;
}
.s04-root.is-run .s04-cam {
  animation: s04-push 60s linear both;
}
@keyframes s04-push {
  from { transform: scale(0.88); }
  to { transform: scale(1.055); }
}

.s04-drop {
  position: absolute;
  inset: 0;
  will-change: transform, opacity;
}
.s04-root.is-run .s04-drop {
  animation: s04-drop 880ms cubic-bezier(0.16, 0.84, 0.24, 1) both;
}
@keyframes s04-drop {
  0% { opacity: 0; transform: translate3d(120px, -220px, 0) rotate(5deg) scale(1.075); }
  46% { opacity: 1; transform: translate3d(-8px, 11px, 0) rotate(-0.7deg) scale(1.004); }
  68% { transform: translate3d(3px, -3px, 0) rotate(0.2deg) scale(1.0005); }
  84% { transform: translate3d(-1px, 1px, 0) rotate(-0.06deg); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
}

.s04-plane {
  position: absolute;
  inset: 0;
  transform: perspective(2500px) rotateX(5.2deg) rotateZ(-2deg);
  transform-origin: 51% 46%;
}

/* ---------- 纸张 ---------- */
.s04-paper {
  position: absolute;
  left: 244px;
  top: 56px;
  width: 1420px;
  height: 962px;
  background:
    linear-gradient(154deg, #fcf8f0 0%, #f5eee1 32%, #ece2d0 66%, #ddd2bd 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 0 0 1px rgba(255, 255, 255, 0.10),
    0 48px 82px -30px rgba(0, 0, 0, 0.94),
    0 12px 30px rgba(0, 0, 0, 0.58);
  isolation: isolate;
  overflow: hidden;
}

/* 纸纤维层（双层错位平铺，破掉重复感） */
.s04-tex {
  position: absolute;
  inset: 0;
  background-image: none;
  background-size: 512px 512px, 337px 337px;
  background-position: 0 0, 163px 91px;
  background-repeat: repeat, repeat;
  opacity: 0.75;
  pointer-events: none;
}

/* 受光：冷白顶光 + 暖纸反射 + 冷灰暗部（红章之外唯一色彩纪律） */
.s04-state {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 64% 50% at 34% 12%, rgba(226, 240, 250, 0.46) 0%, rgba(226, 240, 250, 0.10) 44%, rgba(255, 255, 255, 0) 68%),
    linear-gradient(214deg, rgba(212, 230, 244, 0.16) 0%, rgba(212, 230, 244, 0) 34%),
    radial-gradient(ellipse 70% 54% at 94% 106%, rgba(20, 32, 44, 0.22) 0%, rgba(20, 32, 44, 0.05) 52%, rgba(0, 0, 0, 0) 74%),
    radial-gradient(ellipse 46% 34% at 8% 96%, rgba(126, 92, 52, 0.10) 0%, rgba(126, 92, 52, 0) 70%),
    linear-gradient(176deg, rgba(255, 252, 244, 0.14) 0%, rgba(255, 252, 244, 0) 30%, rgba(44, 38, 30, 0.10) 100%);
}

/* 折痕（纸张被折叠后摔出） */
.s04-crease {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.s04-crease-a {
  background: linear-gradient(101deg,
    rgba(0, 0, 0, 0) 41%,
    rgba(84, 66, 42, 0.05) 48.6%,
    rgba(255, 255, 255, 0.30) 49.7%,
    rgba(84, 66, 42, 0.045) 50.7%,
    rgba(0, 0, 0, 0) 57%);
  mix-blend-mode: soft-light;
}
.s04-crease-b {
  background: linear-gradient(180deg,
    rgba(0, 0, 0, 0) 43%,
    rgba(90, 72, 46, 0.045) 47.4%,
    rgba(255, 255, 255, 0.22) 48.4%,
    rgba(90, 72, 46, 0.04) 49.5%,
    rgba(0, 0, 0, 0) 54%);
  mix-blend-mode: soft-light;
}

/* 咖啡渍 / 指纹（低饱和暖褐，不与红章争夺视线） */
.s04-stain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 94% 6%, rgba(120, 84, 44, 0.11) 0%, rgba(120, 84, 44, 0.05) 31%, rgba(120, 84, 44, 0.0) 33%, rgba(120, 84, 44, 0.055) 36%, rgba(120, 84, 44, 0) 39%),
    radial-gradient(ellipse 46px 60px at 7% 90%, rgba(112, 92, 66, 0.05), rgba(0, 0, 0, 0) 72%),
    radial-gradient(ellipse 32px 44px at 11% 86%, rgba(112, 92, 66, 0.045), rgba(0, 0, 0, 0) 70%);
}

/* 纸面缓慢扫光 */
.s04-sweep {
  position: absolute;
  top: -120px;
  left: -500px;
  width: 2500px;
  height: 1240px;
  pointer-events: none;
  background: linear-gradient(112deg,
    rgba(255, 255, 255, 0) 36%,
    rgba(255, 255, 255, 0.14) 47%,
    rgba(255, 251, 240, 0.22) 51%,
    rgba(255, 255, 255, 0.045) 56%,
    rgba(255, 255, 255, 0) 64%);
  mix-blend-mode: soft-light;
  will-change: transform;
  opacity: 0.75;
}
.s04-root.is-run .s04-sweep {
  animation: s04-sweep 19s 1.6s ease-in-out infinite;
}
@keyframes s04-sweep {
  0% { transform: translate3d(-420px, 0, 0); }
  55% { transform: translate3d(560px, 0, 0); }
  100% { transform: translate3d(-420px, 0, 0); }
}

/* ---------- 公文排版 ---------- */
.s04-doc {
  position: absolute;
  inset: 0;
  padding: 46px 78px 40px;
  color: #241f19;
  font-family: var(--font-serif);
  pointer-events: none;
}

.s04-org {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.15em;
  text-indent: 0.15em;
  text-align: center;
  color: #29231b;
}
.s04-orgrule {
  margin-top: 14px;
  height: 6px;
  border-top: 2px solid #3b3229;
  border-bottom: 1px solid #8b7b64;
  opacity: 0.82;
}
.s04-filebar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 19px;
  letter-spacing: 0.04em;
  color: #4c4134;
}
.s04-filetag {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 15px;
  letter-spacing: 0.38em;
  text-indent: 0.38em;
  color: #6b5d49;
  padding: 2px 0;
}
.s04-filenum {
  font-weight: 500;
}
.s04-title {
  margin-top: 22px;
  text-align: center;
  font-size: 64px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  color: #1d1913;
}
.s04-meta {
  margin-top: 14px;
  text-align: center;
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 18px;
  letter-spacing: 0.2em;
  color: #5e5444;
}

.s04-fields {
  margin-top: 34px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.s04-field {
  display: flex;
  align-items: baseline;
  gap: 20px;
}
.s04-lbl {
  flex: 0 0 144px;
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 20px;
  letter-spacing: 0.16em;
  color: #6d604b;
}
.s04-val {
  font-size: 25px;
  letter-spacing: 0.015em;
  color: #1f1a14;
}

.s04-fact {
  margin: 22px 0 0;
  font-size: 23px;
  line-height: 1.96;
  letter-spacing: 0.015em;
  text-align: justify;
  text-indent: 2em;
  color: #2c261e;
}
.s04-fact b {
  font-weight: 600;
}

.s04-penalty {
  margin-top: 24px;
  padding: 17px 4px 18px;
  border-top: 1px solid rgba(70, 58, 42, 0.42);
  border-bottom: 1px solid rgba(70, 58, 42, 0.42);
  display: flex;
  align-items: baseline;
  gap: 26px;
}
.s04-penalty-lbl {
  flex: 0 0 auto;
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 20px;
  letter-spacing: 0.3em;
  color: #6d604b;
}
.s04-penalty-txt {
  font-size: 28px;
  letter-spacing: 0.03em;
  color: #1b1812;
}
.s04-penalty-txt em {
  font-style: normal;
  font-weight: 600;
  font-size: 50px;
  letter-spacing: 0.01em;
  padding: 0 2px;
}

.s04-note {
  margin-top: 18px;
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 18px;
  line-height: 1.8;
  letter-spacing: 0.03em;
  color: #5e5342;
}

.s04-sign {
  position: absolute;
  right: 82px;
  bottom: 190px;
  text-align: right;
  color: #241f19;
}
.s04-sign-org {
  font-size: 24px;
  letter-spacing: 0.05em;
}
.s04-sign-date {
  margin-top: 12px;
  font-size: 24px;
  letter-spacing: 0.1em;
}
.s04-cc {
  position: absolute;
  left: 78px;
  bottom: 38px;
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 16px;
  letter-spacing: 0.12em;
  color: #6b5e4b;
}

/* ---------- 公章座 ---------- */
.s04-stamp-seat {
  position: absolute;
  left: 1018px;
  top: 583px;
  width: 300px;
  height: 300px;
  transform: rotate(-9.5deg);
  transform-origin: 50% 50%;
  pointer-events: none;
}
.s04-stamp-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.s04-stamp-txt {
  font-family: var(--font-serif);
  font-weight: 600;
}

/* 纸面凹陷阴影 */
.s04-dent {
  position: absolute;
  inset: -34px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%,
    rgba(22, 14, 8, 0) 42%,
    rgba(22, 14, 8, 0.09) 60%,
    rgba(22, 14, 8, 0) 74%);
  opacity: 0;
}
.s04-root.is-run .s04-dent {
  animation: s04-dent 900ms 1534ms ease-out both;
}
@keyframes s04-dent {
  0% { opacity: 0; transform: scale(1.16); }
  22% { opacity: 1; transform: scale(1); }
  100% { opacity: 0.6; transform: scale(1); }
}

/* 冲击闪光（纸面反光） */
.s04-impactflash {
  position: absolute;
  inset: -120px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 246, 232, 0.5) 0%, rgba(255, 240, 220, 0.12) 44%, rgba(255, 255, 255, 0) 68%);
  mix-blend-mode: screen;
  opacity: 0;
}
.s04-root.is-run .s04-impactflash {
  animation: s04-iflash 220ms 1528ms ease-out both;
}
@keyframes s04-iflash {
  0% { opacity: 0; }
  18% { opacity: 1; }
  100% { opacity: 0; }
}

/* 朱印本体 */
.s04-stamp-imp {
  position: absolute;
  inset: 0;
  opacity: 0;
  mix-blend-mode: multiply;
  transform-origin: 50% 50%;
  will-change: transform, opacity;
}
.s04-root.is-run .s04-stamp-imp {
  animation: s04-imp 1200ms 1536ms linear both;
}
@keyframes s04-imp {
  0% { opacity: 0; transform: scale(1.075); }
  4% { opacity: 0.97; transform: scale(1.05); }
  12% { opacity: 0.91; transform: scale(1.004); }
  22% { opacity: 0.89; transform: scale(1); }
  100% { opacity: 0.89; transform: scale(1); }
}

/* 下压中的实体公章 */
.s04-stamp-live {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform-origin: 50% 50%;
  filter: drop-shadow(0 16px 26px rgba(0, 0, 0, 0.6));
  will-change: transform, opacity;
}
.s04-root.is-run .s04-stamp-live {
  animation: s04-stampfall 470ms 1376ms linear both;
}
@keyframes s04-stampfall {
  0% { opacity: 0; transform: translate3d(0, -350px, 0) scale(1.44); }
  8% { opacity: 1; transform: translate3d(0, -338px, 0) scale(1.42); }
  34% { opacity: 1; transform: translate3d(0, 0, 0) scale(1.02); }
  38% { opacity: 1; transform: translate3d(0, 2px, 0) scale(1.0); }
  50% { opacity: 1; transform: translate3d(0, 0, 0) scale(1.0); }
  72% { opacity: 0; transform: translate3d(0, -6px, 0) scale(1.035); }
  100% { opacity: 0; transform: translate3d(0, -10px, 0) scale(1.04); }
}

/* 涟漪 */
.s04-ripple {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 560px;
  height: 560px;
  margin: -280px 0 0 -280px;
  border-radius: 50%;
  border: 2px solid rgba(158, 38, 28, 0.55);
  opacity: 0;
}
.s04-root.is-run .s04-ripple-a {
  animation: s04-ripple 560ms 1534ms cubic-bezier(0.16, 0.84, 0.28, 1) both;
}
.s04-root.is-run .s04-ripple-b {
  animation: s04-ripple 720ms 1564ms cubic-bezier(0.16, 0.84, 0.28, 1) both;
}
@keyframes s04-ripple {
  0% { opacity: 0; transform: scale(0.56); }
  18% { opacity: 0.5; }
  100% { opacity: 0; transform: scale(1.28); }
}

/* 墨点飞溅 */
.s04-specks {
  position: absolute;
  inset: 0;
  opacity: 0;
}
.s04-root.is-run .s04-specks {
  animation: s04-specksin 140ms 1546ms linear both;
}
@keyframes s04-specksin {
  from { opacity: 0; }
  to { opacity: 1; }
}
.s04-speck {
  position: absolute;
  display: block;
  background: #8d2a21;
  border-radius: 50%;
  transform-origin: 50% 50%;
}
