/* v1.9b 小 Boss 扭蛋（2026-10-10 用户）：开出来的东西排在扭蛋上方（#mg-layer，盖在画布上、不挡点击）；
 *   骰面类是 3D 骰子（沿用强化卡的 .upgrade-die-tile / .pcr-ring / .pcr-plus），其他是图标 + 文字；
 *   右上角金币下面的“质变令 N”金币（有质变令才显示）。 */
.mg-layer{position:absolute;inset:0;z-index:32;pointer-events:none;overflow:hidden}
.mg-loot{position:absolute;display:flex;flex-direction:column;align-items:center;gap:4px;padding-top:14px;width:max-content;max-width:calc(100% - 8px);pointer-events:none}
.mg-chips{display:flex;flex-wrap:wrap;justify-content:center;gap:4px;max-width:290px;margin-top:-1px}
.mg-chip{padding:2px 7px 3px;border-radius:10px;background:rgba(42,16,6,.84);border:1.5px solid #e6ecf5;color:#fff3c4;font:900 12px/1.15 GameLabel,"PingFang SC","Microsoft YaHei",sans-serif;white-space:nowrap;box-shadow:0 2px 3px rgba(0,0,0,.35)}
.mg-blue .mg-chip{border-color:#5ab4ff}
.mg-purple .mg-chip{border-color:#b76cff}
.mg-gold .mg-chip{border-color:#ffd34a;color:#ffe97a}
.mg-rainbow .mg-chip{border-color:#ff9ad0;color:#ffe97a;background:linear-gradient(90deg,rgba(70,18,54,.88),rgba(42,16,6,.88),rgba(18,40,70,.88))}
.mg-tiles{display:grid;grid-template-columns:repeat(var(--mg-cols,5),auto);gap:6px;justify-content:center}
.upgrade-die-tile.mg-tile{position:relative;width:var(--pcr-tile,44px);height:var(--pcr-tile,44px)}
.mg-tile .pcr-plus{font-size:18px;top:-6px}
.mg-tile .pcr-plus.big{font-size:22px}
.mg-tile.upgrade-die-mystery:not(.has-die-model)>.upgrade-die-number{font-size:22px}
.mg-items{display:flex;gap:9px;justify-content:center;align-items:flex-end}
.mg-item{display:flex;flex-direction:column;align-items:center;gap:1px}
.mg-item-icon{width:34px;height:34px;object-fit:contain;filter:drop-shadow(0 2px 2px rgba(0,0,0,.45))}
.mg-loot.is-big .mg-item-icon{width:40px;height:40px}
.mg-item-label{font:900 13px/1.1 GameLabel,"PingFang SC","Microsoft YaHei",sans-serif;color:#ffe9a0;-webkit-text-stroke:4px #2a1006;paint-order:stroke fill;white-space:nowrap}
.mg-loot.is-big .mg-item-label{font-size:15px;color:#fff1a8}

/* 质变令（v1.10，10-10 用户：和金币长一样，旁边只写一个数字）：紧挨在右上角金币下面，图标 + 数字横排，字体、大小、颜色照抄金币 */
#game-container #battle-screen .battle-hud>.key-token-hud{position:absolute;top:calc(var(--game-safe-top,0px) + 1px + var(--hud-control,44px)/2 + var(--hud-meta,14px)*0.68);right:calc(var(--hud-control,44px) + 20px);
  width:var(--hud-gold-width);height:calc(var(--hud-meta,14px)*1.35);z-index:3;display:flex;align-items:center;justify-content:flex-end;gap:5px;min-width:0;pointer-events:none;
  font-size:var(--hud-meta,14px);line-height:1.3;color:#fff0b9;text-shadow:0 1px 2px #33200d,0 0 3px #33200d}
#game-container #battle-screen .battle-hud>.key-token-hud[hidden]{display:none}
#game-container #battle-screen .key-token-hud img{display:block;flex:none;width:calc(var(--hud-meta,14px)*1.2);height:calc(var(--hud-meta,14px)*1.2);object-fit:contain;image-rendering:pixelated}
#game-container #battle-screen .key-token-hud #key-token-count{overflow:hidden;white-space:nowrap;font-family:var(--font-ui-number)!important;font-weight:800!important;font-style:normal;font-variant-numeric:tabular-nums;letter-spacing:0}
.key-token-hud.is-empty img{opacity:.5}
.key-token-hud.is-empty #key-token-count{visibility:hidden}
.key-token-hud.is-bump img{animation:kth-bump .55s cubic-bezier(.2,1.6,.4,1)}
@keyframes kth-bump{0%{transform:scale(1)}35%{transform:scale(1.35) rotate(-8deg);filter:drop-shadow(0 0 8px #ffd34a) brightness(1.3)}100%{transform:scale(1)}}
@media (prefers-reduced-motion:reduce){.key-token-hud.is-bump img{animation:none}}
/* HUD 上弹的“+N”：经验条、金币在最顶上，往下弹 */
.mm-gold.mg-pop.mg-below{top:calc(100% + 16px)}
/* v1.30a 扭蛋连环：最后蹦出来的那颗扭蛋——图标更大、带档次色光、“再来一颗！”金字；蹦出时一圈白光 */
.mg-item.mg-item-chain{position:relative;margin-left:4px}
.mg-item.mg-item-chain .mg-item-icon{width:46px;height:46px;object-fit:contain;filter:drop-shadow(0 0 6px rgba(255,255,255,.9)) drop-shadow(0 2px 2px rgba(0,0,0,.45))}
.mg-item.mg-chain-blue .mg-item-icon{filter:drop-shadow(0 0 7px rgba(90,180,255,.95)) drop-shadow(0 2px 2px rgba(0,0,0,.45))}
.mg-item.mg-chain-purple .mg-item-icon{filter:drop-shadow(0 0 7px rgba(190,110,255,.95)) drop-shadow(0 2px 2px rgba(0,0,0,.45))}
.mg-item.mg-chain-gold .mg-item-icon{filter:drop-shadow(0 0 8px rgba(255,205,70,.95)) drop-shadow(0 2px 2px rgba(0,0,0,.45))}
.mg-item.mg-item-chain .mg-item-label{font-size:14px;color:#fff3a0;-webkit-text-stroke:4px #5a1a06}
.mg-chain-burst{position:absolute;left:50%;top:40%;width:44px;height:44px;border-radius:50%;pointer-events:none;
  background:radial-gradient(circle,rgba(255,255,255,.95) 0 30%,rgba(255,240,180,.6) 45%,rgba(255,255,255,0) 70%);mix-blend-mode:screen}
