/* ==========================================================================
   乌叶MC · motion layer — intro "astral terminal", page shutters, text glyphs,
   button shine/ripple, star cursor, scroll progress. Honors reduced motion.
   ========================================================================== */

html.wy-boot-pending body > *:not(#wy-boot) {
  visibility: hidden;
}

/* ---------------- intro terminal ---------------- */
#wy-boot {
  position: fixed;
  inset: 0;
  z-index: 9999;
  color: #b9b2a2;
  font: 11px/1.8 "Cascadia Code", Consolas, "Courier New", monospace;
  overflow: hidden;
  cursor: default;
  --g: #d8b56a;
  --v: #a48ad8;
  --c: #9fd9e6;
  --dim: #5f584c;
}
#wy-boot .sh {
  position: absolute;
  left: 0;
  right: 0;
  height: 50.2%;
  background: #050409;
  transition: transform 1.05s cubic-bezier(0.76, 0, 0.18, 1);
}
#wy-boot .sh.top {
  top: 0;
}
#wy-boot .sh.bot {
  bottom: 0;
}
#wy-boot .sh::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--g) 20%, #fff 50%, var(--g) 80%, transparent);
  opacity: 0;
  transition: opacity 0.25s;
}
#wy-boot .sh.top::after {
  bottom: 0;
}
#wy-boot .sh.bot::after {
  top: 0;
}
#wy-boot.open .sh.top {
  transform: translateY(-101%);
}
#wy-boot.open .sh.bot {
  transform: translateY(101%);
}
#wy-boot.open .sh::after {
  opacity: 1;
}
#wy-boot.open {
  pointer-events: none;
}
#wy-boot .seam {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(216, 181, 106, 0.9) 30%, #fff 50%, rgba(216, 181, 106, 0.9) 70%, transparent);
  box-shadow: 0 0 18px rgba(216, 181, 106, 0.6);
  transform: scaleX(0);
  animation: wy-seam 1.1s 0.15s cubic-bezier(0.7, 0, 0.2, 1) forwards, wy-seam-out 0.5s 1.25s forwards;
}
@keyframes wy-seam {
  to {
    transform: scaleX(1);
  }
}
@keyframes wy-seam-out {
  to {
    opacity: 0;
    transform: scaleX(1) scaleY(0.3);
  }
}
#wy-boot::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(1px 1px at 20% 30%, rgba(255, 246, 220, 0.6) 50%, transparent 51%) 0 0 / 140px 140px,
    radial-gradient(1px 1px at 70% 70%, rgba(216, 181, 106, 0.5) 50%, transparent 51%) 0 0 / 190px 190px;
  opacity: 0;
  animation: wy-fade 1.2s 1s forwards;
}
#wy-boot.open::before {
  opacity: 0 !important;
  animation: none;
}
.wyb {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  gap: 0 32px;
  padding: max(18px, 3vh) max(16px, 3vw);
  clip-path: inset(50% 0 50% 0);
  animation: wy-frame 0.9s 1.15s cubic-bezier(0.7, 0, 0.2, 1) forwards;
  transition: opacity 0.4s, filter 0.4s;
}
@keyframes wy-frame {
  to {
    clip-path: inset(0 0 0 0);
  }
}
#wy-boot.open .wyb,
#wy-boot.open .wyb-skip {
  opacity: 0;
  filter: blur(6px);
}
.wyb-head {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--dim);
  padding-bottom: 12px;
  border-bottom: 1px solid #1d1a24;
}
.wyb-head .r {
  color: var(--g);
}
.wyb-lbl {
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--dim);
  margin: 18px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #1d1a24;
}
.wyb-left,
.wyb-right {
  min-width: 0;
  align-self: center;
}
#wyb-log {
  margin: 0;
  white-space: pre;
  overflow: hidden;
  color: #8f877a;
  font: inherit;
}
#wyb-log .ln {
  display: block;
  animation: wy-ln 0.35s both;
}
#wyb-log .t {
  color: #4a4438;
}
#wyb-log .v {
  color: var(--g);
}
#wyb-log .w {
  color: var(--c);
}
@keyframes wy-ln {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }
}
.wyb-center {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
}
#wyb-sky {
  width: min(58vh, 100%);
  aspect-ratio: 1;
  display: block;
  transition: opacity 0.8s, filter 0.8s, transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
#wy-boot.wyb-reveal #wyb-sky {
  opacity: 0.3;
  filter: blur(1px);
  transform: scale(0.92);
}
.wyb-name {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}
.wyb-name .zh {
  font-family: "Noto Serif SC", "Songti SC", "STSong", serif;
  font-weight: 900;
  font-size: clamp(38px, 8vw, 86px);
  letter-spacing: 0.22em;
  margin-right: -0.22em;
  color: #f1e8d2;
  white-space: nowrap;
  min-height: 1.2em;
}
.wyb-name .zh span {
  display: inline-block;
  opacity: 0;
}
.wyb-name .zh span.on {
  animation: wy-glyph 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.wyb-name .sub {
  font-family: "Cinzel", serif;
  font-weight: 700;
  font-size: clamp(11px, 1.7vw, 16px);
  color: var(--g);
  letter-spacing: 0.9em;
  margin-right: -0.9em;
  margin-top: 14px;
  white-space: nowrap;
  opacity: 0;
}
#wy-boot.wyb-reveal .wyb-name .sub {
  animation: wy-track 1.4s 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes wy-track {
  from {
    opacity: 0;
    letter-spacing: 1.6em;
    margin-right: -1.6em;
  }
  to {
    opacity: 1;
    letter-spacing: 0.9em;
    margin-right: -0.9em;
  }
}
.wyb-name .rule {
  width: min(360px, 70vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, #7a6c4c, transparent);
  margin: 18px 0 12px;
  transform: scaleX(0);
}
#wy-boot.wyb-reveal .wyb-name .rule {
  animation: wy-seam 0.9s 0.8s cubic-bezier(0.7, 0, 0.2, 1) forwards;
}
.wyb-name .en {
  font-size: 10.5px;
  letter-spacing: 0.5em;
  margin-right: -0.5em;
  color: #8f877a;
  min-height: 1.3em;
}
.wyb-enter {
  margin-top: 26px;
  pointer-events: auto;
  font: 700 13px/1 "Noto Serif SC", "Cinzel", serif;
  letter-spacing: 0.4em;
  padding: 14px 28px 14px 34px;
  color: #1a1408;
  background: linear-gradient(180deg, #f3d996, #d8b56a);
  border: 0;
  cursor: pointer;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s, transform 0.5s;
}
#wy-boot.ready .wyb-enter {
  opacity: 1;
  transform: none;
  animation: wy-breathe 2.2s 0.6s ease-in-out infinite;
}
@keyframes wy-breathe {
  50% {
    box-shadow: 0 0 34px rgba(216, 181, 106, 0.55);
    filter: brightness(1.12);
  }
}
.wyb-right canvas {
  width: 100%;
  height: 64px;
  display: block;
  border: 1px solid #1d1a24;
}
.wyb-kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
  margin: 14px 0 0;
}
.wyb-kv dt {
  color: var(--dim);
  letter-spacing: 0.2em;
  font-size: 10px;
}
.wyb-kv dd {
  margin: 0;
  color: #d8d0bd;
  text-align: right;
}
.wyb-kv dd.v {
  color: var(--g);
}
.wyb-kv dd.p {
  color: var(--c);
}
.wyb-foot {
  grid-column: 1 / -1;
  padding-top: 12px;
  border-top: 1px solid #1d1a24;
}
.wyb-foot .row {
  display: flex;
  justify-content: space-between;
  letter-spacing: 0.22em;
  font-size: 10.5px;
}
.wyb-segs {
  display: grid;
  grid-template-columns: repeat(32, 1fr);
  gap: 3px;
  margin-top: 8px;
}
.wyb-segs i {
  height: 6px;
  background: #18151f;
  transition: background 0.2s, box-shadow 0.2s;
}
.wyb-segs i.on {
  background: var(--g);
  box-shadow: 0 0 8px rgba(216, 181, 106, 0.6);
}
.wyb-skip {
  position: absolute;
  right: max(16px, 3vw);
  bottom: calc(max(18px, 3vh) + 46px);
  z-index: 3;
  background: none;
  border: 1px solid #2c2734;
  color: #8f877a;
  font: 10px/1 "Cascadia Code", Consolas, monospace;
  letter-spacing: 0.3em;
  padding: 8px 12px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.wyb-skip:hover {
  color: var(--g);
  border-color: var(--g);
}
@media (max-width: 760px) {
  .wyb {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
  }
  .wyb-left,
  .wyb-right {
    display: none;
  }
}

/* ---------------- page transition shutters ---------------- */
.wy-trans {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
}
.wy-trans i {
  position: absolute;
  left: 0;
  right: 0;
  height: 50.5%;
  background: #050409;
  transition: transform 0.55s cubic-bezier(0.76, 0, 0.18, 1);
}
.wy-trans i:first-child {
  top: 0;
  transform: translateY(-101%);
  border-bottom: 1px solid rgba(216, 181, 106, 0.7);
}
.wy-trans i:last-child {
  bottom: 0;
  transform: translateY(101%);
  border-top: 1px solid rgba(216, 181, 106, 0.7);
}
.wy-trans.shut i {
  transform: none;
}
.wy-trans.shut {
  pointer-events: auto;
}

/* ---------------- text glyph reveal ---------------- */
.fx-chars .fx-c {
  display: inline-block;
  opacity: 0;
  white-space: pre;
}
.fx-chars.fx-on .fx-c {
  animation: wy-glyph 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--i) * 32ms);
}
@keyframes wy-glyph {
  0% {
    opacity: 0;
    transform: translate3d(0, 0.35em, 0) scale(0.92);
  }
  20% {
    opacity: 0.9;
  }
  30% {
    opacity: 0.2;
  }
  45% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}
.fx-chars.fx-on .fx-c { animation-duration: 0.9s; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
.fx-rise {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--d, 0) * 70ms);
}
.fx-rise.fx-on {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
.section-head h2::before {
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 1s;
}
.section-head h2:not(.fx-on)::before {
  transform: translateX(-12px);
  opacity: 0;
}

/* ---------------- buttons: shine, ripple, magnet ---------------- */
.btn,
.idea-vote,
.cx-like,
.cx-side,
.chip,
.tab,
.page-btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  will-change: transform;
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  transform: translateX(-130%);
  pointer-events: none;
}
.btn:hover::after {
  animation: wy-shine 0.9s ease;
}
.btn-primary::after,
.btn-gold::after {
  animation: wy-shine 3.2s 1.5s ease-in-out infinite;
}
@keyframes wy-shine {
  0%,
  55% {
    transform: translateX(-130%);
  }
  100% {
    transform: translateX(130%);
  }
}
.btn:active,
.idea-vote:active,
.cx-side:active,
.cx-like:active {
  transform: scale(0.96) !important;
}
.fx-ripple {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 240, 200, 0.55), rgba(216, 181, 106, 0) 70%);
  transform: translate(-50%, -50%) scale(0);
  animation: wy-ripple 0.7s ease-out forwards;
  z-index: 0;
}
@keyframes wy-ripple {
  to {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
  }
}
.fx-burst {
  position: fixed;
  z-index: 9990;
  pointer-events: none;
  font-size: 14px;
  color: #f3d996;
  text-shadow: 0 0 10px rgba(216, 181, 106, 0.9);
  animation: wy-burst 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes wy-burst {
  to {
    transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(0.3);
    opacity: 0;
  }
}
a:not(.btn):not(.cx-work-cover):not(.brand):not(.chip) {
  background-image: linear-gradient(var(--gold, #d8b56a), var(--gold, #d8b56a));
  background-size: 0 1px;
  background-repeat: no-repeat;
  background-position: 100% 100%;
  transition: background-size 0.35s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s;
}
a:not(.btn):not(.cx-work-cover):not(.brand):not(.chip):hover {
  background-size: 100% 1px;
  background-position: 0 100%;
}
.brand-avatar {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.brand:hover .brand-avatar {
  transform: rotate(360deg);
}
.cx-work,
.idea-row,
.poll-option,
.cx-node {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.cx-work:hover {
  transform: translateY(-6px);
}
.idea-row:hover {
  transform: translateX(6px) !important;
}
.fx-tilt {
  transition: transform 0.2s ease-out;
  transform-style: preserve-3d;
}

/* ---------------- header tools ---------------- */
.wy-tools {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 8px;
}
.wy-tool {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 32px;
  padding: 0 8px;
  background: none;
  border: 1px solid rgba(216, 181, 106, 0.3);
  color: #d8b56a;
  font: 700 12px/1 "Cinzel", "Noto Serif SC", serif;
  letter-spacing: 0.08em;
  cursor: pointer;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  transition: background 0.2s, color 0.2s;
}
.wy-tool:hover {
  background: rgba(216, 181, 106, 0.14);
  color: #f3d996;
}
.wy-tool[aria-pressed="true"] {
  color: #6f685b;
}
.wy-eq {
  display: inline-flex;
  gap: 2px;
  align-items: flex-end;
  height: 12px;
}
.wy-eq i {
  width: 2px;
  background: currentColor;
  animation: wy-eq 0.9s ease-in-out infinite;
}
.wy-eq i:nth-child(2) {
  animation-delay: -0.3s;
}
.wy-eq i:nth-child(3) {
  animation-delay: -0.6s;
}
@keyframes wy-eq {
  0%,
  100% {
    height: 3px;
  }
  50% {
    height: 12px;
  }
}
.wy-tool[aria-pressed="true"] .wy-eq i {
  animation: none;
  height: 2px;
}

/* ---------------- scroll progress + star cursor ---------------- */
.wy-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 9000;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, #a48ad8, #d8b56a, #f3d996);
  box-shadow: 0 0 10px rgba(216, 181, 106, 0.7);
  pointer-events: none;
}
.wy-stars {
  position: fixed;
  inset: 0;
  z-index: 8999;
  pointer-events: none;
}

@keyframes wy-fade {
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fx-chars .fx-c,
  .fx-rise {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    animation: none !important;
  }
  .btn::after,
  .wy-eq i {
    animation: none !important;
  }
}

/* ---------- admin: drop zone + forge overlay ---------- */
.admin-mod-form { display: grid; gap: 14px; }
.admin-drop {
  position: relative; display: grid; place-items: center; gap: 10px; min-height: 170px; padding: 24px;
  border: 1px dashed rgba(216,181,106,.45); background: rgba(216,181,106,.04); cursor: pointer;
  text-align: center; transition: border-color .25s, background .25s, transform .25s;
}
.admin-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.admin-drop:hover, .admin-drop.is-over { border-color: #d8b56a; background: rgba(216,181,106,.1); transform: translateY(-2px); }
.admin-drop.has-file { border-style: solid; }
.admin-drop-cube {
  width: 46px; height: 46px; border: 1px solid #d8b56a; transform: rotate(45deg);
  box-shadow: 0 0 24px rgba(216,181,106,.35) inset; animation: forge-bob 2.4s ease-in-out infinite;
}
.admin-drop.is-over .admin-drop-cube, .admin-drop.has-file .admin-drop-cube { background: rgba(216,181,106,.3); }
@keyframes forge-bob { 50% { transform: rotate(45deg) translate(-4px,-4px); } }

.forge { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; color: #efe6cf; pointer-events: auto; }
.forge::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 55%, rgba(216,181,106,.16), transparent 65%), #07060b; opacity: 0; transition: opacity .6s; }
.forge.on::before { opacity: 1; }
.forge .sh { position: absolute; left: 0; right: 0; height: 50%; background: #07060b; transition: transform .7s cubic-bezier(.7,0,.2,1); }
.forge .sh.top { top: 0; transform: translateY(-100%); }
.forge .sh.bot { bottom: 0; transform: translateY(100%); }
.forge.on .sh.top, .forge.on .sh.bot { transform: translateY(0); transition-delay: 0s; }
.forge.on .sh { animation: forge-open .8s .55s cubic-bezier(.7,0,.2,1) forwards; }
.forge.on .sh.top { --to: -100%; } .forge.on .sh.bot { --to: 100%; }
@keyframes forge-open { to { transform: translateY(var(--to)); } }
.forge.off { opacity: 0; transition: opacity 1s; }
.forge-body { position: relative; width: min(560px, 92vw); display: grid; gap: 12px; text-align: center; opacity: 0; transform: scale(.94); transition: opacity .5s .9s, transform .6s .9s; }
.forge.on .forge-body { opacity: 1; transform: none; }
.forge-tag { margin: 0; font-family: Cinzel, serif; letter-spacing: .4em; font-size: 12px; color: #d8b56a; }
.forge-canvas { width: 100%; height: 300px; }
.forge-name { font-family: Cinzel, serif; font-size: clamp(18px, 4vw, 26px); letter-spacing: .08em; word-break: break-all; }
.forge-log { min-height: 72px; font: 12px/1.5 ui-monospace, monospace; color: rgba(239,230,207,.6); text-align: left; }
.forge-log div { animation: wy-fade .4s both; }
.forge-bar { height: 4px; background: rgba(216,181,106,.15); overflow: hidden; }
.forge-bar i { display: block; height: 100%; background: linear-gradient(90deg, #a48ad8, #f3d996); transform-origin: left; transform: scaleX(0); box-shadow: 0 0 12px #f3d996; }
.forge-row { display: flex; justify-content: space-between; font-size: 13px; letter-spacing: .08em; }
.forge-pct { font-family: Cinzel, serif; color: #f3d996; }
.forge.strike .forge-body { animation: forge-hit .18s; }
@keyframes forge-hit { 40% { transform: translateY(3px) scale(.995); } }
.forge.win .forge-name { color: #f3d996; text-shadow: 0 0 22px rgba(243,217,150,.8); }
.forge.fail .forge-stage { color: #ff8a7a; }
@media (prefers-reduced-motion: reduce) { .forge *, .admin-drop-cube { animation: none !important; transition: none !important; } }

[hidden] { display: none !important; }
.nav a, .header-actions .btn { white-space: nowrap; }
@media (max-width: 1100px) and (min-width: 821px) { .nav { gap: 4px; } .nav a { padding-inline: 8px; } }

/* ---------- page transitions: native cross-document morph ---------- */
@view-transition { navigation: auto; }
.site-header { view-transition-name: wy-header; }
.wy-progress { view-transition-name: wy-progress; }
::view-transition-group(wy-header),
::view-transition-old(wy-header),
::view-transition-new(wy-header) { animation: none; }
::view-transition-old(wy-progress) { display: none; }
::view-transition-old(root) { animation: wy-vt-out 0.42s cubic-bezier(0.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: wy-vt-in 0.85s 0.08s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes wy-vt-out {
  to { opacity: 0; transform: translate3d(0, -14px, 0) scale(0.985); }
}
@keyframes wy-vt-in {
  from { opacity: 0; transform: translate3d(0, 22px, 0) scale(1.01); }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* fallback veil for browsers without cross-document view transitions */
.wy-veil { position: fixed; inset: 0; z-index: 9998; pointer-events: none; background: #07060b; opacity: 0; transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1); }
.wy-veil.on { opacity: 1; pointer-events: auto; transition-duration: 0.22s; }
.wy-veil.instant { transition: none; }

/* ---------- language switch: in-place crossfade ---------- */
html.wy-lang-swap::view-transition-old(root),
html.wy-lang-swap::view-transition-old(wy-header) {
  animation: wy-lang-out 0.32s cubic-bezier(0.4, 0, 1, 1) both;
}
html.wy-lang-swap::view-transition-new(root),
html.wy-lang-swap::view-transition-new(wy-header) {
  animation: wy-lang-in 0.6s 0.06s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes wy-lang-out { to { opacity: 0; transform: translate3d(0, -4px, 0); } }
@keyframes wy-lang-in { from { opacity: 0; transform: translate3d(0, 6px, 0); } }

/* intro title: the whole 乌叶MC pops in as one */
.wyb-name .zh.pop span { opacity: 1; animation: none; }
.wyb-name .zh.pop { animation: wyb-pop 0.75s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
@keyframes wyb-pop {
  0% { opacity: 0; transform: scale(0.6); text-shadow: 0 0 0 rgba(243, 217, 150, 0); }
  55% { opacity: 1; text-shadow: 0 0 40px rgba(243, 217, 150, 0.9); }
  100% { opacity: 1; transform: scale(1); text-shadow: 0 0 18px rgba(243, 217, 150, 0.25); }
}
#wy-boot.wyb-reveal .wyb-name .en { animation: wy-fade 0.6s 0.25s both; }

/* admin: vote cards */
.cards-admin { display: grid; gap: 10px; }
.card-row { display: grid; grid-template-columns: 88px 1fr; gap: 14px; align-items: center; padding: 10px; border: 1px solid rgba(216,181,106,.18); }
.card-img { position: relative; width: 88px; aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; cursor: pointer; border: 1px dashed rgba(216,181,106,.45); color: #d8b56a; font-size: 12px; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.card-main { display: grid; gap: 6px; }
.card-edit { display: flex; flex-wrap: wrap; gap: 8px; }
.card-edit .input { flex: 1 1 200px; }

/* background music toggle */
.wy-bgm { position: fixed; left: 18px; bottom: 18px; z-index: 60; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid rgba(216, 181, 106, .35); background: rgba(10, 8, 16, .78); color: #d8b56a; font: inherit; font-size: 12px; letter-spacing: .08em; cursor: pointer; backdrop-filter: blur(6px); transition: border-color .3s, transform .3s cubic-bezier(.16, 1, .3, 1); }
.wy-bgm:hover { border-color: rgba(216, 181, 106, .8); transform: translate3d(0, -2px, 0); }
.wy-bgm-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.wy-bgm-bars i { width: 2px; height: 3px; background: currentColor; transform-origin: bottom; transition: height .3s; }
.wy-bgm.is-on .wy-bgm-bars i { height: 12px; animation: wy-bgm-eq 1s ease-in-out infinite alternate; }
.wy-bgm.is-on .wy-bgm-bars i:nth-child(2) { animation-delay: -.3s; }
.wy-bgm.is-on .wy-bgm-bars i:nth-child(3) { animation-delay: -.6s; }
.wy-bgm.is-on .wy-bgm-bars i:nth-child(4) { animation-delay: -.15s; }
.wy-bgm:not(.is-on) { opacity: .75; }
@keyframes wy-bgm-eq { from { transform: scaleY(.25); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .wy-bgm.is-on .wy-bgm-bars i { animation: none; } }
@media (max-width: 560px) { .wy-bgm-label { display: none; } .wy-bgm { left: 12px; bottom: 12px; } }

.wy-bgm-tool { gap: 4px; }
.wy-bgm-note { font-size: 14px; line-height: 1; }
.wy-bgm-tool .wy-bgm-bars { height: 10px; }
.wy-bgm-tool .wy-bgm-bars i { height: 2px; }
.wy-bgm-tool.is-on .wy-bgm-bars i { height: 10px; }
.wy-bgm-tool:not(.is-on) .wy-bgm-bars { display: none; }
.wy-bgm-tool:not(.is-on) { opacity: 1; }
.wy-bgm-tool { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }

/* header music button reuses the eq bars: moving = playing, flat = off */
.wy-bgm-tool[aria-pressed="true"] { color: #d8b56a; }
.wy-bgm-tool[aria-pressed="true"] .wy-eq i { animation: wy-eq 0.9s ease-in-out infinite; height: auto; }
.wy-bgm-tool[aria-pressed="false"] { color: #8a8170; }
.wy-bgm-tool[aria-pressed="false"] .wy-eq i { animation: none; height: 2px; }
/* music bars: each bar has its own rhythm so it looks like a real equalizer */
.wy-eq-music { gap: 2px; height: 13px; }
.wy-eq-music i { height: 2px; transform-origin: bottom; }
.wy-bgm-tool[aria-pressed="true"] .wy-eq-music i { height: 13px; animation: none; }
.wy-bgm-tool[aria-pressed="true"] .wy-eq-music i:nth-child(1) { animation: wy-eq-a 0.83s ease-in-out infinite; }
.wy-bgm-tool[aria-pressed="true"] .wy-eq-music i:nth-child(2) { animation: wy-eq-b 1.17s ease-in-out infinite -0.4s; }
.wy-bgm-tool[aria-pressed="true"] .wy-eq-music i:nth-child(3) { animation: wy-eq-c 0.67s ease-in-out infinite -0.2s; }
.wy-bgm-tool[aria-pressed="true"] .wy-eq-music i:nth-child(4) { animation: wy-eq-b 0.94s ease-in-out infinite -0.7s; }
@keyframes wy-eq-a { 0% { transform: scaleY(.3); } 20% { transform: scaleY(1); } 45% { transform: scaleY(.45); } 70% { transform: scaleY(.85); } 100% { transform: scaleY(.3); } }
@keyframes wy-eq-b { 0% { transform: scaleY(.8); } 30% { transform: scaleY(.25); } 55% { transform: scaleY(.65); } 80% { transform: scaleY(1); } 100% { transform: scaleY(.8); } }
@keyframes wy-eq-c { 0% { transform: scaleY(.5); } 35% { transform: scaleY(.9); } 60% { transform: scaleY(.2); } 85% { transform: scaleY(.7); } 100% { transform: scaleY(.5); } }
@media (prefers-reduced-motion: reduce) { .wy-bgm-tool[aria-pressed="true"] .wy-eq-music i { animation: none !important; transform: scaleY(.6); } }
