:root {
  --ink: #4a2f1c;
  --ink-2: #7a5a3e;
  --paper: rgba(255, 248, 236, 0.88);
  --paper-line: rgba(160, 110, 50, 0.22);
  --gold: #e9b54a;
  --gold-deep: #a86f12;
  --title: "Songti SC", "STSong", "Noto Serif SC", "SimSun", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #2b1d17; }
body { font-family: var(--sans); color: var(--ink); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }

#stage { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; overflow: hidden; user-select: none; }
.bg { position: absolute; inset: 0; background: #6b4a35 center / 100% 100% no-repeat; }

/* ---------- 中央大水晶 ---------- */
.core-glow {
  --p: 0.5;
  position: absolute; left: 956px; top: 178px; width: 360px; height: 360px; margin: -180px 0 0 -180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, calc(0.25 + var(--p) * 0.45)) 0%, rgba(255, 226, 255, calc(0.12 + var(--p) * 0.3)) 28%, rgba(200, 170, 255, 0) 65%);
  mix-blend-mode: screen; pointer-events: none; animation: breathe 4.5s ease-in-out infinite;
}
.core-glow.burst { animation: coreBurst 1.6s ease-out 1 both; }
@keyframes breathe { 0%, 100% { transform: scale(0.9); opacity: 0.75; } 50% { transform: scale(1.08); opacity: 1; } }
@keyframes coreBurst { 0% { transform: scale(1); opacity: 1; } 40% { transform: scale(3.2); opacity: 1; } 100% { transform: scale(1.4); opacity: 0.9; } }

/* ---------- 水晶柱 ---------- */
.col { --p: 0; position: absolute; pointer-events: none; }
.col-in {
  position: absolute; inset: 2px 3px 0;
  clip-path: polygon(50% 0, 100% 16.7%, 100% 100%, 0 100%, 0 16.7%);
}
.col-fill {
  position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--p) * 100%);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.0) 0%, rgba(255, 255, 255, 0.45) 18%, rgba(255, 255, 255, 0) 34%, rgba(255, 255, 255, 0) 70%, rgba(0, 0, 0, 0.12) 100%),
    linear-gradient(180deg, var(--cl) 0%, var(--c) 12%, var(--c) 60%, var(--cd) 100%);
  opacity: 0.88;
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.55);
  transition: height 0.9s cubic-bezier(0.2, 0.9, 0.25, 1.1);
}
.col-surface { position: absolute; left: 0; right: 0; top: 0; height: 10px; background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0) 100%); opacity: 0.9; }
.col-bubbles {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.85) 0 2px, transparent 3px), radial-gradient(circle, rgba(255, 255, 255, 0.6) 0 1.5px, transparent 2.5px);
  background-size: 22px 46px, 30px 64px; background-position: 4px 0, 16px 20px;
  animation: rise 3.2s linear infinite; opacity: 0.7;
}
@keyframes rise { from { background-position: 4px 0, 16px 20px; } to { background-position: 4px -46px, 16px -44px; } }
/* 柱子外面的光晕 */
.col::after {
  content: ""; position: absolute; left: -70%; right: -70%; bottom: -6%; height: calc(var(--p) * 100% + 20%);
  background: radial-gradient(ellipse at 50% 70%, var(--c) 0%, transparent 65%); opacity: 0.35; mix-blend-mode: screen;
  transition: height 0.9s cubic-bezier(0.2, 0.9, 0.25, 1.1);
}
.col.lead::after { opacity: 0.6; animation: leadPulse 2.4s ease-in-out infinite; }
@keyframes leadPulse { 50% { opacity: 0.85; } }
.col.hit .col-fill { animation: hit 0.7s ease-out; }
@keyframes hit { 0% { filter: brightness(1); } 25% { filter: brightness(1.9) saturate(1.2); } 100% { filter: brightness(1); } }
.col.dim .col-fill { animation: dim 0.9s ease-out; }
@keyframes dim { 30% { filter: brightness(0.55) saturate(0.6); } }

.col-badge {
  position: absolute; top: 330px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px; padding: 6px 14px 6px 10px; border-radius: 999px;
  background: rgba(255, 249, 238, 0.92); border: 2px solid var(--c); color: var(--cd);
  font: 800 30px/1 var(--sans); font-variant-numeric: tabular-nums; pointer-events: none;
}
.col-badge .ic { width: 24px; height: 24px; fill: var(--c); }
.col-badge.lead { background: var(--c); color: #fff; border-color: #fff; }
.col-badge.lead .ic { fill: #fff; }
.col-badge.hit { animation: badgeHit 0.6s ease-out; }
@keyframes badgeHit { 30% { transform: translateX(-50%) scale(1.35); } }

#fx { position: absolute; inset: 0; width: 1920px; height: 1080px; pointer-events: none; }

/* ---------- 顶部 ---------- */
.topbar {
  position: absolute; left: 24px; right: 24px; top: 16px; height: 84px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  padding: 0 24px; border-radius: 16px; background: var(--paper); border: 1px solid var(--paper-line);
  backdrop-filter: blur(8px);
}
.tb-class { display: flex; align-items: center; gap: 14px; }
.crest { width: 44px; height: 44px; fill: var(--gold); }
.tb-name { font: 800 30px/1.15 var(--title); letter-spacing: 1px; }
.tb-sub { font-size: 17px; color: var(--ink-2); margin-top: 3px; }
.tb-rank { display: flex; gap: 10px; }
.rk {
  display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 18px 0 8px; border-radius: 14px;
  background: color-mix(in srgb, var(--cl) 55%, #fff); color: var(--cd);
}
.rk .ic { width: 26px; height: 26px; fill: var(--c); }
.rk-i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 800 17px/1 var(--sans); background: rgba(255, 255, 255, 0.8); }
.rk-n { font: 700 22px/1 var(--title); }
.rk b { font: 800 30px/1 var(--sans); font-variant-numeric: tabular-nums; min-width: 40px; text-align: right; }
.rk.first { background: var(--c); color: #fff; }
.rk.first .ic { fill: #fff; }
.rk.first .rk-i { background: #fff; color: var(--cd); }
.tb-core { justify-self: end; width: 400px; }
.tb-core-head { display: flex; justify-content: space-between; align-items: baseline; font: 700 18px/1 var(--title); }
.tb-core-head b { font: 800 22px/1 var(--sans); font-variant-numeric: tabular-nums; }
.tb-core-bar { height: 14px; margin: 8px 0 6px; border-radius: 99px; background: rgba(120, 80, 30, 0.14); overflow: hidden; }
.tb-core-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #ffd36a, #f7a8e6, #9fc8ff); transition: width 0.9s ease; }
.tb-core-goal { font-size: 15px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 底部名牌 ---------- */
.dock {
  position: absolute; left: 24px; right: 24px; bottom: 16px; height: 156px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.grp { padding: 10px 12px 12px; border-radius: 16px; background: var(--paper); border: 1px solid var(--paper-line); backdrop-filter: blur(8px); }
.grp-h { display: flex; align-items: center; gap: 8px; width: 100%; padding: 0 2px; height: 30px; border: 0; background: none; text-align: left; }
.grp-h .ic { width: 24px; height: 24px; fill: var(--c); }
.grp-h span { font: 800 21px/1 var(--title); color: var(--cd); }
.grp-h em { margin-left: auto; font: 500 14px/1 var(--sans); font-style: normal; color: var(--ink-2); padding: 6px 10px; border-radius: 99px; background: rgba(120, 80, 30, 0.08); }
.chips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 8px; }
.chip {
  position: relative; height: 48px; border: 0; border-radius: 12px; padding: 0 4px;
  background: color-mix(in srgb, var(--cl) 60%, #fff); color: var(--cd);
  display: flex; align-items: center; justify-content: center;
}
.chip .nm { font: 700 20px/1 var(--sans); letter-spacing: 0.5px; }
.chip .lv { position: absolute; top: -6px; right: -4px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; background: var(--c); color: #fff; font: 800 13px/22px var(--sans); }
.chip:hover, .grp-h:hover em { filter: brightness(1.04); box-shadow: 0 0 0 2px var(--c) inset; }

/* ---------- 加分菜单 ---------- */
.pop {
  position: absolute; z-index: 60; display: flex; gap: 8px; align-items: stretch; padding: 10px; border-radius: 16px;
  background: #fffaf1; border: 1px solid var(--paper-line); box-shadow: 0 18px 40px rgba(60, 30, 10, 0.28);
}
.pop-t { display: flex; align-items: center; padding: 0 10px 0 6px; font: 800 22px/1 var(--title); }
.pop button { width: 104px; height: 68px; border: 0; border-radius: 12px; background: #fff0c9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.pop button b { font: 800 26px/1 var(--sans); color: var(--gold-deep); }
.pop button span { font-size: 15px; color: var(--ink-2); }
.pop button.neg { background: #f1ece6; }
.pop button.neg b { color: #8a7b6c; }
.pop button:hover { filter: brightness(0.97); }

/* ---------- 加分的小巫师 ---------- */
#actors { position: absolute; inset: 0; pointer-events: none; }
.actor {
  position: absolute; bottom: 120px; width: 260px; margin-left: -130px; height: 330px;
  transform: translateY(260px) scale(0.4); opacity: 0;
  transition: transform 0.55s cubic-bezier(0.3, 1.5, 0.5, 1), opacity 0.25s;
}
.actor.up { transform: translateY(0) scale(1); opacity: 1; }
.actor.out { transform: translateY(40px) scale(0.85); opacity: 0; transition: transform 0.5s ease-in, opacity 0.5s ease-in; }
.actor-glow { position: absolute; left: 50%; top: 52%; width: 360px; height: 360px; margin: -180px 0 0 -180px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c) 70%, #fff) 0%, transparent 62%); opacity: 0.65; }
.wiz-img, .wiz-svg { position: absolute; left: 0; right: 0; bottom: 56px; margin: 0 auto; width: 240px; height: 270px; filter: drop-shadow(0 10px 18px rgba(40, 20, 10, 0.35)); }
/* 正式素材按原比例显示，魔杖尖的位置才对得上 */
.wiz-img { width: auto; height: 280px; }
.actor.up .wiz-img, .actor.up .wiz-svg { animation: cast 0.9s 0.45s ease-out; }
@keyframes cast { 30% { transform: rotate(-6deg) translateY(-12px); } 60% { transform: rotate(3deg); } }
.actor-tag {
  position: absolute; left: 50%; bottom: 0; z-index: 2; transform: translateX(-50%); white-space: nowrap;
  display: flex; align-items: baseline; gap: 10px; padding: 10px 18px; border-radius: 14px;
  background: #fffaf1; border: 2px solid var(--c);
}
.actor-tag b { font: 800 28px/1 var(--title); color: var(--ink); }
.actor-tag span { font: 800 22px/1 var(--sans); color: var(--cd); }

.actor.small { width: 200px; margin-left: -100px; height: 250px; bottom: 150px; }
.actor.small .wiz-img, .actor.small .wiz-svg { bottom: 0; height: 230px; }
.house-tag {
  position: absolute; bottom: 168px; transform: translateX(-50%); z-index: 35; white-space: nowrap;
  display: flex; align-items: center; gap: 10px; padding: 12px 22px; border-radius: 16px; background: #fffaf1; border: 2px solid var(--c);
  animation: popIn 0.5s cubic-bezier(0.3, 1.5, 0.5, 1) both; transition: opacity 0.4s;
}
.house-tag.out { opacity: 0; }
.house-tag .ic { width: 30px; height: 30px; fill: var(--c); }
.house-tag b { font: 800 30px/1 var(--title); color: var(--ink); }
.house-tag span { font: 800 24px/1 var(--sans); color: var(--cd); }
.gu-list { display: grid; grid-template-columns: repeat(3, 220px); gap: 12px; justify-content: center; margin-top: 26px; }
.gu { padding: 14px 10px; border-radius: 14px; background: rgba(255, 248, 236, 0.94); color: var(--ink); }
.gu b { display: block; font: 800 30px/1.1 var(--title); }
.gu span { display: block; margin-top: 6px; font: 700 19px/1 var(--sans); color: var(--cd); }
.float { position: absolute; z-index: 40; transform: translate(-50%, -50%); font-weight: 900; font-family: var(--sans); pointer-events: none; -webkit-text-stroke: 6px #fffaf1; paint-order: stroke fill; text-shadow: 0 4px 10px rgba(60, 30, 10, 0.3); animation: floatUp 1.5s ease-out forwards; }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, -30%) scale(0.6); } 15% { opacity: 1; transform: translate(-50%, -60%) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -190%) scale(1); } }

/* ---------- 全屏演出 ---------- */
.show { position: absolute; inset: 0; z-index: 80; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 45%, rgba(40, 20, 50, 0.35), rgba(20, 10, 30, 0.82) 75%); opacity: 0; transition: opacity 0.4s; }
.show.in { opacity: 1; }
.rays {
  position: absolute; left: 50%; top: 44%; width: 1800px; height: 1800px; margin: -900px 0 0 -900px; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--c) 55%, transparent) 0deg 7deg, transparent 7deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 0%, transparent 62%); mask: radial-gradient(circle, #000 0%, transparent 62%);
  animation: spin 24s linear infinite; opacity: 0.8;
}
.rays.big { opacity: 1; }
.show.core .rays { opacity: 0.45; }
.show.core { background: radial-gradient(ellipse at 50% 45%, rgba(60, 30, 80, 0.45), rgba(20, 10, 30, 0.85) 75%); }
@keyframes spin { to { transform: rotate(360deg); } }

.lv-card, .core-card, .cup-card { position: relative; text-align: center; color: #fff8ea; }
.show.in .lv-card { animation: popIn 0.7s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
@keyframes popIn { from { transform: scale(0.5) translateY(60px); opacity: 0; } }
.lv-wiz { position: relative; width: 420px; height: 440px; margin: 0 auto -10px; }
.lv-wiz .wiz-img, .lv-wiz .wiz-svg { width: 400px; height: 440px; bottom: 0; }
.lv-wiz .wiz-img { width: auto; }
.lv-kicker { display: inline-flex; align-items: center; gap: 8px; font: 700 24px/1 var(--title); color: var(--cl); }
.lv-kicker .ic { width: 26px; height: 26px; fill: var(--c); }
.lv-name { font: 900 88px/1.1 var(--title); margin-top: 10px; text-shadow: 0 4px 0 var(--cd), 0 0 40px var(--c); }
.lv-title { font: 700 38px/1.2 var(--title); margin-top: 10px; }
.lv-title b { color: #ffe08a; }
.lv-stars { display: flex; justify-content: center; gap: 10px; margin-top: 22px; }
.lv-stars i { width: 40px; height: 40px; }
.lv-stars .ic { width: 100%; height: 100%; fill: rgba(255, 255, 255, 0.22); }
.lv-stars i.on .ic { fill: #ffd34d; filter: drop-shadow(0 0 10px #ffd34d); }

.core-k { font: 700 30px/1 var(--title); color: #ffe7a3; }
.core-t { font: 900 120px/1.15 var(--title); margin: 18px 0; text-shadow: 0 6px 0 #8a5bd6, 0 0 60px #f7c8ff; }
.core-r { font: 700 36px/1.3 var(--title); }
.show.in .core-card { animation: popIn 0.8s cubic-bezier(0.3, 1.5, 0.5, 1) both; }

.cup-k { font: 700 32px/1 var(--title); color: #ffe7a3; }
.cup-trophy { position: relative; width: 340px; height: 360px; margin: 10px auto 0; }
.cup-img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 40px rgba(255, 220, 120, 0.8)); }
.show.in .cup-trophy { animation: cupRise 1.4s cubic-bezier(0.2, 1, 0.3, 1) both; }
@keyframes cupRise { from { transform: translateY(420px) scale(0.6); opacity: 0; } 60% { opacity: 1; } }
.cup-emblem { position: absolute; left: 50%; top: 31%; width: 84px; height: 84px; margin-left: -42px; border-radius: 50%; display: grid; place-items: center; background: var(--c); border: 4px solid #fff3c4; }
.cup-emblem .ic { width: 50px; height: 50px; fill: #fff; }
.cup-win { font: 900 86px/1.15 var(--title); margin-top: 6px; text-shadow: 0 5px 0 var(--cd), 0 0 50px var(--c); }
.show.in .cup-win { animation: popIn 0.7s 0.9s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
.cup-list { display: flex; gap: 14px; justify-content: center; margin-top: 22px; }
.cl { display: flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 14px; background: rgba(255, 248, 236, 0.92); color: var(--cd); }
.cl i { font: 800 18px/1 var(--sans); font-style: normal; }
.cl .ic { width: 24px; height: 24px; fill: var(--c); }
.cl span { font: 700 22px/1 var(--title); }
.cl b { font: 800 26px/1 var(--sans); }
.cup-btns, .core-card .btn-primary { margin-top: 28px; }
.cup-btns { display: flex; gap: 14px; justify-content: center; }
.btn-primary, .btn-ghost { height: 60px; padding: 0 30px; border-radius: 14px; font: 800 24px/1 var(--title); border: 0; }
.btn-primary { background: #ffd34d; color: #5a3400; }
.btn-ghost { background: rgba(255, 255, 255, 0.16); color: #fff8ea; border: 1px solid rgba(255, 255, 255, 0.4); }

/* ---------- 样机工具 ---------- */
.tools { position: absolute; right: 24px; top: 116px; display: flex; flex-direction: column; gap: 8px; opacity: 0.55; transition: opacity 0.2s; z-index: 50; }
.tools:hover { opacity: 1; }
.tools button { height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--paper-line); background: var(--paper); font-size: 17px; font-weight: 700; }
.toast { position: absolute; left: 50%; top: 120px; transform: translateX(-50%); padding: 12px 22px; border-radius: 12px; background: #fffaf1; font-size: 20px; z-index: 90; }

/* ================= v1：新增 ================= */
/* 小巫师容器：按图片原比例，魔杖光、光环、道具按图片定位 */
.wiz { position: absolute; left: 50%; bottom: 56px; transform: translateX(-50%); height: 280px; }
.wiz .wiz-img { position: relative; display: block; height: 100%; width: auto; left: auto; right: auto; bottom: auto; margin: 0; }
.wiz .wiz-svg { position: relative; display: block; width: 240px; height: 270px; left: auto; right: auto; bottom: auto; margin: 0; }
.actor.small .wiz { bottom: 0; height: 230px; }
.wand-glow { position: absolute; width: 70px; height: 70px; margin: -35px 0 0 -35px; border-radius: 50%; background: radial-gradient(circle, #fff 0%, var(--c) 30%, transparent 70%); mix-blend-mode: screen; animation: wandGlow 1.6s ease-in-out infinite; pointer-events: none; }
@keyframes wandGlow { 50% { transform: scale(1.35); opacity: 0.8; } }
.halo { position: absolute; left: 50%; top: 2%; width: 46%; height: 9%; transform: translateX(-30%); border-radius: 50%; border: 5px solid #ffe27a; box-shadow: 0 0 18px #ffd34d, inset 0 0 10px #fff3b0; }
.prop-book { position: absolute; right: -34%; top: 36%; width: 46%; animation: bob 2.6s ease-in-out infinite; filter: drop-shadow(0 6px 10px rgba(40, 20, 10, 0.3)); }
.prop-broom { position: absolute; left: -12%; right: -12%; bottom: -4%; width: 124%; z-index: -1; }
@keyframes bob { 50% { transform: translateY(-10px) rotate(-4deg); } }
.actor-tag em { font: 800 18px/1 var(--sans); font-style: normal; color: #fff; background: #f0a92a; padding: 5px 9px; border-radius: 99px; }
.meteor { position: absolute; left: 0; top: 0; width: 220px; height: 6px; margin: -3px 0 0 -220px; transform-origin: 100% 50%; border-radius: 99px; background: linear-gradient(90deg, transparent, #fff3b0 70%, #fff); box-shadow: 0 0 18px #ffe9a0; z-index: 30; pointer-events: none; }

/* 穹顶星座 */
#sky { position: absolute; inset: 0; width: 1920px; height: 1080px; pointer-events: none; }
#sky .cons polyline { fill: none; stroke: rgba(255, 245, 210, 0.55); stroke-width: 1.6; stroke-dasharray: 4 5; }
#sky .cons circle { fill: #fff6d6; filter: drop-shadow(0 0 6px #ffe6a0); animation: twinkle 3.4s ease-in-out infinite; }
#sky .cons.fresh polyline { stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 2.4s 0.3s ease forwards; stroke: #fff6d6; stroke-width: 2.4; }
@keyframes twinkle { 50% { opacity: 0.45; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.core-glow.tinted { background: radial-gradient(circle, #fff 0%, var(--tint) 30%, transparent 66%); animation: breathe 1.2s ease-in-out infinite; }

/* 全员点亮的灯：只显示亮了几盏 */
.lights { position: absolute; top: 664px; transform: translateX(-50%); display: flex; gap: 4px; pointer-events: none; }
.lights i { width: 8px; height: 8px; border-radius: 50%; background: rgba(90, 60, 30, 0.35); }
.lights i.on { background: var(--c); box-shadow: 0 0 8px var(--c); }
.lights.all i { background: #fff3b0; box-shadow: 0 0 10px var(--c), 0 0 4px #fff; }

/* 学期旗墙：挂在四面学院旗下面 */
.flagcount { position: absolute; top: 590px; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; padding: 4px 12px 4px 8px; border-radius: 99px; background: rgba(255, 249, 238, 0.92); color: var(--cd); font: 800 22px/1 var(--sans); pointer-events: none; }
.flagcount .fl { width: 22px; height: 22px; color: var(--c); }

/* 名牌 */
.dock-empty { grid-column: 1 / -1; display: grid; place-items: center; border-radius: 16px; background: var(--paper); font: 700 24px/1.5 var(--title); color: var(--ink-2); padding: 0 40px; text-align: center; }
.chip .cb { position: absolute; top: -8px; right: -6px; line-height: 0; }
.chip.picked, .chip.picked:hover { background: var(--c) !important; color: #fff; box-shadow: 0 0 0 3px #fff inset, 0 6px 14px rgba(60, 30, 10, 0.25); transform: translateY(-3px); }
.chip.badge-pop .cb { animation: badgePop 1.1s ease-out; }
@keyframes badgePop { 30% { transform: scale(2.2) rotate(-12deg); } }
.chip.lv-pop { animation: lvPop 1.4s ease-out; }
@keyframes lvPop { 20% { transform: translateY(-10px) scale(1.12); box-shadow: 0 0 0 4px var(--c), 0 0 30px var(--c); } }
.chips { gap: 5px; }

/* 多选条、撤回条 */
.multibar { position: absolute; left: 50%; bottom: 186px; transform: translateX(-50%); z-index: 55; display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 22px; border-radius: 16px; background: #fffaf1; border: 2px solid var(--gold); font: 700 22px/1 var(--sans); }
.multibar button { height: 50px; padding: 0 22px; border-radius: 12px; border: 0; font: 800 20px/1 var(--sans); background: #f1ece6; }
.multibar .mb-go { background: #ffd34d; color: #5a3400; }
.multibar .mb-go:disabled { opacity: 0.45; }
.undo { position: absolute; left: 50%; top: 116px; transform: translateX(-50%); z-index: 54; display: flex; align-items: center; gap: 16px; padding: 10px 10px 10px 20px; border-radius: 14px; background: rgba(60, 38, 24, 0.9); color: #fff8ea; font: 600 19px/1 var(--sans); }
.undo button { height: 44px; padding: 0 18px; border: 0; border-radius: 10px; background: #ffd34d; color: #5a3400; font: 800 18px/1 var(--sans); }

/* 右上工具 */
.tools { opacity: 0.8; align-items: flex-end; }
.tools .t-main { background: #ffd34d; border-color: transparent; color: #5a3400; }
.tools button.on { background: #5a3400; color: #fff; }
.tools-note { max-width: 220px; padding: 8px 12px; border-radius: 12px; background: rgba(255, 248, 236, 0.85); font-size: 15px; line-height: 1.4; color: var(--ink-2); text-align: right; }
.tools-note:empty { display: none; }

/* 加分菜单 v1 */
.pop { flex-direction: column; align-items: stretch; gap: 10px; padding: 14px; width: 640px; }
.pop-head { display: flex; align-items: center; gap: 12px; }
.pop-head b { font: 800 24px/1.2 var(--title); }
.pop-head span { color: var(--ink-2); font-size: 16px; }
.pop-prof { margin-left: auto; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--paper-line); background: #fff; font: 700 16px/1 var(--sans); }
.pop .pop-plus { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pop .pop-plus button { width: auto; height: 84px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: #fff3d6; border-radius: 12px; position: relative; }
.pop .pop-plus button span { font: 700 17px/1 var(--sans); color: var(--ink); }
.pop .pop-plus button em { position: absolute; top: 6px; right: 8px; font: 800 14px/1 var(--sans); font-style: normal; color: var(--gold-deep); }
.pop .pop-plus button b { font: 800 30px/1 var(--sans); color: var(--gold-deep); }
.pop-minus { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 8px; border-top: 1px dashed var(--paper-line); }
.pop-minus span { width: 100%; font-size: 14px; color: var(--ink-2); }
.pop .pop-minus button { width: auto; height: 40px; padding: 0 14px; border-radius: 10px; background: #f1ece6; color: #7a6a5c; font: 600 16px/1 var(--sans); flex-direction: row; }

/* 升级 */
.lv-wiz .wiz { position: relative; left: auto; bottom: auto; transform: none; height: 440px; margin: 0 auto; display: inline-block; }
.lv-wiz { width: auto; height: 440px; text-align: center; }
.lv-unlock { margin-top: 14px; font: 700 26px/1.3 var(--sans); color: #ffe7a3; }

/* 周五颁奖 / 入学揭晓 */
.show.cer { background: radial-gradient(ellipse at 50% 40%, rgba(50, 25, 70, 0.78), rgba(15, 8, 25, 0.94) 75%); }
.cer { position: relative; width: 1920px; height: 1080px; display: flex; flex-direction: column; align-items: center; padding-top: 70px; color: #fff8ea; }
.cer-title { font: 800 40px/1 var(--title); color: #ffe7a3; letter-spacing: 4px; }
.cer-body { position: relative; flex: 1; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.cer-skip { position: absolute; right: 40px; top: 40px; height: 48px; padding: 0 22px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.12); color: #fff8ea; font: 700 20px/1 var(--sans); }
.cer-count { font: 900 260px/1 var(--title); color: #ffe7a3; text-shadow: 0 0 60px #ffcf55; animation: popIn 0.5s cubic-bezier(0.3, 1.5, 0.5, 1); }
.cer-sub { font: 800 56px/1.2 var(--title); margin-bottom: 40px; animation: popIn 0.6s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
.cer-note { margin-top: 30px; font: 600 24px/1 var(--sans); color: rgba(255, 248, 234, 0.75); }
.cer-lit { display: flex; gap: 20px; }
.cl.big { padding: 18px 26px; gap: 12px; }
.cl.big b { font: 800 26px/1 var(--sans); }
.race { display: flex; gap: 90px; align-items: flex-end; height: 620px; }
.race-col { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.race-tube { position: relative; width: 120px; height: 480px; border-radius: 60px 60px 18px 18px; background: rgba(255, 255, 255, 0.1); border: 3px solid rgba(255, 255, 255, 0.35); overflow: hidden; }
.race-tube i { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: linear-gradient(180deg, var(--cl), var(--c) 20%, var(--cd)); box-shadow: 0 0 40px var(--c); }
.race-col b { font: 900 64px/1 var(--sans); font-variant-numeric: tabular-nums; }
.race-col span { display: flex; align-items: center; gap: 6px; font: 800 28px/1 var(--title); color: var(--cl); }
.race-col .ic { width: 30px; height: 30px; fill: var(--c); }
.cup-flags { display: flex; gap: 14px; justify-content: center; margin-top: 22px; }
.cf { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 14px; background: rgba(255, 248, 236, 0.94); color: var(--cd); }
.cf .ic { width: 26px; height: 26px; fill: var(--c); }
.cf span { font: 700 22px/1 var(--title); }
.cf b { font: 800 22px/1 var(--sans); }
.cf em { font-style: normal; font-size: 17px; color: #8a7b6c; }
.cup-trophy img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 40px rgba(255, 220, 120, 0.8)); }
.prog { display: flex; gap: 40px; }
.pg { width: 300px; display: flex; flex-direction: column; align-items: center; padding: 20px 10px 22px; border-radius: 20px; background: rgba(255, 248, 236, 0.1); border: 2px solid var(--c); animation: popIn 0.7s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
.pg:nth-child(2) { animation-delay: 0.15s; } .pg:nth-child(3) { animation-delay: 0.3s; } .pg:nth-child(4) { animation-delay: 0.45s; }
.pg-wiz { position: relative; height: 300px; width: 100%; }
.pg-wiz .wiz { height: 300px; bottom: 0; }
.pg b { font: 900 44px/1.2 var(--title); margin-top: 10px; }
.pg span { display: flex; align-items: center; gap: 6px; font: 700 22px/1 var(--title); color: var(--cl); }
.pg .ic { width: 24px; height: 24px; fill: var(--c); }
.lucky { display: flex; gap: 40px; }
.lk { --c: #ffd34d; width: 340px; height: 160px; display: grid; place-items: center; border-radius: 24px; border: 3px dashed rgba(255, 255, 255, 0.4); font: 900 60px/1 var(--title); }
.lk.done { border: 4px solid var(--c); background: rgba(255, 255, 255, 0.08); box-shadow: 0 0 50px var(--c); animation: popIn 0.5s cubic-bezier(0.3, 1.5, 0.5, 1); }
.cer-end { display: flex; gap: 18px; }
.rv { display: flex; flex-direction: column; align-items: center; }
.rv-h { display: flex; align-items: center; gap: 16px; font: 900 80px/1 var(--title); color: var(--cl); text-shadow: 0 0 40px var(--c); animation: popIn 0.6s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
.rv-h .ic { width: 80px; height: 80px; fill: var(--c); }
.rv-names { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 22px; max-width: 1400px; margin-top: 46px; }
.rv-names span { padding: 12px 24px; border-radius: 14px; background: rgba(255, 248, 236, 0.94); color: var(--cd); font: 800 34px/1 var(--title); animation: dropIn 0.6s cubic-bezier(0.3, 1.4, 0.5, 1) both; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-260px) scale(0.4); } }

/* 个人档案 */
.show.profile { background: radial-gradient(ellipse at 50% 45%, rgba(40, 20, 50, 0.6), rgba(20, 10, 30, 0.88) 75%); }
.prof { display: flex; gap: 60px; align-items: center; width: 1500px; padding: 50px 60px; border-radius: 28px; background: #fffaf1; color: var(--ink); animation: popIn 0.6s cubic-bezier(0.3, 1.4, 0.5, 1) both; }
.prof-l { position: relative; width: 460px; height: 560px; border-radius: 22px; background: radial-gradient(circle at 50% 60%, var(--cl), #fff 70%); }
.prof-wiz .wiz { height: 480px; bottom: 30px; }
.prof-r { flex: 1; }
.prof-k { display: flex; align-items: center; gap: 8px; font: 700 26px/1 var(--title); color: var(--cd); }
.prof-k .ic { width: 30px; height: 30px; fill: var(--c); }
.prof-name { font: 900 84px/1.15 var(--title); margin: 8px 0; }
.prof-lv { display: flex; align-items: baseline; gap: 18px; }
.prof-lv b { font: 800 40px/1 var(--title); color: var(--cd); }
.prof-lv span { font-size: 22px; color: var(--ink-2); }
.prof-bal { margin-top: 14px; font-size: 22px; color: var(--ink-2); }
.prof-bal b { font: 800 30px/1 var(--sans); color: var(--gold-deep); }
.prof-sec { margin: 26px 0 12px; font: 800 24px/1 var(--title); }
.prof-badges { display: flex; flex-wrap: wrap; gap: 14px; }
.pb { display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 10px; border-radius: 14px; background: #fff3d6; }
.pb b { font: 800 22px/1.2 var(--title); display: block; }
.pb span { font-size: 16px; color: var(--ink-2); }
.pb > div, .pb b + span { display: block; }
.prof-top { margin-top: 22px; font-size: 24px; }
.prof-top b { color: var(--cd); }
.prof-recent { display: flex; flex-wrap: wrap; gap: 10px; }
.prof-recent span { padding: 8px 16px; border-radius: 99px; background: color-mix(in srgb, var(--cl) 55%, #fff); color: var(--cd); font: 700 20px/1 var(--sans); }

/* 轻量模式：去掉模糊和大光晕 */
body.lite .topbar, body.lite .grp { backdrop-filter: none; background: rgba(255, 248, 236, 0.96); }
body.lite .col-bubbles, body.lite .rays { animation: none; }
body.lite .actor-glow, body.lite .core-glow { display: none; }

/* ================= v1.1：挑选 / 事件 / 特权 / 旗墙装饰 ================= */
.pet { position: absolute; right: -30%; bottom: 2%; width: 42%; filter: drop-shadow(0 6px 10px rgba(40, 20, 10, 0.3)); animation: bob 2.2s ease-in-out infinite; }
.wiz.full .pet { right: -38%; width: 46%; }
.prop-broom.big { left: -18%; right: -18%; width: 136%; bottom: -10%; }
.chip .pend { position: absolute; top: -9px; left: -6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #ff7ac0; color: #fff; font: 800 13px/1 var(--sans); box-shadow: 0 0 10px #ff9fd3; animation: wandGlow 1.6s ease-in-out infinite; }
.pop-pick { height: 40px; padding: 0 14px; border-radius: 10px; border: 0; background: #ffe0f2; color: #b0287a; font: 800 16px/1 var(--sans); }

.strip { position: absolute; left: 24px; top: 108px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.strip .st { display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 12px; border-radius: 12px; background: rgba(255, 248, 236, 0.9); font-size: 17px; color: var(--ink-2); max-width: 520px; }
.strip .st b { font: 800 18px/1 var(--title); color: var(--ink); white-space: nowrap; }
.strip .st.ev b { color: #7a4fd0; }
.strip .st.ev::before { content: "✦"; color: #9b6cf0; font-size: 18px; }
.strip .st.pv { background: color-mix(in srgb, var(--c) 22%, #fff8ec); }
.strip .st.pv b { color: var(--cd); }
.strip .st.pv .fl { width: 20px; height: 20px; color: var(--c); flex: none; }
.strip .st span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 旗墙解锁的水晶柱装饰 */
.col-badge.deco1 { box-shadow: 0 0 0 3px #ffd34d, 0 0 14px rgba(255, 210, 80, 0.7); }
.col.deco2::before { content: ""; position: absolute; left: 50%; top: -100px; width: 46px; height: 26px; margin-left: -23px; background: linear-gradient(180deg, #fff6c8, #ffd34d 60%, #e0a420); clip-path: polygon(0 100%, 0 30%, 22% 60%, 50% 0, 78% 60%, 100% 30%, 100% 100%); filter: drop-shadow(0 0 8px #ffd34d); z-index: 2; }
.col.deco3 .col-in::after { content: ""; position: absolute; inset: -6px; border-radius: 6px; box-shadow: 0 0 22px 6px color-mix(in srgb, var(--c) 70%, #fff); }
.col.deco3::after { opacity: 0.75; }
.col.deco3 { animation: decoRing 3s linear infinite; }
@keyframes decoRing { 50% { filter: drop-shadow(0 0 16px var(--c)); } }

/* 挑选 */
.choose { position: relative; text-align: center; color: #fff8ea; }
.show.in .choose { animation: popIn 0.6s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
.ch-title { margin: 14px 0 40px; font: 700 44px/1.2 var(--title); }
.ch-title b { font-size: 64px; color: #ffe7a3; }
.ch-row { display: flex; gap: 30px; justify-content: center; }
.ch { width: 300px; height: 330px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; border-radius: 26px; border: 3px solid rgba(255, 255, 255, 0.35); background: rgba(255, 248, 236, 0.12); color: #fff8ea; transition: transform 0.25s, opacity 0.3s, border-color 0.2s; }
.ch:hover { transform: translateY(-8px); border-color: var(--c); }
.ch b { font: 800 34px/1 var(--title); }
.ch-art { height: 200px; display: grid; place-items: center; }
.ch-art img { max-width: 210px; max-height: 200px; }
.ch-art img.wide { max-width: 260px; }
.ch-wand { width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, #fff 0%, var(--w) 35%, transparent 70%); box-shadow: 0 0 60px var(--w); animation: wandGlow 1.6s ease-in-out infinite; }
.ch.picked { transform: scale(1.1); border-color: #ffe7a3; background: rgba(255, 248, 236, 0.25); box-shadow: 0 0 60px var(--c); }
.ch.dim { opacity: 0.25; }
.ch-later { margin-top: 36px; }

/* 事件 / 访客 / 冠军特权 */
.evcard { position: relative; text-align: center; color: #fff8ea; }
.show.in .evcard { animation: popIn 0.7s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
.ev-name { display: flex; align-items: center; justify-content: center; gap: 16px; font: 900 120px/1.15 var(--title); margin: 18px 0; text-shadow: 0 6px 0 #6b45c8, 0 0 60px #d9c2ff; }
.ev-name .ic { width: 100px; height: 100px; fill: #fff3c4; }
.priv { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 40px 70px; border-radius: 26px; background: rgba(255, 248, 236, 0.95); color: var(--cd); animation: popIn 0.6s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
.priv .ic { width: 80px; height: 80px; fill: var(--c); }
.priv b { font: 900 56px/1 var(--title); }
.priv span { font: 800 40px/1.2 var(--title); color: var(--ink); }

.show.choice { background: radial-gradient(ellipse at 50% 45%, rgba(50, 25, 70, 0.75), rgba(15, 8, 25, 0.92) 75%); }
.ch-art .ph { width: 130px; height: 130px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.5), rgba(255,255,255,.08) 70%); }
