@font-face {
  font-family: "DM Sans Game";
  src: url("assets/DMSans-VariableFont_opsz-wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "STIXGeneral";
  src: url("assets/STIXGeneralBol.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: block;
}

:root {
  --ink: #23242d;
  --panel: #f8f8f9;
  --panel-line: #d4d4d8;
  --tray: #eef0f5;
  --tray-line: #c4c9d6;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #fff;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  user-select: none;
}

button {
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.stage {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 1920px;
  height: 1080px;
  transform: translate(-50%, -50%) scale(var(--game-scale, 1));
  transform-origin: center;
  display: grid;
  grid-template-columns: 960px 960px;
  background: #fbfbfc;
  border-radius: 50px;
  overflow: hidden;
}

.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1000;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(to right, #fff 0, rgba(255, 255, 255, 0) 20px) left center / 20px 100% no-repeat,
    linear-gradient(to left, #fff 0, rgba(255, 255, 255, 0) 20px) right center / 20px 100% no-repeat,
    linear-gradient(to bottom, #fff 0, rgba(255, 255, 255, 0) 20px) center top / 100% 20px no-repeat,
    linear-gradient(to top, #fff 0, rgba(255, 255, 255, 0) 20px) center bottom / 100% 20px no-repeat;
}

.game {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 1920px;
  height: 1080px;
  transform: translate(-50%, -50%) scale(var(--game-scale, 1));
  transform-origin: center;
  display: grid;
  grid-template-columns: 960px 960px;
  background: #fbfbfc;
  border-radius: 50px;
  overflow: hidden;
}

.game::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1000;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(to right, #fff 0, rgba(255, 255, 255, 0) 20px) left center / 20px 100% no-repeat,
    linear-gradient(to left, #fff 0, rgba(255, 255, 255, 0) 20px) right center / 20px 100% no-repeat,
    linear-gradient(to bottom, #fff 0, rgba(255, 255, 255, 0) 20px) center top / 100% 20px no-repeat,
    linear-gradient(to top, #fff 0, rgba(255, 255, 255, 0) 20px) center bottom / 100% 20px no-repeat;
}

.room-pane,
.inspect-pane {
  position: relative;
  min-width: 0;
  overflow: hidden;
}

.room-pane {
  border-right: 2px solid var(--panel-line);
  background: #f8f7f4;
}

.room-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;
}

.room-world {
  position: absolute;
  left: 0;
  top: 0;
  width: 1922px;
  height: 1081px;
  will-change: transform;
}

.room-background {
  position: absolute;
  inset: 0;
  width: 1922px;
  height: 1081px;
  object-fit: fill;
  pointer-events: none;
}

.object-layer {
  position: absolute;
  inset: 0;
}

.game-object {
  position: absolute;
  background: transparent;
  transition: none;
}

.game-object[data-object-id="pillow"] {
  transition: top 350ms cubic-bezier(0.16, 1, 0.3, 1);
}

.game-object img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.game-object:hover,
.game-object:focus-visible {
  filter: none;
  outline: none;
}

.game-object:active {
  transform: none;
}

.clock-display {
  position: absolute;
  left: 255px;
  top: 416px;
  z-index: 20;
  width: 124px;
  height: 66px;
  color: #000;
  font-family: "DM Sans Game", "DM Sans", Arial, Helvetica, sans-serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  font-optical-sizing: none;
  font-synthesis: none;
  pointer-events: none;
}

.clock-number {
  position: absolute;
  top: 0;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clock-number {
  width: 56px;
}

.clock-number:first-child {
  left: 7px;
}

.clock-number:last-child {
  left: 61px;
}

.cabinet-item {
  position: absolute;
  user-select: none;
  -webkit-user-drag: none;
  transition: opacity 500ms ease;
}

.cabinet-photo {
  left: 410px;
  top: 556px;
  width: 46px;
  height: 55px;
  z-index: 5;
  cursor: pointer;
}

.cabinet-camera {
  left: 298px;
  top: 669px;
  width: 113px;
  height: 65px;
  z-index: 5;
  cursor: pointer;
}

.calendar-photo {
  position: absolute;
  left: 518px;
  top: 230px;
  width: 76px;
  height: 48px;
  z-index: 2;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  transition: opacity 600ms ease;
}

.calendar-photo.hidden {
  opacity: 0;
  pointer-events: none;
}

.left-lamp-glow {
  position: absolute;
  left: 398px;
  top: 335px;
  z-index: 21;
  width: 137px;
  height: 97px;
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.game.lamp-on .left-lamp-glow,
.left-lamp-glow.lamp-on {
  opacity: 1;
}

.photo-fragment {
  position: absolute;
  user-select: none;
  -webkit-user-drag: none;
}

.left-photo-fragment-1 {
  left: 454px;
  top: 386px;
  width: 34px;
  height: 31px;
  z-index: 22;
  cursor: pointer;
  pointer-events: auto;
}

.lamp-photo-fragment-1 {
  left: 612px;
  top: 268px;
  width: 112px;
  height: 92px;
  z-index: 8;
  opacity: 0;
  cursor: pointer;
  pointer-events: none;
  transition: opacity 300ms ease;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.12));
  object-fit: contain;
}

.lamp-photo-fragment-1.visible {
  opacity: 0.96;
}

.left-photo-fragment-2 {
  left: 820px;
  top: 608px;
  width: 34px;
  height: 43px;
  z-index: 4;
  cursor: pointer;
  pointer-events: auto;
}

.left-bulb {
  position: absolute;
  left: 902px;
  top: 760px;
  width: 118px;
  height: 108px;
  z-index: 12;
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform, opacity;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.12));
}

.left-bulb.dropping {
  pointer-events: none;
  cursor: default;
}

.inspect-pane {
  display: block;
  background: var(--panel);
}

.inspect-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}

.inspect-stage {
  position: absolute;
  left: 0;
  top: 0;
  width: 960px;
  height: 1080px;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
  z-index: 1;
}

.closeup {
  width: min(720px, 100%);
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-items: center;
  justify-content: center;
}

.closeup-pop {
  animation: closeupIn 750ms cubic-bezier(0.19, 1, 0.22, 1) both;
  transform-origin: center;
}

.closeup-art {
  position: relative;
  width: 620px;
  height: 360px;
  display: grid;
  place-items: center;
}

.closeup-art img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.cabinet-closeup {
  position: absolute;
  left: 0;
  top: 0;
  width: 960px;
  height: 1080px;
}

.cabinet-closeup img {
  position: absolute;
  display: block;
  user-select: none;
  pointer-events: none;
  -webkit-user-drag: none;
}

.cabinet-closeup-base {
  left: 66px;
  top: 539px;
  width: 843px;
  height: 906px;
  z-index: 1;
}

.cabinet-closeup-clock {
  left: 156px;
  top: 378px;
  width: 316px;
  height: 162px;
  z-index: 2;
}

.cabinet-closeup-clock-time {
  position: absolute;
  left: 183px;
  top: 406px;
  z-index: 3;
  width: 262px;
  height: 104px;
  color: #000;
  font-family: "DM Sans Game", "DM Sans", Arial, Helvetica, sans-serif;
  font-size: 80px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  font-optical-sizing: none;
  font-synthesis: none;
  pointer-events: none;
}

.cabinet-closeup-clock-number {
  position: absolute;
  top: 0;
  height: 104px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cabinet-closeup-clock-number {
  width: 122px;
}

.cabinet-closeup-clock-number:first-child {
  left: 0;
}

.cabinet-closeup-clock-number:last-child {
  left: 140px;
}

.cabinet-closeup-clock-button {
  left: 394px;
  top: 363px;
  width: 49px;
  height: 17px;
  z-index: 3;
  cursor: pointer;
  pointer-events: auto !important;
  touch-action: none;
  transform: translateX(var(--clock-button-x, 0px)) scaleY(1);
  transform-origin: center bottom;
  will-change: transform;
}

.cabinet-closeup-clock-button.clock-button-pressed {
  transition: transform 120ms cubic-bezier(0.2, 0, 0.18, 1);
  transform: translateX(var(--clock-button-x, 0px)) scaleY(0.62);
}

.cabinet-closeup-clock-button.clock-button-rebound {
  animation: clockButtonRebound 360ms cubic-bezier(0.22, 1.25, 0.32, 1) both;
}

.cabinet-closeup-lamp {
  left: 589px;
  top: 208px;
  width: 227px;
  height: 332px;
  z-index: 4;
}

.cabinet-closeup-lamp-pull {
  left: 762px;
  top: 318px;
  width: 13px;
  height: 90px;
  z-index: 3;
  cursor: pointer;
  pointer-events: auto !important;
  touch-action: none;
  transform: translateY(0);
  transform-origin: top center;
  will-change: transform;
}

.cabinet-closeup-lamp-pull.pull-pressing {
  animation: lampPullPress 180ms cubic-bezier(0.2, 0, 0.18, 1) both;
}

.cabinet-closeup-lamp-pull.pull-dragging {
  animation: none;
}

.cabinet-closeup-lamp-pull.pull-rebound {
  animation: lampPullRebound 0.72s cubic-bezier(0.22, 1.35, 0.34, 1) both;
}

.cabinet-closeup-lamp-glow {
  left: 545px;
  top: 172px;
  width: 316px;
  height: 211px;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.cabinet-closeup.lamp-on .cabinet-closeup-lamp-glow {
  opacity: 1;
}

.calendar-closeup {
  position: absolute;
  left: 0;
  top: 0;
  width: 960px;
  height: 1080px;
}

.calendar-closeup img {
  position: absolute;
  display: block;
  user-select: none;
  pointer-events: none;
  -webkit-user-drag: none;
}

.calendar-closeup-base {
  left: 144px;
  top: 100px;
  width: 672px;
  height: 688px;
  z-index: 2;
}

.calendar-closeup-photo {
  left: 100px;
  top: 590px;
  width: 310px;
  height: 195px;
  z-index: 1;
  transform: rotate(-5deg);
}

.calendar-closeup-sticky {
  width: 189px;
  height: 208px;
  z-index: 3;
  touch-action: none;
}

.calendar-swing-group {
  position: absolute;
  left: 144px;
  top: 100px;
  width: 672px;
  height: 688px;
  z-index: 2;
  transform-origin: 50% 0%;
  will-change: transform;
  cursor: default;
  touch-action: none;
}

.calendar-swing-group.swing-enabled {
  cursor: grab;
}

.calendar-swing-group.swing-enabled:active {
  cursor: grabbing;
}

.calendar-swing-group .calendar-closeup-base {
  left: 0;
  top: 0;
}

.calendar-corner-handle {
  position: absolute;
  bottom: 0;
  width: 180px;
  height: 180px;
  z-index: 6;
  cursor: grab;
  touch-action: none;
  background: transparent;
  pointer-events: none;
}

.calendar-corner-handle.enabled {
  pointer-events: auto;
  /* 调试用启用态可视，验证后可移除 outline */
  outline: 1px dashed rgba(220, 40, 80, 0.18);
}

.calendar-corner-handle:active {
  cursor: grabbing;
}

.calendar-corner-left {
  left: 0;
}

.calendar-corner-right {
  right: 0;
}

.calendar-scissors {
  position: absolute;
  left: 310px;
  top: 380px;
  width: 300px;
  height: 100px;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-20px) rotate(-8deg);
  will-change: transform, opacity;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.12));
}

.calendar-scissors.visible {
  opacity: 1;
}

/* 摆动后从台历背后顶部露出尖尖 */
.calendar-scissors.peeking {
  opacity: 1;
  transform: translateY(-322px) rotate(-10deg);
  transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1), opacity 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.calendar-scissors.collectable {
  pointer-events: auto;
  cursor: pointer;
}

@keyframes calendarSwingBack {
  0% { transform: rotate(var(--swing-angle, 0deg)); }
  100% { transform: rotate(0deg); }
}

.collect-fadeout {
  animation: collectFadeOut 500ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: none;
}

.left-bulb.collect-fadeout {
  animation: bulbCollectOut 560ms cubic-bezier(0.55, 0, 1, 0.45) forwards;
}

@keyframes bulbCollectOut {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-50%);
  }
}

.collect-large {
  position: absolute;
  left: 50%;
  top: 30%;
  max-width: 765px;
  max-height: 460px;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  z-index: 100;
  opacity: 0;
  filter: blur(15px);
  pointer-events: none;
  object-fit: contain;
}

.collect-large.collect-entrance {
  animation: collectEntrance 950ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.collect-large.inventory-preview-large {
  opacity: 1;
  filter: blur(0);
  pointer-events: none;
}

.inventory-preview-fly {
  position: absolute;
  z-index: 120;
  object-fit: contain;
  pointer-events: auto;
  cursor: pointer;
  transform: none;
  will-change: left, top, width, height, opacity, filter;
}

.collect-large.inventory-preview-in {
  animation: inventoryPreviewIn 650ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.collect-large.inventory-preview-out {
  animation: inventoryPreviewOut 420ms cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

.collect-large.collect-to-toolbar {
  animation: collectToToolbar 700ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.collect-dim {
  animation: collectDim 950ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.collect-undim {
  animation: collectUndim 400ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes collectFadeOut {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-70%);
  }
}

@keyframes collectEntrance {
  0% {
    opacity: 0;
    filter: blur(15px);
    top: 30%;
  }
  100% {
    opacity: 1;
    filter: blur(0);
    top: 50%;
  }
}

@keyframes inventoryPreviewIn {
  0% {
    opacity: 0;
    filter: blur(15px);
    top: 30%;
    transform: translate(-50%, -50%) scale(0.88);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    top: 50%;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes inventoryPreviewOut {
  0% {
    opacity: 1;
    filter: blur(0);
    top: 50%;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    filter: blur(15px);
    top: 30%;
    transform: translate(-50%, -50%) scale(0.88);
  }
}

@keyframes collectDim {
  0% {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
  }
  100% {
    opacity: 0.2;
    filter: blur(15px);
    transform: scale(0.9);
  }
}

@keyframes collectUndim {
  0% {
    opacity: 0.2;
    filter: blur(15px);
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
  }
}

@keyframes collectToToolbar {
  0% {
    opacity: 1;
    filter: blur(0);
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translate(-50%, -50%) var(--collect-to-toolbar-transform);
  }
}

@keyframes closeupIn {
  from {
    opacity: 0;
    filter: blur(15px);
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
  }
}

@keyframes lampPullRebound {
  0% {
    transform: translateY(var(--pull-distance, 30%));
  }

  48% {
    transform: translateY(-10px);
  }

  68% {
    transform: translateY(5px);
  }

  84% {
    transform: translateY(-2px);
  }

  100% {
    transform: translateY(0);
  }
}

@keyframes lampPullPress {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(var(--pull-distance, 30%));
  }
}

@keyframes clockButtonRebound {
  from {
    transform: translateX(var(--clock-button-x, 0px)) scaleY(0.62);
  }

  70% {
    transform: translateX(0) scaleY(1.08);
  }

  to {
    transform: translateX(0) scaleY(1);
  }
}

.tool-tray {
  position: absolute;
  left: 2px;
  bottom: 62px;
  width: 956px;
  height: 144px;
  isolation: isolate;
  z-index: 50;
}

.toolbar-bg,
.toolbar-fg,
.toolbar-blur {
  position: absolute;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.toolbar-bg {
  left: 35px;
  bottom: 0;
  width: 886px;
  height: 113px;
  z-index: 1;
}

.toolbar-fg {
  left: 35px;
  bottom: 0;
  width: 886px;
  height: 71px;
  z-index: 4;
}

.toolbar-blur {
  left: 35px;
  bottom: 0;
  width: 886px;
  height: 71px;
  z-index: 3;
  background: rgba(255, 255, 255, 0.01);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 36px;
}

.inventory {
  position: absolute;
  left: 53px;
  bottom: 20px;
  width: 850px;
  height: 132px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 8px 8px;
  background: transparent;
  z-index: 2;
  overflow: visible;
}

.inventory.inventory-overlap .inventory-item {
  flex-shrink: 0;
}

.inventory-item {
  overflow: visible;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
}

.inventory-item img {
  display: block;
  width: auto;
  height: 100%;
  max-width: 180px;
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.inventory::before {
  content: "";
}

.inventory-empty {
  color: #8a8e9e;
  font-size: 20px;
}

.inventory-item {
  position: relative;
  min-width: 116px;
  height: 58px;
  padding: 0 20px;
  border-radius: 7px;
  background: #fff8dd;
  color: #7a5600;
  border: 3px solid #e7c85f;
  font-size: 22px;
  font-weight: 800;
  transform-origin: bottom center;
  transition: transform 360ms cubic-bezier(0.16, 1, 0.3, 1);
}

.inventory-item:has(img) {
  min-width: auto;
  width: auto;
  height: 108px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
  flex-shrink: 0;
  box-shadow: none;
}

.inventory-item.selected {
  z-index: 4;
}

.inventory-item.inventory-bounce {
  animation: inventoryClickBounce 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

.inventory-drag-ghost {
  position: fixed;
  z-index: 1000;
  object-fit: contain;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(1.05);
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.24));
}

.inventory-item.inventory-dragging {
  cursor: grabbing;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.24));
}

.inventory-drag-placeholder {
  display: block;
  flex-shrink: 0;
}

.inventory-item.inventory-drag-consumed {
  animation: inventoryDragConsumed 280ms cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

@keyframes inventoryDragConsumed {
  to {
    opacity: 0;
    filter: blur(10px);
    transform: scale(0.72);
  }
}

@keyframes inventoryClickBounce {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}

.toast {
  animation: pulse 0.35s ease;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
  100% {
    transform: scale(1);
  }
}

.left-stage {
  position: relative;
  width: 960px;
  height: 1080px;
  overflow: hidden;
  margin-right: -12px;
}

.left-track {
  display: flex;
  width: 1920px;
  height: 1080px;
  will-change: transform;
}

.left-track .room-pane {
  width: 960px;
  flex-shrink: 0;
  border-right: none;
}

.stage.entering .left-track {
  animation: leftTrackSlide 1.85s cubic-bezier(0.62, 0, 0.15, 1) forwards;
}

.stage.entering .welcome-right {
  animation: welcomeRightFade 0.45s ease forwards;
}

@keyframes leftTrackSlide {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-960px);
  }
}

@keyframes welcomeRightFade {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.welcome-left {
  position: relative;
  width: 984px;
  height: 1080px;
  flex-shrink: 0;
  overflow: hidden;
  background: #fff;
  margin-right: -24px;
}

.welcome-left-bg {
  position: absolute;
  left: 0;
  top: 0;
  width: 984px;
  height: 1080px;
  object-fit: fill;
  pointer-events: none;
}

.welcome-title-img {
  position: absolute;
  left: 57px;
  top: 78px;
  width: 502px;
  height: 430px;
  pointer-events: none;
  z-index: 2;
}

.curtain-clip-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 8;
}

.curtain-clip-layer .curtain-clip-frame {
  position: absolute;
  left: 1388px;
  top: 522px;
  width: 11px;
  height: 11px;
}

.curtain-clip-layer .curtain-clip-string {
  position: absolute;
  left: 1394px;
  top: 533px;
  width: 34px;
  height: 19px;
}

.curtain-clip-layer .curtain-clip-curtain {
  position: absolute;
  left: 1426px;
  top: 546px;
  width: 14px;
  height: 10px;
}

.right-stage {
  position: relative;
  width: 961px;
  height: 1080px;
  overflow: hidden;
  margin-left: -1px;
}

.right-stage .inspect-pane {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.welcome-right {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: #f5f5f5;
  display: flex;
  flex-direction: column;
  padding: 120px 90px 90px 90px;
  box-sizing: border-box;
}

.stage.entering .welcome-right {
  pointer-events: none;
}

.stage.entered .welcome-right {
  display: none;
}

.welcome-prompt {
  font-family: "STIX Two Text", "STIXGeneral", Georgia, serif;
  font-weight: 700;
  font-size: 60px;
  line-height: 55px;
  letter-spacing: -0.5px;
  color: #3a3a3a;
  margin: 0;
}

.game-hint {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: transparent;
  display: flex;
  flex-direction: column;
  padding: 120px 90px 90px 90px;
  box-sizing: border-box;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  filter: blur(15px);
  transition:
    opacity 500ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 500ms cubic-bezier(0.16, 1, 0.3, 1),
    visibility 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

.game-hint.visible {
  opacity: 1;
  visibility: visible;
  filter: blur(0);
}

.game-hint-text {
  font-family: "STIX Two Text", "STIXGeneral", Georgia, serif;
  font-weight: 700;
  font-size: 60px;
  line-height: 55px;
  letter-spacing: -0.5px;
  color: #3a3a3a;
  margin: 0;
  white-space: pre-line;
}

.game-hint-text.hint-refresh {
  animation: hintTextRefresh 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes hintTextRefresh {
  0% {
    opacity: 0;
    filter: blur(15px);
  }
  100% {
    opacity: 1;
    filter: blur(0);
  }
}

.welcome-options {
  display: flex;
  gap: 88px;
  margin-top: 210px;
  align-items: center;
  position: relative;
}

.welcome-option {
  width: 116px;
  height: 116px;
  border-radius: 50%;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.18s;
}

.welcome-option img {
  display: block;
  width: 116px;
  height: 116px;
  pointer-events: none;
}

.welcome-option:hover {
  opacity: 0.85;
}

.welcome-option.selected {
  opacity: 1;
}

.welcome-options.pass-mode .welcome-option {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-70px);
  transition:
    opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.welcome-pass {
  position: absolute;
  left: 0;
  top: 0;
  width: 524px;
  height: 116px;
  opacity: 0;
  transform: translateX(90px);
  pointer-events: none;
  transition:
    opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.welcome-options.pass-mode .welcome-pass {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.pass-input {
  width: 100%;
  height: 100%;
  border-radius: 58px;
  border: 2px solid #cfcfcf;
  background: transparent;
  padding: 0 32px;
  font-family: "STIX Two Text", "STIXGeneral", Georgia, serif;
  font-weight: 700;
  font-size: 34px;
  letter-spacing: 8px;
  text-align: left;
  color: #3a3a3a;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.18s;
}

.pass-input:focus {
  border-color: #9a9a9a;
}

.welcome-pass.correct .pass-input {
  border-color: #4a9e62;
}

.welcome-pass.error {
  animation: passShake 0.4s;
}

.welcome-pass.error .pass-input {
  border-color: #c15050;
}

@keyframes passShake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-8px);
  }
  40% {
    transform: translateX(8px);
  }
  60% {
    transform: translateX(-6px);
  }
  80% {
    transform: translateX(6px);
  }
}

.welcome-arrow {
  position: absolute;
  left: 90px;
  bottom: 88px;
  width: 188px;
  height: 40px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  opacity: 0.35;
  transition: opacity 0.2s;
}

.welcome-arrow img {
  display: block;
  width: 188px;
  height: 40px;
  pointer-events: none;
}

.welcome-arrow.active {
  opacity: 1;
}

.welcome-arrow.active:hover {
  opacity: 0.85;
}

.tree-closeup {
  position: absolute;
  left: 0;
  top: 0;
  width: 960px;
  height: 1080px;
  overflow: hidden;
  background: #f7f7f7;
}

.tree-closeup-background {
  position: absolute;
  left: 0;
  top: 0;
  width: 961px;
  height: 1081px;
  pointer-events: none;
}

.tree-closeup-key {
  position: absolute;
  left: 386px;
  top: 374px;
  width: 154px;
  height: 57px;
  z-index: 1;
  opacity: 1;
  pointer-events: none;
  transition: opacity 500ms ease;
}

.tree-closeup-key.collectable {
  cursor: pointer;
  pointer-events: auto;
}

.tree-closeup-key.hidden {
  display: none;
}

.computer-closeup {
  position: absolute;
  left: 0;
  top: 0;
  width: 960px;
  height: 1080px;
  overflow: hidden;
}

.computer-closeup-base {
  position: absolute;
  left: 51px;
  top: 264px;
  width: 859px;
  height: 562px;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.computer-closeup-screen {
  position: absolute;
  left: 111px;
  top: 281px;
  width: 741px;
  height: 439px;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
  z-index: 1;
}

.computer-closeup-screen::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 4px;
  z-index: 7;
  background: #79b6ec;
  pointer-events: none;
}

.computer-desktop,
.computer-lockscreen {
  position: absolute;
  inset: 0;
}

.computer-desktop {
  opacity: 0;
  visibility: hidden;
  filter: blur(10px);
  transition:
    opacity 520ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 520ms cubic-bezier(0.16, 1, 0.3, 1),
    visibility 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

.computer-desktop.visible {
  opacity: 1;
  visibility: visible;
  filter: blur(0);
}

.computer-lockscreen {
  z-index: 20;
  display: grid;
  background: url("assets/computer-wallpaper.png") 0 0 / 741px 439px no-repeat;
  grid-template-columns: repeat(3, 67px);
  grid-template-rows: repeat(2, 67px);
  gap: 74px 96px;
  place-content: center;
  padding-top: 28px;
  box-sizing: border-box;
  transition:
    opacity 520ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 520ms cubic-bezier(0.16, 1, 0.3, 1),
    visibility 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

.computer-lockscreen.unlocking {
  opacity: 0;
  visibility: hidden;
  filter: blur(16px);
}

.computer-lockscreen.hidden {
  display: none;
}

.computer-lock-button {
  width: 67px;
  height: 67px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  opacity: 1;
  transition: opacity 240ms cubic-bezier(0.16, 1, 0.3, 1);
}

.computer-lock-button.pressed {
  opacity: 0;
}

.computer-lock-button img {
  display: block;
  width: 67px;
  height: 67px;
  pointer-events: none;
}

.computer-lock-hint {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  width: 291px;
  height: 43px;
  pointer-events: none;
}

.computer-wallpaper {
  position: absolute;
  left: 0;
  top: 0;
  width: 741px;
  height: 439px;
  pointer-events: none;
}

.computer-top-button {
  position: absolute;
  top: 10px;
  z-index: 8;
  display: block;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.computer-top-button img {
  display: block;
  pointer-events: none;
}

.computer-main-button {
  left: 16px;
  top: 10px;
  width: 19px;
  height: 11px;
}

.computer-file-button {
  left: 48px;
  top: 8px;
  width: 32px;
  height: 17px;
}

.computer-main-button img {
  width: 19px;
  height: 11px;
}

.computer-file-button img {
  width: 32px;
  height: 17px;
}

.computer-menu-panel {
  position: absolute;
  z-index: 9;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition:
    opacity 140ms ease,
    transform 140ms ease,
    visibility 140ms ease;
}

.computer-menu-blur {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.computer-menu-panel img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.computer-menu-panel.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.computer-main-menu {
  left: 16px;
  top: 33px;
  width: 66px;
  height: 58px;
}

.computer-file-menu {
  left: 48px;
  top: 29px;
  width: 169px;
  height: 87px;
}

.computer-folder-icon {
  position: absolute;
  right: 30px;
  top: 40px;
  z-index: 5;
  width: 86px;
  height: 60px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.computer-folder-icon img {
  display: block;
  width: 86px;
  height: 60px;
  pointer-events: none;
}

.computer-trash-icon {
  position: absolute;
  right: 38px;
  bottom: 28px;
  z-index: 5;
  width: 63.5px;
  height: 77.5px;
  pointer-events: none;
  transform-origin: center bottom;
  transition: transform 240ms cubic-bezier(0.7, 0, 1, 0.5);
}

.computer-trash-icon.trash-active {
  transform: scale(1.5);
}

.computer-folder-window {
  position: absolute;
  left: 58px;
  top: 170px;
  z-index: 7;
  width: 363px;
  height: 241px;
  opacity: 0;
  visibility: hidden;
  cursor: grab;
  user-select: none;
  isolation: isolate;
  transition:
    opacity 160ms ease,
    visibility 160ms ease;
}

.computer-folder-window-blur {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 0;
}

.computer-folder-window-art {
  position: absolute;
  left: 0;
  top: 0;
  width: 363px;
  height: 241px;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  z-index: 1;
}

.computer-folder-window.visible {
  opacity: 1;
  visibility: visible;
}

.computer-folder-window.folder-shake {
  animation: folderWindowShake 360ms cubic-bezier(0.36, 0, 0.66, -0.56);
}

.computer-folder-window:active {
  cursor: grabbing;
}

.computer-folder-slots {
  position: absolute;
  left: 15px;
  top: 49px;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, 69px);
  gap: 18.5px;
}

.computer-folder-slot {
  width: 69px;
  height: 69px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border: 0;
  background: transparent;
  cursor: grab;
  box-sizing: border-box;
}

.computer-folder-slot img,
.computer-folder-drag-item img {
  display: block;
  width: 60px;
  height: 60px;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.computer-folder-slot.drag-source-hidden {
  opacity: 0;
}

.computer-folder-drag-item {
  position: fixed;
  z-index: 1000;
  padding: 4px;
  border: 0;
  background: transparent;
  pointer-events: none;
  box-sizing: border-box;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.22));
}

.computer-folder-drag-item.trash-consumed {
  animation: trashConsume 220ms cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

@keyframes folderWindowShake {
  0%, 100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-10px);
  }
  40% {
    transform: translateX(9px);
  }
  60% {
    transform: translateX(-6px);
  }
  80% {
    transform: translateX(4px);
  }
}

@keyframes trashConsume {
  to {
    opacity: 0;
    filter: blur(8px);
    transform: scale(0.42);
  }
}

.tree-closeup-tree {
  position: absolute;
  left: 306px;
  top: 108px;
  width: 373px;
  height: 441px;
  pointer-events: auto;
  transform: translateX(var(--tree-move, 0));
  transform-origin: center bottom;
  transition: transform 360ms cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
}

.tree-closeup-tree.tree-squash {
  animation: treeSquash 260ms cubic-bezier(0.25, 0, 0.3, 1) both;
}

.tree-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.tree-body {
  fill: #354f36;
  cursor: pointer;
}

.tree-nose {
  fill: #993957;
  pointer-events: none;
}

.tree-eye {
  fill: #fff;
  cursor: pointer;
}

.tree-pupil {
  fill: #4e4f56;
  pointer-events: none;
  transform-box: fill-box;
  transform-origin: center;
}

.tree-right-hit {
  fill: transparent;
  cursor: pointer;
}

@keyframes treeSquash {
  0% {
    transform: translateX(var(--tree-move, 0)) scaleY(1);
  }
  100% {
    transform: translateX(var(--tree-move, 0)) scaleY(0.9);
  }
}

.curtain-closeup {
  position: absolute;
  left: 0;
  top: 0;
  width: 960px;
  height: 1080px;
  background: #f6f6f6;
  overflow: hidden;
}

.curtain-closeup-window {
  position: absolute;
  left: 0;
  top: 0;
  width: 961px;
  height: 732px;
  pointer-events: none;
}

.curtain-sky-hit {
  position: absolute;
  z-index: 6;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: none;
}

.curtain-sky-hit.enabled {
  pointer-events: auto;
}

.curtain-sky-hit-left {
  left: 0;
  top: 86px;
  width: 127px;
  height: 430px;
}

.curtain-sky-hit-right {
  left: 151px;
  top: 86px;
  width: 375px;
  height: 430px;
}

.curtain-closeup-frame {
  position: absolute;
  left: 593px;
  top: 182px;
  width: 241px;
  height: 241px;
  pointer-events: none;
  z-index: 2;
}

.curtain-photo-frame-content {
  position: absolute;
  left: 611px;
  top: 281px;
  width: 203px;
  height: 123px;
  overflow: hidden;
  z-index: 3;
  pointer-events: none;
}

.curtain-frame-piece {
  position: absolute;
  top: 0;
  height: 123px;
  width: auto;
  object-fit: contain;
}

.curtain-frame-piece-1 {
  left: 0;
}

.curtain-frame-piece-2 {
  left: 58px;
}

.curtain-frame-piece-3 {
  left: 117px;
}

.curtain-photo-complete {
  display: block;
  width: 203px;
  height: 123px;
  object-fit: fill;
  pointer-events: auto;
  cursor: pointer;
}

.curtain-closeup-fishbowl-stone {
  position: absolute;
  left: 460px;
  top: 640px;
  width: 63px;
  height: 63px;
  z-index: 2;
  pointer-events: none;
}

.curtain-closeup-fishbowl-stone.enabled {
  z-index: 4;
  pointer-events: auto;
  cursor: pointer;
}

.curtain-closeup-fishbowl-stone.hidden {
  display: none;
}

.curtain-closeup-fishbowl-wrap {
  position: absolute;
  left: 330px;
  top: 585px;
  width: 175px;
  height: 121px;
  z-index: 3;
}

.curtain-closeup-fishbowl {
  position: absolute;
  left: 0;
  top: 0;
  width: 175px;
  height: 121px;
  pointer-events: none;
  z-index: 1;
}

.curtain-closeup-fish {
  position: absolute;
  left: 34px;
  top: 52px;
  width: 86px;
  height: 31px;
  cursor: pointer;
  pointer-events: auto;
  z-index: 2;
}

.curtain-closeup-fish.hidden {
  display: none;
}

.curtain-closeup-clip-frame {
  position: absolute;
  left: 218px;
  top: 707px;
  width: 18px;
  height: 18px;
  z-index: 6;
  pointer-events: none;
}

.curtain-closeup-clip-string {
  position: absolute;
  left: 228px;
  top: 715px;
  width: 56px;
  height: 33px;
  z-index: 4;
  pointer-events: none;
}

.curtain-mover {
  position: absolute;
  left: 280px;
  top: 0;
  width: 703px;
  height: 1028px;
  cursor: grab;
  touch-action: none;
  will-change: transform;
  transform-origin: right center;
  transform: scaleX(1);
  z-index: 10;
}

.curtain-closeup-curtain {
  position: absolute;
  left: 0;
  top: 0;
  width: 703px;
  height: 1028px;
  pointer-events: none;
}

.curtain-closeup-clip-curtain {
  position: absolute;
  left: 274px;
  top: 736px;
  width: 24px;
  height: 18px;
  pointer-events: none;
  z-index: 12;
}

.sunset-closeup {
  position: absolute;
  left: 0;
  top: 0;
  width: 962px;
  height: 1080px;
  overflow: hidden;
  background: #83b7e7;
}

.sunset-closeup.sunset-solved {
  animation: none;
  opacity: 1;
  filter: none;
  transform: none;
}

.sunset-bg-night {
  position: absolute;
  left: 0;
  top: 0;
  width: 962px;
  height: 1080px;
  object-fit: cover;
}

.sunset-bg-sunset {
  position: absolute;
  left: 0;
  top: 0;
  width: 962px;
  height: 1080px;
  object-fit: cover;
  opacity: 0;
}

.sunset-sun {
  position: absolute;
  left: 480px;
  top: 300px;
  width: 278px;
  height: 278px;
  opacity: 0;
  pointer-events: none;
}

.sunset-cloud-layer {
  position: absolute;
  cursor: grab;
  z-index: 10;
  touch-action: none;
}

.sunset-solved .sunset-cloud-layer {
  cursor: default;
  pointer-events: none;
}

.sunset-cloud {
  display: block;
  pointer-events: none;
  clip-path: inset(3px);
}

.sunset-cloud-1-drag {
  left: -200px;
  top: 0;
  width: 1025px;
  height: 535px;
}

.sunset-cloud-2-drag {
  left: -350px;
  top: 430px;
  width: 1312px;
  height: 575px;
}

.sunset-cloud-3-drag {
  left: -444px;
  top: 784px;
  width: 1406px;
  height: 296px;
}

.sunset-camera {
  position: absolute;
  left: 87px;
  top: 336px;
  z-index: 30;
  width: 788px;
  height: 447px;
  opacity: 0;
  visibility: hidden;
  cursor: pointer;
  transform: scale(0.92);
  transition:
    opacity 420ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 420ms cubic-bezier(0.16, 1, 0.3, 1),
    visibility 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.sunset-camera.visible {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.sunset-camera.film-loaded {
  filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.34));
}

.sunset-finished-photo {
  position: absolute;
  left: 270px;
  top: 746px;
  z-index: 31;
  width: 220px;
  height: auto;
  opacity: 0;
  visibility: hidden;
  cursor: pointer;
  transform: translateY(-42px);
  transition:
    opacity 520ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 520ms cubic-bezier(0.16, 1, 0.3, 1),
    visibility 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

.sunset-finished-photo.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(74px);
}

/* Test ending button */
.test-ending-btn {
  position: absolute;
  right: 40px;
  bottom: 40px;
  width: 80px;
  height: 36px;
  background: #3a3a3a;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: "DM Sans Game", "DM Sans", Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 101;
}

.test-ending-btn:hover {
  opacity: 0.8;
  transform: scale(1.05);
}

.test-ending-btn:active {
  transform: scale(0.95);
}

/* Ending scene */
.ending-scene {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 960px 960px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s;
}

.ending-scene.visible {
  opacity: 1;
  visibility: visible;
}

/* Left side */
.ending-left {
  position: relative;
  width: 960px;
  height: 1080px;
  overflow: hidden;
}

.ending-bg {
  position: absolute;
  left: 50%;
  top: 0;
  height: 100%;
  transform: translateX(-50%);
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.ending-photo {
  position: absolute;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* 左侧顶部居中的常驻白色提示词 */
.ending-title {
  position: absolute;
  left: 50%;
  top: 56px;
  width: 100%;
  max-width: 880px;
  transform: translateX(-50%);
  text-align: center;
  color: #fff;
  font-family: "STIXGeneral", Georgia, "Times New Roman", serif;
  font-size: 54px;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.025em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.18);
  white-space: pre-line;
  pointer-events: none;
  user-select: none;
  z-index: 2;
}

.ending-photo-1 {
  left: 70px;
  top: 240px;
  width: 250px;
  height: auto;
}

.ending-photo-2 {
  left: 100px;
  bottom: 140px;
  width: 220px;
  height: auto;
  z-index: 10;
}

.ending-photo-3 {
  right: 50px;
  top: 530px;
  width: 180px;
  height: auto;
}

.ending-person {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 606px;
  height: auto;
  transform: translateX(-50%);
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* 伤心状态遮罩（灰白半透明，盖住默认黑色人物/大脑/血管/机器，但不遮心脏和血泡） */
.ending-sad-mask {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 640px;
  height: auto;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  z-index: 9;
  transition: opacity 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.ending-sad-mask.show {
  opacity: 1;
}

/* 感化状态白色遮罩（盖住黑色人物，不遮大脑/血管/心脏/机器，带柔光） */
.ending-soft-mask {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 640px;
  height: auto;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1), filter 700ms cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0));
}

.ending-soft-mask.show {
  opacity: 1;
  filter:
    drop-shadow(0 0 26px rgba(255, 255, 255, 0.75)) drop-shadow(0 0 54px rgba(255, 255, 255, 0.4));
}

/* 照片3人物遮罩：进入大脑后显示，初始保持 10px 模糊 */
.ending-photo3-person {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 606px;
  height: auto;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  filter: blur(10px);
  transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

.ending-photo3-person.show {
  opacity: 1;
}

.ending-photo3-person.clear {
  filter: blur(0px);
}

.ending-person.reject-shake {
  animation: endingRejectShake 520ms cubic-bezier(0.36, 0.4, 0.3, 1) 2;
}

@keyframes endingRejectShake {
  0%, 100% { transform: translateX(-50%); }
  20% { transform: translateX(calc(-50% + 18px)); }
  40% { transform: translateX(calc(-50% - 18px)); }
  60% { transform: translateX(calc(-50% + 10px)); }
  80% { transform: translateX(calc(-50% - 10px)); }
}

/* 黑化眼睛（双小弧线） */
.ending-dark-eyes {
  position: absolute;
  left: calc(50% + 3px);
  top: 594px;
  width: 111px;
  height: auto;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  z-index: 14;
  transition: opacity 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

.ending-dark-eyes.show {
  opacity: 1;
}

/* 黑化眼泪（左/右红色竖条），用 clip 做从上往下擦除 */
.ending-dark-tear {
  position: absolute;
  top: 603px;
  width: auto;
  height: auto;
  opacity: 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  z-index: 13;
  clip-path: inset(0 0 100% 0);
}

.ending-dark-tear.reveal {
  opacity: 1;
  animation: tearReveal 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.ending-dark-tear-left {
  left: 437px;
  width: 9px;
  height: 54px;
}

.ending-dark-tear-right {
  left: 513px;
  width: 9px;
  height: 66px;
}

@keyframes tearReveal {
  0% {
    clip-path: inset(0 0 100% 0);
    opacity: 0.4;
  }
  100% {
    clip-path: inset(0 0 0 0);
    opacity: 1;
  }
}

/* 大脑/机器/输血管变灰淡去（心脏保留可见） */
.ending-brain.fade,
.ending-brain-machine.fade,
.ending-blood-line.fade {
  opacity: 0 !important;
  transition: opacity 1200ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* 血泡等待时保持静止（移动动画由 JS 用 WAAPI 触发） */

.ending-brain {
  position: absolute;
  left: 50%;
  top: 465px;
  width: 170px;
  height: auto;
  transform: translateX(-47%);
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.ending-brain-machine {
  position: absolute;
  left: 50%;
  top: 440px;
  width: 110px;
  height: auto;
  transform: translateX(-46%);
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  z-index: 12;
}

.ending-blood-line {
  position: absolute;
  left: 50%;
  top: 608px;
  width: 200px;
  height: 300px;
  transform: translateX(calc(-25% + 3px));
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* 血液圆形血泡（自建，沿血管中线移动） */
.ending-blood-blob {
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  user-select: none;
  z-index: 20;
  will-change: transform, opacity;
}

.ending-heart {
  position: absolute;
  left: 61%;
  bottom: 95px;
  width: 103px;
  height: auto;
  transform: translateX(-50%);
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  z-index: 11;
}

/* 血泡进入心脏后，心脏擦变为红色（覆盖在默认心脏之上） */
.ending-heart-red {
  position: absolute;
  left: 61%;
  bottom: 95px;
  width: 103px;
  height: auto;
  transform: translateX(-50%);
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  z-index: 12;
  opacity: 0;
  clip-path: inset(0 0 100% 0);
}

.ending-heart-red-extra {
  z-index: 13;
}

.ending-heart-red.wipe {
  opacity: 1;
  animation: heartRedWipe 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes heartRedWipe {
  0% {
    clip-path: inset(0 0 100% 0);
  }
  100% {
    clip-path: inset(0 0 0 0);
  }
}

/* Right side */
.ending-right {
  position: relative;
  width: 960px;
  height: 1080px;
  overflow: hidden;
}

.ending-right-bg {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.ending-slider-bottom {
  position: absolute;
  left: 50%;
  top: 0;
  height: 100%;
  transform: translateX(-50%);
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  z-index: 2;
}

/* 右侧控件对应的血泡（正圆，层级低于灰色控件，预留其他动效） */
.ending-right-blob {
  position: absolute;
  left: 50%;
  top: 148px;
  width: 150px;
  height: 150px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  z-index: 1;
  opacity: 0;
}

.ending-slider-top {
  position: absolute;
  left: 50.5%;
  top: 50%;
  width: 230px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* Back button */
.ending-back-btn {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 40px;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 30px;
  color: #fff;
  font-family: "DM Sans Game", "DM Sans", Arial, sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 2px;
  cursor: pointer;
  z-index: 101;
  transition: background 0.3s, border-color 0.3s;
}

.ending-back-btn:hover {
  background: rgba(0, 0, 0, 0.7);
  border-color: rgba(255, 255, 255, 0.6);
}

/* 画框渐变为黑色（1上 特殊谢幕过渡） */
.ending-blackout {
  position: absolute;
  inset: 0;
  z-index: 300;
  background: #000;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.9s cubic-bezier(0.34, 0, 0.26, 1), visibility 0.9s;
}

.ending-blackout.show {
  opacity: 1;
  visibility: visible;
}

/* Ending video overlay */
.ending-video {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 200;
  opacity: 1;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.ending-video.fade-out {
  opacity: 0;
}

/* Animation initial states (before video ends) */
.ending-scene:not(.started) .ending-right {
  filter: blur(15px);
}

.ending-scene:not(.started) .ending-photo-1 {
  opacity: 0 !important;
  transform: translateY(-100%) !important;
  pointer-events: none !important;
}

.ending-scene:not(.started) .ending-photo-2 {
  opacity: 0 !important;
  transform: translateY(-100%) !important;
  pointer-events: none !important;
}

.ending-scene:not(.started) .ending-photo-3 {
  opacity: 0 !important;
  transform: translateY(-100%) !important;
  pointer-events: none !important;
}

.ending-scene:not(.started) .ending-left > *:not(.ending-bg):not(.ending-photo):not(.ending-sad-mask):not(.ending-soft-mask):not(.ending-photo3-person):not(.ending-dark-eyes):not(.ending-dark-tear):not(.ending-heart-red) {
  filter: blur(30px);
  pointer-events: none;
}

.ending-scene:not(.started) .ending-bg {
  transform: translateX(-50%) scale(1.3);
}

/* Photo animation states */
.ending-scene.started .ending-photo {
  pointer-events: auto;
  cursor: pointer;
}

.ending-scene.started .ending-photo-1 {
  animation: photoDrop1 2.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ending-scene.started .ending-photo-2 {
  animation: photoDrop2 2.8s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}

.ending-scene.started .ending-photo-3 {
  animation: photoDrop3 2.8s cubic-bezier(0.22, 1, 0.36, 1) 0.6s both;
}

/* Right side blur animation */
.ending-scene.started .ending-right {
  animation: rightUnblur 3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Left side elements unblur */
.ending-scene.started .ending-left > *:not(.ending-bg):not(.ending-photo):not(.ending-sad-mask):not(.ending-soft-mask):not(.ending-photo3-person):not(.ending-dark-eyes):not(.ending-dark-tear):not(.ending-heart-red) {
  animation: leftUnblur 6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  pointer-events: none;
}

/* Background scale animation */
.ending-scene.started .ending-bg {
  animation: bgScale 6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Keyframes */
@keyframes photoDrop1 {
  0% {
    opacity: 0;
    transform: translateY(-100%);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes photoDrop2 {
  0% {
    opacity: 0;
    transform: translateY(-100%);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes photoDrop3 {
  0% {
    opacity: 0;
    transform: translateY(-100%);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rightUnblur {
  0% {
    filter: blur(15px);
  }
  100% {
    filter: blur(0px);
  }
}

@keyframes leftUnblur {
  0% {
    filter: blur(30px);
  }
  100% {
    filter: blur(0px);
  }
}

@keyframes bgScale {
  0% {
    transform: translateX(-50%) scale(1.3);
  }
  100% {
    transform: translateX(-50%) scale(1);
  }
}

/* Photo blur state during interaction */
.ending-photo.blurred {
  filter: blur(8px);
  pointer-events: none !important;
  transition: filter 0.5s ease;
}

.ending-photo.active {
  z-index: 50;
  pointer-events: none;
}

/* Brain shake animation */
.ending-brain.shake {
  animation: brainShake 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 心脏震动（血泡到达白控件上方时触发） */
.ending-heart.heart-pulse {
  animation: heartPulse 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes heartPulse {
  0% { transform: translateX(-50%) scale(1); }
  30% { transform: translateX(-50%) scale(1.14); }
  55% { transform: translateX(-50%) scale(0.92); }
  75% { transform: translateX(-50%) scale(1.08); }
  100% { transform: translateX(-50%) scale(1); }
}

@keyframes brainShake {
  0%, 100% { transform: translateX(-47%); }
  20% { transform: translateX(calc(-47% + 15px)); }
  40% { transform: translateX(calc(-47% - 15px)); }
  60% { transform: translateX(calc(-47% + 8px)); }
  80% { transform: translateX(calc(-47% - 8px)); }
}

/* Blood line bubble animation */
/* 气泡已改为独立元素 .ending-blood-blob（见上方 .ending-blood-blob 样式与 WAAPI 动画） */

/* Slider control */
.ending-slider-wrap {
  position: absolute;
  left: 50.5%;
  top: 0;
  width: 230px;
  height: 100%;
  transform: translateX(-50%);
  z-index: 10;
  cursor: grab;
  touch-action: none;
}

.ending-slider-wrap:active {
  cursor: grabbing;
}

.ending-slider-track {
  position: absolute;
  left: 50%;
  top: 0;
  width: 6px;
  height: 100%;
  transform: translateX(-50%);
  pointer-events: none;
}

.ending-slider-thumb {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 218px;
  height: auto;
  transform: translate(-50%, -50%);
  transition: top 700ms cubic-bezier(0.26, 1.6, 0.4, 1);
  pointer-events: none;
}

.ending-slider-thumb.pos-up {
  top: 45%;
}

.ending-slider-thumb.pos-middle {
  top: 50%;
}

.ending-slider-thumb.pos-down {
  top: 55%;
}

/* 档位锁定落位动画 */
.ending-slider-thumb.pos-lock {
  animation: thumbLock 420ms cubic-bezier(0.34, 1.5, 0.5, 1);
}

@keyframes thumbLock {
  0% {
    filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0));
    transform: translate(-50%, -50%) scale(1);
  }
  40% {
    filter: drop-shadow(0 0 22px rgba(255, 255, 255, 0.85));
    transform: translate(-50%, -50%) scale(1.06);
  }
  100% {
    filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0));
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Slider highlight when waiting */
.ending-scene.waiting-for-slider .ending-slider-wrap {
  animation: sliderPulse 1.5s ease-in-out infinite;
}

@keyframes sliderPulse {
  0%, 100% {
    filter: drop-shadow(0 0 0px rgba(255, 255, 255, 0));
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.6));
  }
}

/* ===== 电脑通关演出 ===== */
.computer-sequel {
  position: absolute;
  inset: 0;
  z-index: 1100;
  visibility: hidden;
  pointer-events: none;
}

.computer-sequel.active {
  visibility: visible;
  pointer-events: auto;
}

.cs-black {
  position: absolute;
  inset: 0;
  background: #000;
  z-index: 1;
  opacity: 0;
  transition: opacity 480ms cubic-bezier(0.16, 1, 0.3, 1);
}

.computer-sequel.step-black .cs-black,
.computer-sequel.step-computer .cs-black {
  opacity: 1;
}

.cs-bulb {
  position: absolute;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  object-fit: contain;
  filter: drop-shadow(0 0 26px rgba(255, 214, 120, 0.85));
  cursor: pointer;
  transition: opacity 480ms cubic-bezier(0.16, 1, 0.3, 1);
}

.computer-sequel.step-black .cs-bulb,
.computer-sequel.step-computer .cs-bulb {
  opacity: 1;
  pointer-events: auto;
}

/* 黑场左侧闪烁的小人（复用伤心状态遮罩，随机低透明度闪烁），进入电脑面板阶段后消失 */
.cs-sad-person {
  position: absolute;
  left: 120px;
  bottom: 0;
  width: 560px;
  height: auto;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.cs-panel {
  position: absolute;
  left: 1050px;
  top: 100px;
  width: 780px;
  height: 877px;
  z-index: 2;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 480ms cubic-bezier(0.16, 1, 0.3, 1);
}

.computer-sequel.step-computer .cs-panel {
  opacity: 1;
}

.cs-panel.cs-flash {
  opacity: 0;
  transition: opacity 110ms linear;
}

.cs-clone {
  position: absolute;
  left: 0;
  top: 0;
  width: 960px;
  height: 1080px;
  transform: scale(0.8125);
  transform-origin: top left;
  pointer-events: none;
}

.cs-white {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}

.computer-folder-slot.bulb-glow img {
  filter: drop-shadow(0 0 12px rgba(255, 214, 120, 0.95));
}

/* ===== 谢幕 ===== */
.credits-scene {
  position: absolute;
  inset: 0;
  z-index: 1300;
  visibility: hidden;
  overflow: hidden;
  background: linear-gradient(180deg, #8fc4ec 0%, #cfe3ef 45%, #f6d9c3 72%, #f3b79a 100%);
}

.credits-scene.visible {
  visibility: visible;
}

.credits-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.credits-text {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 706px;
  height: auto;
  transform: translate(-50%, -50%);
  filter: blur(15px);
  opacity: 0;
}

.credits-content {
  position: absolute;
  left: 0;
  top: 0;
  width: 1921px;
  height: 1081px;
  transform: translateY(1080px);
}

/* ===== 设备状态提示（横屏 / 微信，共用模板） ===== */
.wechat-hint {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: none;
  align-items: center;
  justify-content: center;
  background: #dcdcdc;
}

.wechat-hint.show {
  display: flex;
}

.wechat-hint-card {
  width: 100%;
  max-width: 620px;
  padding: 0 60px;
  background: transparent;
  color: #2b2b2b;
  text-align: left;
}

.wechat-hint-title {
  font-family: "STIXGeneral", Georgia, "Times New Roman", serif;
  font-size: 64px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -1px;
  color: #2e2e2e;
  margin: 0 0 40px;
}

.wechat-hint-text {
  font-family: "DM Sans Game", "DM Sans", Arial, Helvetica, sans-serif;
  font-size: 27px;
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: 0.2px;
  color: #2b2b2b;
  max-width: 460px;
  margin: 0 0 64px;
}

.wechat-hint-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  padding: 0;
  border-radius: 999px;
  border: 2px solid #4a4a4a;
  background: transparent;
  color: #2b2b2b;
  font-family: "DM Sans Game", "DM Sans", Arial, Helvetica, sans-serif;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, opacity 160ms ease;
}

.wechat-hint-close:hover {
  background: #4a4a4a;
  color: #dcdcdc;
}

.wechat-hint-close:active {
  opacity: 0.75;
}
