* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: transparent;
  color: #f5f5f5;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

input,
textarea,
button,
a,
select,
label {
  -webkit-user-select: auto;
  user-select: auto;
  touch-action: manipulation;
}

.stage-root {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* 手机竖屏：整页按横屏排布（旋转舞台，不依赖系统横屏锁） */
html.force-landscape,
html.force-landscape body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

html.force-landscape .stage-root {
  position: fixed;
  width: 100dvh;
  height: 100dvw;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(90deg);
  transform-origin: center center;
  overflow: hidden;
}

html.force-landscape .bg-video,
html.force-landscape .stage-overlay,
html.force-landscape .stage-curtain-layer,
html.force-landscape .unlock-cucumber-layer,
html.force-landscape .unlock-whiteout,
html.force-landscape .title-splash,
html.force-landscape .recharge-modal,
html.force-landscape .app {
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  inset: 0;
}

html.force-landscape .left-panel,
html.force-landscape .menu-list {
  height: 100% !important;
}

html.force-landscape .stage-lights-layer {
  width: 56% !important;
  height: 100% !important;
}

html.force-landscape .stage-light {
  width: 26% !important;
  height: 125% !important;
}

/* 手机横屏舞台（含强制横屏）：压矮高度下的关键尺寸
   调试台 html.layout-lab-mode 会覆盖这些夹紧，避免手调撞墙 */
html.phone-stage:not(.layout-lab-mode) .character-sprite {
  width: min(760px, 46vw);
}

html.phone-stage:not(.layout-lab-mode) .left-panel {
  left: 24px;
  width: clamp(220px, 30vw, 420px);
}

html.phone-stage:not(.layout-lab-mode) .menu-item {
  width: min(420px, 48vw);
  font-size: clamp(28px, 5.2vh, 48px);
}

html.phone-stage:not(.layout-lab-mode) .menu-title-image {
  max-height: clamp(36px, 9vh, 64px);
}

html.phone-stage:not(.layout-lab-mode) .center-panel {
  width: min(620px, 54vw);
}

html.phone-stage:not(.layout-lab-mode) .cucumber-currency-widget {
  transform: scale(0.82);
  transform-origin: top right;
}

html.phone-stage:not(.layout-lab-mode) .turntable-pair,
html.phone-stage:not(.layout-lab-mode) .tonearm {
  transform-origin: left center;
}

/* iPad / 平板：人物略左下、略缩小，避免压到卡牌 */
html.tablet-stage .character-sprite {
  width: min(700px, 42vw);
}

.bg-video {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  opacity: 1;
  filter: none;
  mix-blend-mode: normal;
  z-index: 0;
  pointer-events: none;
}

.stage-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: 1;
  pointer-events: none;
  user-select: none;
}

.stage-curtain-layer {
  position: fixed;
  inset: 0;
  z-index: 90;
  touch-action: none;
  user-select: none;
}

.stage-curtain-closed,
.stage-curtain-seq-frame,
.stage-curtain-open {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  pointer-events: none;
}

#stage-curtain-seq-canvas.stage-curtain-seq-frame {
  object-fit: cover;
}

.stage-curtain-closed {
  z-index: 1;
  opacity: 1;
}

.stage-curtain-seq-frame {
  z-index: 2;
  opacity: 0;
}

.stage-curtain-open {
  z-index: 3;
  opacity: 0;
}

.stage-curtain-layer.is-opened {
  pointer-events: none;
}

.app {
  position: relative;
  height: 100vh;
  width: 100vw;
  padding: 0;
  z-index: 2;
  --top-ui-anchor-top: 0px;
  --big-cucumber-width: 320px;
  --big-cucumber-height: 180px;
}

.cucumber-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 6;
}

.cucumber-fx-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 56;
}

.unlock-cucumber-layer {
  position: fixed;
  inset: 0;
  overflow: visible;
  pointer-events: none;
  z-index: 220;
}

.unlock-whiteout {
  position: fixed;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  z-index: 221;
  transition: opacity 420ms ease;
}

.unlock-whiteout.active {
  opacity: 1;
}

.title-splash {
  position: fixed;
  inset: 0;
  z-index: 240;
  overflow: hidden;
  background: #1f2020;
  cursor: pointer;
}

.title-splash.hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 360ms ease;
}

.title-splash.revealing {
  pointer-events: none;
  -webkit-mask-image: radial-gradient(
    circle at var(--reveal-x, 50vw) var(--reveal-y, 50vh),
    transparent var(--reveal-r, 0px),
    #000 calc(var(--reveal-r, 0px) + 2px)
  );
  mask-image: radial-gradient(
    circle at var(--reveal-x, 50vw) var(--reveal-y, 50vh),
    transparent var(--reveal-r, 0px),
    #000 calc(var(--reveal-r, 0px) + 2px)
  );
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.title-splash-bg {
  position: absolute;
  inset: -12%;
  background: linear-gradient(132deg, #272824, #151713, #272824);
  background-size: 170% 170%;
  animation: title-splash-gradient 7.8s ease-in-out infinite;
}

.title-splash-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.title-splash-line {
  position: absolute;
  width: 1.5px;
  height: 150vh;
  background: linear-gradient(
    to bottom,
    rgba(56, 158, 107, 0),
    rgba(56, 158, 107, 0.82),
    rgba(56, 158, 107, 0)
  );
  opacity: 0;
  transform-origin: center top;
  animation: title-line-flash 1.1s ease-out forwards;
}

.title-splash-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.title-splash-content {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  justify-items: center;
  gap: 18px;
  z-index: 2;
}

.title-splash-logo {
  width: min(280px, 24vw);
  height: auto;
  filter: drop-shadow(0 8px 26px rgba(57, 158, 107, 0.38));
  animation: title-logo-float 2.8s ease-in-out infinite;
}

.title-splash-title {
  margin: 0;
  color: #389e6b;
  font-size: clamp(44px, 4.6vw, 88px);
  font-weight: 900;
  letter-spacing: 1.2px;
  text-align: center;
  line-height: 1.05;
  text-shadow: 0 4px 20px rgba(20, 65, 46, 0.7);
}

.title-splash-tip {
  margin: 0;
  color: rgba(196, 230, 211, 0.92);
  font-size: clamp(18px, 1.6vw, 26px);
  letter-spacing: 3px;
}

.title-splash-fragments {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.title-splash-fragment {
  position: absolute;
  background: linear-gradient(130deg, #272824, #151713);
  box-shadow: inset 0 0 0 1px rgba(56, 158, 107, 0.08);
}

.title-splash-cucumber {
  position: fixed;
  width: 56px;
  height: 56px;
  pointer-events: none;
  z-index: 245;
  transform: translate(-50%, -50%);
}

.title-splash-cucumber img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 10px rgba(255, 255, 220, 0.72));
}

@keyframes title-splash-gradient {
  0%, 100% { background-position: 18% 22%; }
  50% { background-position: 82% 78%; }
}

@keyframes title-line-flash {
  0% { opacity: 0; transform: translateY(-25vh) rotate(0deg); }
  32% { opacity: 1; }
  100% { opacity: 0; transform: translateY(12vh) rotate(0deg); }
}

@keyframes title-logo-float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

.recharge-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.58);
  opacity: 0;
  pointer-events: none;
  z-index: 230;
  transition: opacity 200ms ease;
}

.recharge-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.recharge-panel {
  position: relative;
  /* 设计稿 1024×768；用 --recharge-ui-scale 按舞台高度整体缩小，百分比热区同步缩小 */
  width: calc(1024px * var(--recharge-ui-scale, 1));
  max-width: min(90vw, calc(1024px * var(--recharge-ui-scale, 1)));
  aspect-ratio: 1024 / 768;
  user-select: none;
  transform-origin: center center;
}

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

.recharge-close-hit {
  position: absolute;
  right: 3.4%;
  top: 4.8%;
  width: 12.6%;
  height: 16.8%;
  border: 0;
  border-radius: 999px;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.recharge-insufficient {
  position: absolute;
  left: 50%;
  bottom: 11%;
  transform: translateX(-50%);
  margin: 0;
  font-size: calc(44px * var(--recharge-ui-scale, 1));
  font-weight: 900;
  line-height: 1;
  color: #ff2d2d;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.72);
  opacity: 0;
}

.recharge-insufficient.visible {
  opacity: 1;
}

.unlock-cucumber {
  position: absolute;
  width: 160px;
  height: 160px;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
  animation: unlock-cucumber-blink 480ms ease-in-out infinite alternate;
}

.unlock-cucumber img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: brightness(1.4) saturate(1.35) drop-shadow(0 0 24px rgba(255, 255, 235, 0.9));
}

.unlock-rays {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 720px;
  height: 720px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  background: repeating-conic-gradient(
    rgba(255, 255, 255, 0.72) 0deg 4deg,
    rgba(255, 255, 255, 0.06) 4deg 11deg
  );
  -webkit-mask: radial-gradient(circle, transparent 0 14%, #fff 35%, transparent 72%);
  mask: radial-gradient(circle, transparent 0 14%, #fff 35%, transparent 72%);
}

.unlock-cucumber.animating .unlock-rays {
  opacity: 0.88;
  animation: unlock-rays-spin 1.2s linear infinite, unlock-rays-pulse 420ms ease-in-out infinite alternate;
}

@keyframes unlock-cucumber-blink {
  from {
    filter: brightness(1.08);
  }
  to {
    filter: brightness(1.8);
  }
}

@keyframes unlock-rays-spin {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes unlock-rays-pulse {
  from {
    opacity: 0.45;
  }
  to {
    opacity: 0.98;
  }
}

.character-stage {
  position: absolute;
  left: 1386px;
  top: 566px;
  z-index: 26;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transform-origin: center center;
  pointer-events: auto;
  user-select: none;
  animation: character-spot-boost 4.6s ease-in-out infinite;
  cursor: pointer;
}

.character-sprite {
  display: block;
  width: 760px;
  height: auto;
  max-width: none;
  object-fit: contain;
  user-select: none;
  pointer-events: auto;
}

.stage-lights-layer {
  position: absolute;
  right: 0;
  top: 0;
  width: 56vw;
  height: 100vh;
  z-index: 32; /* 人物(26)之上，收集栏(34)之下 */
  pointer-events: none;
  overflow: hidden;
}

.stage-light {
  position: absolute;
  right: -6%;
  top: -18%;
  width: 26vw;
  height: 125vh;
  transform-origin: right top;
  opacity: 0.56;
  filter: blur(1.2px);
  mix-blend-mode: screen;
  background: linear-gradient(
    to bottom,
    rgba(255, 248, 192, 0.84) 0%,
    rgba(129, 236, 255, 0.48) 20%,
    rgba(186, 141, 255, 0.26) 45%,
    rgba(255, 120, 204, 0.16) 68%,
    rgba(255, 220, 118, 0) 100%
  );
  clip-path: polygon(100% 0%, 86% 0%, 10% 100%, 46% 100%);
  animation: stage-light-swing 3.8s ease-in-out infinite alternate,
             stage-light-breathe 2.2s ease-in-out infinite,
             stage-light-color 5.2s linear infinite;
}

.stage-light-a {
  right: -4%;
  width: 22vw;
  background: linear-gradient(
    to bottom,
    rgba(255, 238, 120, 0.9) 0%,
    rgba(255, 199, 84, 0.54) 26%,
    rgba(255, 148, 88, 0.24) 58%,
    rgba(255, 148, 88, 0) 100%
  );
  animation-duration: 3.2s, 2.4s, 5.1s;
  animation-delay: -0.6s, -0.2s, -0.8s;
}

.stage-light-b {
  right: -8%;
  width: 28vw;
  opacity: 0.35;
  background: linear-gradient(
    to bottom,
    rgba(133, 224, 255, 0.86) 0%,
    rgba(86, 175, 255, 0.5) 22%,
    rgba(93, 129, 255, 0.24) 56%,
    rgba(103, 171, 255, 0) 100%
  );
  animation-duration: 4.1s, 2.7s, 6s;
  animation-delay: -1.1s, -0.8s, -2.1s;
}

.stage-light-c {
  right: -2%;
  width: 19vw;
  opacity: 0.5;
  background: linear-gradient(
    to bottom,
    rgba(236, 170, 255, 0.88) 0%,
    rgba(187, 123, 255, 0.48) 24%,
    rgba(126, 113, 255, 0.26) 54%,
    rgba(147, 126, 255, 0) 100%
  );
  animation-duration: 3.6s, 2s, 5.6s;
  animation-delay: -0.2s, -1s, -1.4s;
}

.stage-light-d {
  right: -10%;
  width: 31vw;
  opacity: 0.3;
  background: linear-gradient(
    to bottom,
    rgba(255, 174, 218, 0.82) 0%,
    rgba(255, 120, 186, 0.52) 22%,
    rgba(255, 98, 132, 0.24) 58%,
    rgba(255, 120, 178, 0) 100%
  );
  animation-duration: 4.4s, 2.9s, 6.4s;
  animation-delay: -1.6s, -0.4s, -2.8s;
}

.stage-light-sweep {
  position: absolute;
  right: -22%;
  top: -16%;
  width: 34vw;
  height: 130vh;
  transform-origin: right top;
  pointer-events: none;
  mix-blend-mode: screen;
  filter: blur(1.6px);
  opacity: 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.92) 0%,
    rgba(255, 245, 128, 0.62) 18%,
    rgba(136, 231, 255, 0.4) 38%,
    rgba(199, 131, 255, 0.32) 58%,
    rgba(255, 124, 191, 0.22) 75%,
    rgba(255, 255, 214, 0) 100%
  );
  clip-path: polygon(100% 0%, 90% 0%, 16% 100%, 50% 100%);
  animation: stage-light-sweep-pass 4.6s cubic-bezier(0.2, 0.72, 0.2, 1) infinite,
             stage-light-color 4.6s linear infinite;
}

@keyframes stage-light-swing {
  from {
    transform: rotate(19deg) translateX(0px) scaleY(1);
  }
  to {
    transform: rotate(33deg) translateX(-18px) scaleY(1.04);
  }
}

@keyframes stage-light-breathe {
  0%, 100% {
    opacity: 0.2;
  }
  50% {
    opacity: 0.78;
  }
}

@keyframes stage-light-color {
  0% {
    filter: blur(1.2px) hue-rotate(0deg) saturate(1.22) brightness(1);
  }
  25% {
    filter: blur(1.55px) hue-rotate(70deg) saturate(1.75) brightness(1.08);
  }
  50% {
    filter: blur(1.3px) hue-rotate(132deg) saturate(1.95) brightness(1.16);
  }
  75% {
    filter: blur(1.45px) hue-rotate(-76deg) saturate(1.68) brightness(1.05);
  }
  100% {
    filter: blur(1.2px) hue-rotate(0deg) saturate(1.22) brightness(1);
  }
}

@keyframes stage-light-sweep-pass {
  0%, 54%, 100% {
    opacity: 0;
    transform: rotate(15deg) translateX(88px);
  }
  60% {
    opacity: 0.64;
    transform: rotate(26deg) translateX(-40px);
  }
  70% {
    opacity: 0.72;
    transform: rotate(30deg) translateX(-122px);
  }
  82% {
    opacity: 0;
    transform: rotate(35deg) translateX(-184px);
  }
}

@keyframes character-spot-boost {
  0%, 56%, 100% {
    filter: brightness(1) saturate(1);
  }
  62% {
    filter: brightness(1.42) saturate(1.34);
  }
  71% {
    filter: brightness(1.16) saturate(1.18);
  }
}

.float-cucumber {
  position: absolute;
  left: 0;
  top: 0;
  width: 52px;
  height: auto;
  opacity: 0.9;
  user-select: none;
  pointer-events: none;
  will-change: transform;
}

.top-decor-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 33;
  transform: translateY(var(--top-ui-anchor-top));
}

.big-cucumber-decor {
  position: absolute;
  top: 0;
  left: 0;
  height: var(--top-ui-height, 64px);
  width: auto;
  transform: translate(-203.7%, -87%) scale(3);
  transform-origin: top left;
  pointer-events: auto;
  user-select: none;
}

.search-bar-decor {
  position: absolute;
  left: 50%;
  top: calc(var(--top-ui-height, 64px) / 6);
  height: calc(var(--top-ui-height, 64px) * 0.833333);
  width: auto;
  transform: translateX(-33.333%);
  transform-origin: top center;
  pointer-events: auto;
  user-select: none;
}

.cucumber-currency-widget {
  position: absolute;
  top: var(--top-ui-anchor-top);
  right: 6px;
  width: min(500px, 31vw);
  transform: translateX(-23.333%) scale(0.75);
  transform-origin: top right;
  z-index: 34;
  pointer-events: auto;
}

.cucumber-currency-bg {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  pointer-events: none;
}

.cucumber-currency-count-wrap {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  width: 35%;
  height: 52%;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.cucumber-currency-count {
  color: #1e6e24;
  font-size: clamp(28px, 2.6vw, 46px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 1px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.28);
}

.cucumber-add-btn {
  position: absolute;
  right: 4.2%;
  top: 50%;
  transform: translateY(-50%);
  width: 15.5%;
  aspect-ratio: 1 / 1;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.cucumber-add-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.turntable-pair {
  position: absolute;
  left: -540px;
  top: 50%;
  width: 960px;
  height: 960px;
  transform: translateY(-50%);
  transform-origin: center center;
  transition: transform 320ms cubic-bezier(0.22, 0.74, 0.22, 1), opacity 320ms ease;
  z-index: 9;
  pointer-events: none;
}

.turntable-hit-layer {
  position: absolute;
  left: -540px;
  top: 50%;
  width: 960px;
  height: 960px;
  transform: translateY(-50%);
  transform-origin: center center;
  transition: transform 320ms cubic-bezier(0.22, 0.74, 0.22, 1), opacity 320ms ease;
  z-index: 30;
  pointer-events: none;
}

.tonearm {
  position: absolute;
  left: 120px;
  top: 880px;
  width: 360px;
  height: auto;
  transform: translate(-50%, -50%) scale(0.48) rotate(5deg);
  transform-origin: 50% 100%;
  transition: transform 360ms cubic-bezier(0.2, 0.74, 0.2, 1);
  z-index: 26;
  pointer-events: none;
  user-select: none;
}

.turntable-pair.hovered {
  transform: translate(125px, -50%);
}

.turntable-hit-layer.hovered {
  transform: translate(125px, -50%);
}

.turntable-pair.paused .vinyl-disc,
.turntable-pair.paused .vinyl-cover-rotor {
  animation-play-state: paused;
}

.vinyl-disc {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 100%;
  --disc-offset-y: -6px;
  transform: translate(-50%, calc(-50% + var(--disc-offset-y)));
  transform-origin: center center;
  animation: vinyl-spin 5.5s linear infinite;
  pointer-events: none;
  user-select: none;
  z-index: 2;
}

.vinyl-cover-rotor {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 375px;
  height: 375px;
  transform: translate(-50%, -50%);
  transform-origin: center center;
  animation: vinyl-cover-spin 5.5s linear infinite;
  pointer-events: none;
  z-index: 1;
}

.vinyl-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}

.cover-zone {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 980px;
  height: 980px;
  transform: translate(-50%, -50%);
  z-index: 36;
  pointer-events: auto;
}

.cover-hotspot {
  position: absolute;
  inset: 16px calc(-6.25vw) 16px 16px;
  z-index: 2;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.turntable-controls {
  position: absolute;
  left: 50%;
  top: 61%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.turntable-controls.visible {
  opacity: 1;
  pointer-events: auto;
}

.tt-btn {
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(15, 15, 15, 0.68);
  color: #ffffff;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 14px;
  cursor: pointer;
}

@keyframes vinyl-spin {
  from {
    transform: translate(-50%, calc(-50% + var(--disc-offset-y))) rotate(0deg);
  }
  to {
    transform: translate(-50%, calc(-50% + var(--disc-offset-y))) rotate(360deg);
  }
}

@keyframes vinyl-cover-spin {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.left-panel {
  position: absolute;
  left: 68px;
  top: 22px;
  width: clamp(460px, 33vw, 640px);
  height: calc(100vh - 44px);
  z-index: 20;
  overflow: visible;
  pointer-events: none;
}

.center-panel {
  position: absolute;
  left: 54%;
  top: 51.5%;
  transform: translate(-50%, calc(-50% + var(--big-cucumber-height) / 4));
  width: min(900px, 60vw);
  z-index: 10;
}

.menu-list {
  position: relative;
  height: calc(100vh - 44px);
  margin: 0;
  padding: 0 0 0 34px;
  list-style: none;
  overflow: visible;
  pointer-events: auto;
  touch-action: none;
}

.menu-item {
  position: absolute;
  top: 50%;
  left: 0;
  width: 620px;
  margin-top: -20px;
  font-size: 64px;
  font-weight: 700;
  line-height: 1.1;
  color: #95ffa8;
  letter-spacing: 1px;
  transform-origin: left center;
  user-select: none;
  white-space: nowrap;
  transition: color 180ms ease;
  will-change: transform, opacity;
  pointer-events: auto;
}

.menu-item.active {
  color: #d5ff6e;
}

.menu-title-image {
  display: block;
  height: calc(98px * var(--menu-title-scale, 1));
  width: auto;
  max-width: none;
  transform-origin: center center;
  transition: none;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.25));
}

.menu-title-fallback {
  display: inline;
}

.scene-card {
  position: relative;
  width: min(558px, 85.5%);
  aspect-ratio: 3 / 4;
  border-radius: 20px;
  box-shadow: none;
  background: transparent;
  overflow: visible;
}

.card-wobble {
  position: relative;
  width: 100%;
  height: 100%;
  transform-origin: center center;
  transition: none;
  will-change: transform;
}

.card-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.card-base {
  z-index: 1;
}

.card-text-strip {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 72%;
  height: calc(100% * 1728 / 1891);
  z-index: 2;
  display: grid;
  place-items: center;
  pointer-events: auto;
}

.card-text-scroll {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  text-align: center;
  padding: 8% 8%;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.45) transparent;
  opacity: 0;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  -webkit-user-select: text;
  user-select: text;
}

.card-text-scroll.welcome-layout {
  padding-top: 14%;
}

.card-text-scroll.welcome-layout .active-name {
  margin-top: 26px;
}

.card-text-scroll::-webkit-scrollbar {
  width: 8px;
}

.card-text-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.45);
  border-radius: 999px;
}

.scene-card.ready .card-text-scroll {
  opacity: 1;
}

.card-outer {
  z-index: 3;
}

.card-flash {
  z-index: 4;
  object-fit: contain;
  filter: brightness(0) invert(1) saturate(0);
  opacity: 0;
  pointer-events: none;
}

/* 热点区：按 213/2304 约 9.2% 顶部比例放置 */
.card-hotspot {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 38%;
  height: 23.24%;
  z-index: 1;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.card-hotspot.is-pass-through {
  pointer-events: none;
}

.scene-kicker {
  margin: 0;
  font-size: 14px;
  letter-spacing: 1.5px;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.active-name {
  margin: calc(18px * var(--card-content-scale, 1)) 0 calc(10px * var(--card-content-scale, 1));
  font-size: calc(52px * var(--card-content-scale, 1));
  line-height: 1.08;
  white-space: pre-line;
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.95);
}

.active-name-link {
  color: #fff7a8;
  text-decoration: none;
  border-bottom: 2px solid rgba(255, 247, 168, 0.75);
  padding-bottom: 2px;
}

.active-name-link:hover {
  color: #fffde2;
  border-bottom-color: rgba(255, 253, 226, 0.95);
}

.scene-desc {
  margin: 0;
  font-size: calc(24px * var(--card-content-scale, 1));
  line-height: 1.48;
  white-space: pre-wrap;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.welcome-desc-text {
  margin: 0;
  white-space: pre-wrap;
}

.welcome-refresh-wrap {
  margin-top: calc(22px * var(--card-content-scale, 1));
  display: grid;
  justify-items: center;
  gap: calc(8px * var(--card-content-scale, 1));
}

.welcome-refresh-btn {
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(12, 18, 16, 0.72);
  color: #fff;
  font-size: calc(20px * var(--card-content-scale, 1));
  font-weight: 700;
  line-height: 1;
  padding: calc(10px * var(--card-content-scale, 1)) calc(28px * var(--card-content-scale, 1));
  cursor: pointer;
}

.welcome-refresh-btn:hover {
  background: rgba(30, 48, 40, 0.88);
}

.welcome-refresh-tip {
  margin: 0;
  font-size: calc(16px * var(--card-content-scale, 1));
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.78);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}

.score-list-text {
  margin: 0;
  font: 600 calc(20px * var(--card-content-scale, 1)) / 1.45 "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  white-space: pre-wrap;
}

.tools-download-list {
  display: grid;
  gap: 18px;
  justify-items: center;
  padding-top: 6px;
}

.tool-download-link {
  display: inline-block;
  color: #b9fff3;
  text-decoration: none;
  font-size: calc(34px * var(--card-content-scale, 1));
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.6px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
  border-bottom: 2px solid rgba(185, 255, 243, 0.8);
  padding-bottom: 2px;
}

.tool-download-link:hover {
  color: #ecfffb;
  border-bottom-color: rgba(236, 255, 251, 0.95);
}

.scene-card.private-locked .card-base,
.scene-card.private-locked .card-outer,
.scene-card.private-locked .card-flash {
  filter: brightness(0.42) saturate(0.55);
}

.scene-card.private-locked .card-hotspot {
  display: none;
}

.private-lock-panel {
  display: grid;
  justify-items: center;
  align-items: start;
  gap: 14px;
  padding-top: 8px;
}

.private-lock-image {
  width: min(170px, 62%);
  height: auto;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.7));
}

.private-unlock-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 82%;
}

.private-password-input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 10px;
  background: rgba(20, 20, 20, 0.72);
  color: #fff;
  font-size: calc(20px * var(--card-content-scale, 1));
  line-height: 1.2;
  padding: 10px 12px;
  outline: none;
}

.private-unlock-btn {
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  padding: 8px 22px;
  font-size: calc(20px * var(--card-content-scale, 1));
  font-weight: 700;
  background: rgba(18, 18, 18, 0.76);
  color: #fff;
  cursor: pointer;
}

.private-unlock-hint {
  min-height: 1.3em;
  margin: 0;
  font-size: calc(19px * var(--card-content-scale, 1));
  color: #ffd0d0;
}

.private-content-message {
  margin: 6px 0 0;
  font-size: calc(30px * var(--card-content-scale, 1));
  font-weight: 700;
  line-height: 1.35;
}

.about-line {
  margin: 0 0 10px;
  font-size: calc(27px * var(--card-content-scale, 1));
  line-height: 1.35;
}

.about-link {
  color: #fff7a8;
  text-decoration: none;
  border-bottom: 2px solid rgba(255, 247, 168, 0.75);
  padding-bottom: 1px;
}

.about-link:hover {
  color: #fffde2;
  border-bottom-color: rgba(255, 253, 226, 0.95);
}

.chat-panel {
  display: grid;
  grid-template-rows: minmax(calc(160px * var(--card-content-scale, 1)), 1fr) auto;
  gap: calc(12px * var(--card-content-scale, 1));
  width: 100%;
  min-height: calc(420px * var(--card-content-scale, 1));
  max-height: 100%;
  padding: calc(8px * var(--card-content-scale, 1)) 2px 0;
  box-sizing: border-box;
}

.chat-thread {
  width: 100%;
  max-height: calc(430px * var(--card-content-scale, 1));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: calc(10px * var(--card-content-scale, 1));
  padding: calc(8px * var(--card-content-scale, 1)) calc(6px * var(--card-content-scale, 1)) 4px;
  border-radius: calc(14px * var(--card-content-scale, 1));
  background: linear-gradient(180deg, rgba(16, 70, 46, 0.34), rgba(8, 36, 25, 0.44));
  border: 1px solid rgba(142, 255, 205, 0.32);
}

.chat-bubble {
  max-width: 78%;
  padding: calc(10px * var(--card-content-scale, 1)) calc(14px * var(--card-content-scale, 1));
  border-radius: calc(14px * var(--card-content-scale, 1));
  font-size: calc(21px * var(--card-content-scale, 1));
  line-height: 1.4;
  word-break: break-word;
}

.chat-bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(82, 223, 151, 0.92), rgba(31, 160, 99, 0.92));
  color: #072615;
}

.chat-bubble.bot {
  align-self: flex-start;
  background: linear-gradient(135deg, rgba(31, 92, 59, 0.9), rgba(17, 58, 38, 0.9));
  border: 1px solid rgba(117, 255, 188, 0.45);
  color: #d8ffe8;
}

.chat-form {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: calc(10px * var(--card-content-scale, 1));
}

.chat-input {
  border: 1px solid rgba(145, 255, 206, 0.58);
  border-radius: calc(12px * var(--card-content-scale, 1));
  background: rgba(8, 34, 22, 0.8);
  color: #d9ffeb;
  font-size: calc(21px * var(--card-content-scale, 1));
  padding: calc(10px * var(--card-content-scale, 1)) calc(12px * var(--card-content-scale, 1));
  outline: none;
}

.chat-send-btn {
  border: 1px solid rgba(145, 255, 206, 0.65);
  border-radius: calc(12px * var(--card-content-scale, 1));
  background: linear-gradient(135deg, rgba(50, 171, 108, 0.92), rgba(30, 127, 79, 0.92));
  color: #effff5;
  font-size: calc(20px * var(--card-content-scale, 1));
  font-weight: 700;
  padding: calc(9px * var(--card-content-scale, 1)) calc(16px * var(--card-content-scale, 1));
  cursor: pointer;
}

.chat-send-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

