:root {
  --ink: #1c1420;
  --paper: #f3e6c8;
  --moss: #46b86a;
  --tomato: #e23d2a;
  --sun: #f5c518;
  --navy: #2b2bff;
  --wine: #8c1f3a;
  --cream: #fffdf7;
  --ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Serif SC", "Songti SC", serif;
  user-select: none;
}
input, textarea, button, a { user-select: auto; font-family: inherit; }

#paper-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 80;
  opacity: 0.14;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.stage-root {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background:
    linear-gradient(#c9844a, #8d5528) bottom / 100% 14% no-repeat,
    linear-gradient(#f7efe0, #f3e6c8);
}
.app {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.bg-stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 92px;
  object-fit: cover;
  object-position: center top;
  pointer-events: none;
  z-index: 1;
}
.curtain {
  position: absolute;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  overflow: hidden;
}
.curtain-half {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.25s cubic-bezier(0.76, 0, 0.24, 1);
}
.curtain-half.left { clip-path: inset(0 50% 0 0); }
.curtain-half.right { clip-path: inset(0 0 0 50%); }
.curtain-slit {
  position: absolute;
  left: 50%;
  top: 0;
  width: 18px;
  height: 100%;
  transform: translateX(-50%) scaleX(0.2);
  background: linear-gradient(90deg, transparent, rgba(255, 246, 176, 0.85), transparent);
  filter: blur(2px);
  opacity: 0;
}
.curtain.open .curtain-slit {
  animation: slit 1.15s cubic-bezier(0.7, 0, 0.2, 1) forwards;
}
.curtain.open .curtain-half.left { transform: translateX(-108%) rotate(-1.4deg); }
.curtain.open .curtain-half.right { transform: translateX(108%) rotate(1.4deg); }
@keyframes slit {
  0% { opacity: 0; transform: translateX(-50%) scaleX(0.2); }
  35% { opacity: 1; transform: translateX(-50%) scaleX(8); }
  100% { opacity: 0; transform: translateX(-50%) scaleX(28); }
}

.title-splash {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  background: #050505;
  cursor: pointer;
  text-align: center;
}
.title-splash.gone {
  -webkit-mask-image: radial-gradient(circle at var(--x,50%) var(--y,50%), transparent var(--r,0px), #000 calc(var(--r,0px) + 2px));
  mask-image: radial-gradient(circle at var(--x,50%) var(--y,50%), transparent var(--r,0px), #000 calc(var(--r,0px) + 2px));
  pointer-events: none;
}
.title-splash h1 {
  margin: 0;
  font-family: "ZCOOL KuaiLe", sans-serif;
  font-size: clamp(40px, 5vw, 78px);
  color: var(--moss);
  line-height: 1.05;
}
.title-splash p { margin: 0; color: var(--paper); letter-spacing: .3em; font-size: 18px; }

.topbar {
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: 96px minmax(220px, 1fr) 250px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 104px;
  padding: 8px 18px;
}
.board {
  position: relative;
  z-index: 4;
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) minmax(260px, 320px);
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas:
    "nav program stage"
    "player program stage";
  gap: 14px;
  padding: 6px 16px 16px;
}

.header-cuke {
  position: relative;
  width: 86px;
  height: 96px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  justify-self: start;
  overflow: visible;
}
.header-cuke img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  transform-origin: 50% 72%;
  animation: cuke-nod 2.6s ease-in-out infinite;
}
.header-cuke.is-pop img { animation: cuke-pop 0.72s linear both; }
.header-cuke.is-rare img { animation: none; }
.header-cuke.is-rare.is-pop img { animation: cuke-pop 0.72s linear both; }
@keyframes cuke-nod {
  50% { transform: rotate(8deg) translateY(3px); }
}
@keyframes cuke-pop {
  0% { transform: rotate(0deg) scale(1, 1); }
  22% { transform: rotate(120deg) scale(1.42, 0.42); }
  46% { transform: rotate(230deg) scale(0.55, 1.38); }
  68% { transform: rotate(310deg) scale(1.22, 0.78); }
  84% { transform: rotate(345deg) scale(0.92, 1.12); }
  100% { transform: rotate(360deg) scale(1, 1); }
}
.cuke-boom {
  position: absolute;
  left: 50%;
  top: 62%;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 2;
}
.cuke-boom::before {
  content: "";
  position: absolute;
  left: -14px;
  top: -14px;
  width: 28px;
  height: 28px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--sun);
  animation: boom-ring 0.58s ease-out forwards;
}
.cuke-boom i {
  position: absolute;
  left: -9px;
  top: -9px;
  width: 18px;
  height: 18px;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: var(--fill);
  animation: boom-bit 0.62s ease-out forwards;
}
.cuke-boom i:nth-child(odd) {
  clip-path: polygon(50% 0, 64% 36%, 100% 38%, 72% 62%, 82% 100%, 50% 78%, 18% 100%, 28% 62%, 0 38%, 36% 36%);
  border: 0;
}
@keyframes boom-ring {
  0% { transform: scale(0.2); opacity: 1; }
  28% { transform: scale(2.1); opacity: 1; }
  100% { transform: scale(3.2); opacity: 0; }
}
@keyframes boom-bit {
  0% { transform: translate(0, 0) scale(0.2) rotate(0deg); opacity: 1; }
  42% { transform: translate(var(--x), var(--y)) scale(1.15) rotate(var(--turn)); opacity: 1; }
  100% { transform: translate(var(--x), var(--y)) scale(0.85) rotate(var(--turn)); opacity: 0; }
}
.search-wrap {
  position: relative;
  width: min(100%, 460px);
  justify-self: center;
  transition: opacity 400ms, transform 640ms cubic-bezier(0.16, 0.84, 0.24, 1);
}
body:not(.awake) .search-wrap { opacity: 0; transform: translateY(-16px); }
.search-bar { width: 100%; display: block; pointer-events: none; }
#stage-search {
  position: absolute;
  left: 7%;
  top: 24%;
  width: 66%;
  height: 50%;
  border: 0;
  border-radius: 999px;
  background: #e7f3c8;
  color: #24561c;
  font-family: "ZCOOL KuaiLe", sans-serif;
  font-size: 18px;
  padding: 0 12px;
}
#stage-search::placeholder { color: #5d8a49; }

.currency {
  position: relative;
  width: 250px;
  justify-self: end;
}
.currency-bar { width: 100%; display: block; }
.currency-cuke {
  position: absolute;
  left: -2px;
  top: 54%;
  width: 48%;
  transform: translateY(-52%) rotate(-4deg);
  pointer-events: none;
  z-index: 1;
}
#currency-count {
  position: absolute;
  left: 54%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: "ZCOOL KuaiLe", sans-serif;
  font-size: clamp(28px, 2.4vw, 42px);
  font-weight: 700;
  color: #143d12;
  z-index: 2;
  -webkit-text-stroke: 0;
}
#currency-add {
  position: absolute;
  right: 4%;
  top: 50%;
  transform: translateY(-50%);
  width: 16%;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}
#currency-add img { width: 100%; display: block; }

.player {
  grid-area: player;
  position: relative;
  align-self: end;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 4px 4px 0;
}
.turntable {
  position: relative;
  width: min(168px, 34vh);
  aspect-ratio: 1;
  transition: opacity 400ms, transform 640ms cubic-bezier(0.16, 0.84, 0.24, 1);
}
body:not(.awake) .turntable { opacity: 0; transform: translateY(16px); }
.vinyl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: spin 5.5s linear infinite;
}
.vinyl-cover {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 39%;
  height: 39%;
  object-fit: cover;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: spin-c 5.5s linear infinite;
  box-shadow: inset 0 0 0 8px rgba(20, 10, 8, 0.28);
}
.vinyl-cover.swap { animation: spin-c 5.5s linear infinite, cover-flash 280ms steps(4, end); }
@keyframes cover-flash {
  40% { filter: saturate(1.45) contrast(1.2); }
}
.turntable.paused .vinyl, .turntable.paused .vinyl-cover { animation-play-state: paused; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-c { to { transform: translate(-50%, -50%) rotate(360deg); } }
#cover-hotspot {
  position: absolute;
  inset: 8%;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.player-controls {
  position: relative;
  z-index: 4;
  width: 100%;
  display: grid;
  gap: 8px;
}
.player-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.player-buttons button {
  width: 100%;
  height: 38px;
  border: 3px solid var(--ink);
  background: var(--ink);
  color: var(--cream);
  border-radius: 999px;
  padding: 0;
  cursor: pointer;
  font-family: "ZCOOL KuaiLe", sans-serif;
  font-size: 15px;
  box-shadow: 3px 3px 0 rgba(28,20,32,.25);
}
.player-buttons button:hover { background: var(--wine); }

.side-nav {
  grid-area: nav;
  min-width: 0;
  align-self: start;
  padding: 4px 2px 0 0;
}
.col-kicker {
  margin: 0 0 8px;
  font-family: "ZCOOL KuaiLe", sans-serif;
  font-size: 13px;
  letter-spacing: 0.22em;
  color: var(--wine);
}
.menu-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.menu-item { margin: 0; }
.menu-label {
  display: block;
  width: 100%;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  padding: 10px 12px;
  border: 3px solid var(--ink);
  border-left-width: 8px;
  border-left-color: transparent;
  background: var(--cream);
  color: var(--ink);
  font-family: "ZCOOL KuaiLe", sans-serif;
  font-size: 16px;
  line-height: 1.35;
  cursor: pointer;
  box-shadow: 3px 3px 0 rgba(28,20,32,.14);
}
.menu-item.is-active .menu-label {
  background: var(--sun);
  border-left-color: var(--tomato);
}
.menu-item.is-dim .menu-label { opacity: 0.45; }
.menu-label:hover { background: #fff6b0; }

.program {
  grid-area: program;
  min-width: 0;
  min-height: 0;
}
.scene-card {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--cream);
  border: 4px solid var(--ink);
  box-shadow: 8px 8px 0 rgba(28,20,32,.14);
  overflow: hidden;
  transform-origin: 50% 0;
}
body:not(.awake) .scene-card { opacity: 0; transform: translateY(18px) rotate(-2deg); }
.scene-card.slap { animation: paper-slap 420ms steps(5, end); }
@keyframes paper-slap {
  0% { transform: translateY(-10px) rotate(-2deg); }
  40% { transform: translateY(3px) rotate(1deg); }
  100% { transform: none; }
}
.scene-card::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 46%;
  width: 64px;
  height: 16px;
  background: rgba(245, 197, 24, 0.9);
  border: 1px solid rgba(28,20,32,.25);
  transform: rotate(-8deg);
  z-index: 2;
  pointer-events: none;
}
.program-head {
  padding: 26px 22px 12px;
  border-bottom: 3px solid var(--ink);
  background: linear-gradient(#fffdf7, #f6ead2);
}
.program-head h2 {
  margin: 0;
  font-family: "ZCOOL KuaiLe", sans-serif;
  font-size: clamp(26px, 2.2vw, 38px);
  line-height: 1.28;
  white-space: pre-line;
  overflow-wrap: anywhere;
  color: var(--ink);
}
.card-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px 22px 22px;
  color: var(--ink);
}
.card-body p, .card-body li, .card-body a { font-size: 18px; line-height: 1.75; }
.card-body a { color: var(--wine); font-weight: 700; }

.welcome-poster {
  position: relative;
  margin: 6px 0 18px;
  padding: 26px 22px 22px;
  background: var(--cream);
  border: 4px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
}
.welcome-poster::before {
  content: "";
  position: absolute;
  right: 16px;
  bottom: 14px;
  width: 72px;
  height: 72px;
  border: 3px solid var(--moss);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, var(--moss) 0 7px, transparent 8px),
    repeating-conic-gradient(from 12deg, var(--moss) 0 8deg, transparent 8deg 20deg);
  opacity: 0.9;
}
.card-body .welcome-poster p {
  position: relative;
  z-index: 1;
  max-width: 78%;
  margin: 0;
  font-family: "ZCOOL KuaiLe", sans-serif;
  font-size: clamp(24px, 2.1vw, 32px);
  line-height: 1.45;
  color: var(--ink);
}
.tape {
  position: absolute;
  top: -12px;
  left: 28px;
  width: 92px;
  height: 24px;
  background: rgba(245, 197, 24, 0.9);
  border: 2px solid rgba(28, 20, 32, 0.4);
  transform: rotate(-7deg);
}
.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.card-body .pair-btn {
  display: grid;
  grid-template-rows: 88px auto;
  justify-items: center;
  align-content: center;
  gap: 10px;
  min-height: 280px;
  padding: 28px 20px;
  border: 4px solid var(--ink);
  background: var(--sun);
  box-shadow: 8px 8px 0 var(--ink);
  color: var(--ink);
  text-decoration: none;
  text-align: center;
  font-family: "ZCOOL KuaiLe", sans-serif;
  font-size: clamp(28px, 2.4vw, 36px);
  font-weight: 400;
  line-height: 1.25;
}
.card-body .pair-btn img { width: 72px; height: 88px; object-fit: contain; }
.card-body .pair-btn b {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: var(--tomato);
  color: var(--cream);
  font-size: 28px;
  font-weight: 400;
  transform: rotate(-8deg);
}
.card-body .pair-btn.pack { background: var(--cream); }
.card-body .pair-btn:hover { transform: translate(-3px, -3px); }
.web-list a {
  padding: 14px 16px;
  font-family: "ZCOOL KuaiLe", sans-serif;
  font-size: 22px;
  font-weight: 400;
}
.about-sheet {
  position: relative;
  padding: 22px 20px 18px;
  background: var(--cream);
  border: 4px solid var(--ink);
  box-shadow: 8px 8px 0 var(--wine);
}
.about-sheet::after {
  content: "设计学院";
  position: absolute;
  right: 16px;
  top: 16px;
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border: 3px solid var(--tomato);
  border-radius: 50%;
  color: var(--tomato);
  font-family: "ZCOOL KuaiLe", sans-serif;
  font-size: 16px;
  transform: rotate(12deg);
}
.card-body .about-sheet p {
  margin: 0 0 12px;
  font-family: "ZCOOL KuaiLe", sans-serif;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.5;
  color: var(--ink);
}
.card-body .about-sheet a { font-size: inherit; }

.toy-row {
  display: grid;
  grid-template-columns: minmax(140px, 180px) minmax(180px, 1fr);
  gap: 12px;
  margin: 16px 0 18px;
}
.slap-cuke, .slip {
  border: 3px solid var(--ink);
  background: #fffdf7;
  box-shadow: 4px 4px 0 rgba(28,20,32,.14);
  cursor: pointer;
  text-align: left;
}
.slap-cuke {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 10px 8px 12px;
}
.slap-cuke img {
  width: 92px;
  height: auto;
  transform-origin: 50% 70%;
}
.slap-cuke.is-hit img { animation: slap-squash 280ms steps(4, end); }
@keyframes slap-squash {
  30% { transform: scale(1.16, 0.72) rotate(-6deg); }
  60% { transform: scale(0.9, 1.12) rotate(4deg); }
}
.slap-cuke span, .slip-kicker, #slip-text {
  font-family: "ZCOOL KuaiLe", sans-serif;
}
.slap-cuke span { font-size: 16px; }
.slap-cuke em {
  font-style: normal;
  font-size: 12px;
  color: var(--wine);
}
.slip {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 148px;
  padding: 16px 18px;
  background:
    linear-gradient(#fffdf7, #fffdf7) padding-box,
    repeating-linear-gradient(90deg, transparent, transparent 12px, rgba(226, 61, 42, 0.16) 13px);
  transform-origin: 50% 0;
}
.slip.is-flip { animation: slip-flip 420ms steps(5, end); }
@keyframes slip-flip {
  30% { transform: rotateX(70deg); }
  60% { transform: rotateX(-12deg); }
}
.slip-kicker { font-size: 13px; letter-spacing: 0.18em; color: var(--wine); }
#slip-text { font-size: 22px; line-height: 1.35; }
.booth {
  background: var(--cream);
  border: 4px solid var(--ink);
  padding: 12px;
  box-shadow: 6px 6px 0 rgba(140, 31, 58, 0.14);
}
.booth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 64px;
  gap: 8px;
}
.booth-actions button {
  height: 42px;
  border: 3px solid var(--ink);
  background: #fffdf7;
  font-family: "ZCOOL KuaiLe", sans-serif;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 3px 3px 0 rgba(28,20,32,.12);
}
.booth-actions button:hover { background: var(--sun); }
.wheel-token {
  border-radius: 50%;
  background: var(--tomato) !important;
  color: var(--cream);
  transition: transform 700ms cubic-bezier(0.16, 0.84, 0.24, 1);
}
.booth-result {
  margin: 8px 0 0;
  min-height: 0;
  padding: 6px 8px;
  background: #fff6b0;
  border: 2px dashed var(--ink);
  font-size: 13px;
  line-height: 1.4;
}
.wing {
  grid-area: stage;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
}
.performer {
  position: relative;
  flex: 1;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 4px solid var(--ink);
  background:
    radial-gradient(ellipse at 50% 8%, rgba(255, 246, 176, 0.95), transparent 46%),
    linear-gradient(#f8d8c8 0%, #f3e6c8 48%, #e8cba6 100%);
  box-shadow: 8px 8px 0 rgba(140, 31, 58, 0.16);
}
.performer[data-glow="tomato"] {
  background:
    radial-gradient(ellipse at 50% 8%, rgba(226, 61, 42, 0.72), transparent 48%),
    linear-gradient(#f8cfc4, #f3e6c8 50%, #e8cba6);
}
.performer[data-glow="navy"] {
  background:
    radial-gradient(ellipse at 50% 8%, rgba(43, 43, 255, 0.45), transparent 48%),
    linear-gradient(#d9def8, #f3e6c8 50%, #e8cba6);
}
.performer[data-glow="moss"] {
  background:
    radial-gradient(ellipse at 50% 8%, rgba(70, 184, 106, 0.62), transparent 48%),
    linear-gradient(#d7f3c8, #f3e6c8 50%, #e8cba6);
}
.performer-drape {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 28px;
  z-index: 4;
  background: repeating-linear-gradient(90deg, #8c1f3a 0 8px, #6d1730 8px 14px, #b13352 14px 20px);
  box-shadow: inset 0 0 0 2px #1c1420;
}
.performer-drape.left { left: 0; }
.performer-drape.right { right: 0; }
.stage-lights {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.stage-lights span {
  position: absolute;
  left: 50%;
  top: -8%;
  width: 46%;
  height: 78%;
  transform: translateX(-50%);
  clip-path: polygon(36% 0, 64% 0, 100% 100%, 0 100%);
  opacity: 0.55;
  mix-blend-mode: multiply;
  background: linear-gradient(to bottom, #fff8c0, transparent);
  animation: swing 3.6s ease-in-out infinite alternate;
}
.stage-lights span:nth-child(2) {
  width: 34%;
  animation-duration: 4.2s;
  background: linear-gradient(to bottom, #9ad8ff, transparent);
}
.stage-lights span:nth-child(3) {
  width: 24%;
  animation-duration: 3.1s;
  background: linear-gradient(to bottom, #f0b6ff, transparent);
}
@keyframes swing { to { transform: translateX(-50%) rotate(-6deg); } }
.character-stage {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 3;
  width: 150%;
  transform: translateX(-50%) scale(1.15);
  transform-origin: bottom center;
}
body:not(.awake) .character-stage { opacity: 0; }
.character-sprite {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 0 rgba(28,20,32,.12));
}
.performer-deck {
  position: absolute;
  left: 36px;
  right: 36px;
  bottom: 22px;
  height: 16px;
  z-index: 5;
}
.deck-top {
  display: block;
  height: 16px;
  background: linear-gradient(#e0b06a, #8d5a2b);
  border: 3px solid var(--ink);
}
.deck-leg {
  position: absolute;
  left: 16%;
  top: 14px;
  width: 12px;
  height: 22px;
  background: #6b4120;
  border: 2px solid var(--ink);
}
.deck-leg.right { left: auto; right: 16%; }

@keyframes boil {
  50% { translate: 0.8px -0.6px; }
}
.hub-list, .web-list { display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; }
.hub-list a, .web-list a {
  display: block;
  padding: 8px 10px;
  background: rgba(255, 248, 234, 0.92);
  border: 3px solid #1a1a1a;
  box-shadow: 3px 3px 0 #1a1a1a;
  text-decoration: none;
  color: #1a1a1a;
}
.hub-list a:hover, .web-list a:hover { background: var(--sun); }
.collect-entry {
  display: inline-block;
  margin: 4px 0 12px;
  padding: 8px 14px;
  background: var(--sun);
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--ink);
  text-decoration: none;
  font-family: "ZCOOL KuaiLe", sans-serif;
  font-size: 18px;
}
.collect-entry:hover { background: #fff6b0; }
#reload-btn {
  margin-top: 8px;
  border: 3px solid var(--ink);
  background: var(--sun);
  font-family: "ZCOOL KuaiLe", sans-serif;
  padding: 6px 12px;
  cursor: pointer;
}

.card-body:has(.chat-panel) { display: flex; flex-direction: column; }
.chat-panel { display: grid; grid-template-rows: 1fr auto auto; flex: 1; min-height: 240px; gap: 8px; }
.chat-thread {
  overflow: auto;
  background: rgba(255,253,247,.72);
  border: 3px solid var(--ink);
  padding: 8px;
  min-height: 140px;
}
.chat-bubble { margin: 0 0 8px; padding: 6px 8px; background: #d7f5cf; border: 2px solid var(--ink); }
.chat-bubble.user { background: var(--sun); }
.chat-form { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.chat-form input, .chat-form button {
  border: 3px solid var(--ink);
  padding: 8px 10px;
  background: var(--cream);
  font-size: 18px;
}
.chat-form button { background: var(--moss); color: var(--ink); cursor: pointer; font-family: "ZCOOL KuaiLe", sans-serif; }

.cucumber-layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 6; }
.fly-cuke {
  position: absolute;
  width: 128px;
  pointer-events: auto;
  cursor: pointer;
  filter: drop-shadow(3px 3px 0 rgba(28,20,32,.25));
  offset-anchor: 20% 50%;
  animation: boil 0.4s steps(2, end) infinite;
}
#currency-count.pop { animation: count-pop 0.42s steps(4, end); }
@keyframes count-pop {
  40% { transform: translate(-50%, -50%) scale(1.35) rotate(-4deg); }
  100% { transform: translate(-50%, -50%) scale(1); }
}
.track-name {
  margin: 0;
  width: 100%;
  min-height: 2.7em;
  padding: 6px 8px;
  text-align: center;
  color: var(--ink);
  background: var(--cream);
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 rgba(28,20,32,.14);
  font-family: "ZCOOL KuaiLe", sans-serif;
  font-size: 15px;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.state-note {
  margin: 8px 0;
  padding: 6px 8px;
  background: rgba(255, 246, 176, 0.92);
  color: var(--ink);
  border: 2px dashed var(--ink);
}
.score-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.score-list li {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 6px;
  padding: 4px 6px;
  background: rgba(255, 248, 234, 0.9);
  color: var(--ink);
  border: 2px solid var(--ink);
  font-size: 13px;
}
.hub-list li, .web-list li { animation: row-in 0.36s steps(4, end) both; animation-delay: calc(var(--i, 0) * 40ms); }
@keyframes row-in {
  from { transform: translateX(-12px) rotate(-1.5deg); opacity: 0; }
}
.beg-card { animation: paper-slap 0.4s steps(5, end); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }
.header-cuke, .currency { transition: transform 700ms cubic-bezier(0.16, 0.84, 0.24, 1), opacity 400ms; }
body:not(.awake) .header-cuke { opacity: 0; transform: translateY(-30px) rotate(-6deg); }
body:not(.awake) .currency { opacity: 0; transform: scale(0.86) translateY(-20px); }
.fly-cuke.caught { pointer-events: none; transition: transform .55s var(--ease-pop), opacity .55s ease; }

.beg-modal {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: grid;
  place-items: center;
  background: rgba(28,20,32,.55);
}
.beg-modal[hidden] { display: none; }
.beg-card {
  width: min(440px, 88vw);
  padding: 28px 26px 22px;
  text-align: center;
  background: var(--cream);
  border: 4px solid var(--ink);
  box-shadow: 10px 10px 0 var(--ink);
}
.beg-face {
  margin: 0 0 8px;
  font-size: 40px;
  line-height: 1.2;
}
.beg-line {
  margin: 0 0 18px;
  font-family: "ZCOOL KuaiLe", sans-serif;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.3;
}
#beg-close {
  min-width: 120px;
  height: 46px;
  border: 3px solid var(--ink);
  background: var(--sun);
  box-shadow: 4px 4px 0 var(--ink);
  font-family: "ZCOOL KuaiLe", sans-serif;
  font-size: 20px;
  cursor: pointer;
}

@media (max-width: 900px) {
  html, body { height: auto; min-height: 100%; overflow: auto; }
  .stage-root, .app { height: auto; min-height: 100%; overflow: visible; }
  .topbar {
    height: auto;
    grid-template-columns: 72px 1fr;
    padding: 8px;
  }
  .header-cuke { width: 64px; height: 72px; }
  .currency { width: 100%; max-width: 210px; justify-self: end; }
  .search-wrap { grid-column: 1 / -1; }
  .board {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 8px;
  }
  .player {
    width: 100%;
    height: auto;
    align-self: center;
  }
  .turntable { width: 160px; }
  .side-nav { order: 1; overflow: visible; width: 100%; }
  .menu-list { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
  .menu-item { flex: 0 0 168px; }
  .program { order: 2; min-height: 460px; }
  .scene-card { min-height: 460px; }
  .toy-row { grid-template-columns: 1fr; }
  .pair { grid-template-columns: 1fr; }
  .card-body .pair-btn { min-height: 180px; font-size: 26px; }
  .welcome-poster::before, .about-sheet::after { display: none; }
  .card-body .welcome-poster p { max-width: none; }
  .wing { order: 3; width: 100%; }
  .player { order: 4; }
  .performer { height: 340px; flex: none; }
  .character-stage { width: min(420px, 92%); bottom: 28px; transform: translateX(-50%) scale(1.05); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .vinyl, .vinyl-cover { animation: spin 5.5s linear infinite !important; }
  .turntable.paused .vinyl, .turntable.paused .vinyl-cover { animation-play-state: paused !important; }
}
