.reward-chest-dialog {
  --chest-primary: #ffe46b;
  --chest-secondary: #ffb856;
  --chest-glow: rgb(255 200 80 / 45%);
  --chest-particle-glow: rgb(255 220 100 / 90%);
  width: min(54rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 1px solid rgb(161 194 235 / 30%);
  border-radius: 1.6rem;
  overflow: auto;
  overscroll-behavior: contain;
  color: #edf6ff;
  background: radial-gradient(ellipse at 50% 40%, #15263f, #0a1020 65%);
  box-shadow: 0 2rem 8rem #000a, inset 0 1px 0 #ffffff16;
  font-family: "Space Grotesk", system-ui, sans-serif;
}
.halle-personnel-dialog { width:min(30rem, calc(100vw - 2rem)); padding:2rem; border:1px solid #c9d5d0; border-radius:1rem; }
.halle-personnel-dialog::backdrop { background:#091713aa; }
.halle-personnel-dialog label { display:block; margin-bottom:1rem; }
.halle-personnel-dialog .btn { margin:.4rem .2rem 0 0; }
.reward-chest-dialog[data-variant="crystal"] {
  --chest-primary: #8ee7ff;
  --chest-secondary: #c1a0ff;
  --chest-glow: rgb(92 214 255 / 42%);
  --chest-particle-glow: rgb(142 231 255 / 90%);
}
.reward-chest-dialog::backdrop { background: rgb(3 8 18 / 80%); backdrop-filter: blur(9px); }
.reward-chest-shell { position: relative; isolation: isolate; padding: 2rem 2rem 1.7rem; text-align: center; overflow: hidden; }
.reward-chest-close {
  position: absolute; top: .5rem; right: .5rem; z-index: 4;
  width: 2.8rem; height: 2.8rem; border: 0; border-radius: 50%;
  background: #ffffff0d; color: #d4e3f4; font: 1.7rem/1 system-ui;
}
.reward-chest-eyebrow { color: var(--chest-primary); font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; margin: 0 2rem .6rem; }
.reward-chest-header h2 { margin: 0 1rem .5rem; font-size: clamp(1.6rem, 4vw, 2.6rem); font-weight: 700; overflow-wrap: anywhere; }
.reward-chest-header > p:last-child { color: #a9bbd4; font-size: .95rem; margin: 0; }
.reward-chest-stage {
  position: relative; isolation: isolate; display: grid; place-items: center;
  height: clamp(17rem, 40vh, 27rem); margin: .8rem 0 .6rem;
}
.reward-chest-stage::before {
  content: ""; position: absolute; z-index: -1; top: 20%;
  width: 80%; height: 90%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(ellipse, var(--chest-glow), transparent 68%);
  filter: blur(4px); animation: rewardChestAmbient 1500ms ease-in-out infinite alternate;
}
.reward-chest-stage::after {
  content: ""; position: absolute; z-index: -1; top: 45%;
  width: 10.5rem; height: 10.5rem; border: .3rem solid var(--chest-primary);
  border-radius: 50%; opacity: 0; pointer-events: none;
  box-shadow: 0 0 2rem var(--chest-glow), inset 0 0 1rem var(--chest-glow);
}
.reward-chest-button {
  position: relative; display: grid; place-items: center; height: 100%; width: min(100%, 29rem); min-height: 0; min-width: 0;
  border: 0; border-radius: 2rem; padding: 0; background: transparent; cursor: pointer;
  animation: rewardChestArrival 600ms cubic-bezier(.2,1.2,.2,1) both;
  -webkit-tap-highlight-color: transparent;
}
.reward-chest-button img {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain;
  aspect-ratio: 1; pointer-events: none; user-select: none;
  filter: drop-shadow(0 .9rem 1.4rem #0008);
  animation: rewardChestFloat 1800ms ease-in-out 650ms infinite alternate;
}
.reward-chest-dialog button:focus-visible { outline: 3px solid var(--chest-primary); outline-offset: 4px; }
.reward-chest-stage.is-charging::before { animation: rewardChestPressureBuild 700ms cubic-bezier(.35,0,.65,1) both; }
.reward-chest-stage.is-bursting::after { animation: rewardChestShockwave 600ms ease-out both; }
.reward-chest-stage.is-bursting { animation: rewardChestRecoil 300ms ease-out both; }
.reward-chest-button.is-charging { animation: rewardChestPressure 700ms linear both; }
.reward-chest-button.is-bursting { animation: rewardChestBurst 260ms cubic-bezier(.18,1.35,.35,1) both; }
.reward-chest-button.is-open { animation: none; cursor: default; transform: none; }
.reward-chest-button.is-charging img, .reward-chest-button.is-bursting img, .reward-chest-button.is-open img { animation: none; }
.reward-chest-stage.is-open::before { animation: none; opacity: .8; transform: none; }
.reward-chest-prompt { margin: .4rem 0 1rem; color: #afc5df; font-size: .9rem; }
.reward-chest-reveal { position: relative; border-top: 1px solid #ffffff18; padding-top: 1rem; }
.reward-chest-reveal[hidden] { display: none; }
.reward-chest-reveal.is-revealed { animation: rewardChestReveal 520ms cubic-bezier(.18,1.35,.35,1) both; }
.reward-chest-value { margin: 0 0 .4rem; color: var(--chest-primary); font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700; text-shadow: 0 0 2rem var(--chest-glow); }
.reward-chest-caption { color: #b8cbe1; margin: 0 0 .8rem; font-size: .9rem; }
.reward-chest-details { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; list-style: none; padding: 0; margin: 0; }
.reward-chest-details li { border: 1px solid #ffffff16; border-radius: .6rem; background: #ffffff08; padding: .45rem .8rem; font-size: .88rem; overflow-wrap: anywhere; }
.reward-chest-status { margin: .75rem 0 .3rem; color: #bed3ed; font-size: .8rem; }
.reward-chest-next, .reward-chest-retry { min-height: 44px; padding: .7rem 1.5rem; margin: .6rem .3rem 0; border-radius: .7rem; font-weight: 700; }
.reward-chest-next { border: 0; background: var(--chest-primary); color: #071220; box-shadow: 0 0 1.8rem var(--chest-glow); }
.reward-chest-retry { border: 1px solid #9ba9c0; color: #edf6ff; background: transparent; }
.reward-chest-particles { position: absolute; z-index: 2; inset: 0; pointer-events: none; transform:scale(1.4); transform-origin:50% 55%; }
.reward-chest-particles span {
  position: absolute; top: 55%; left: 50%; opacity: 0;
  width: var(--particle-size, .55rem); height: var(--particle-size, .55rem); border-radius: 50%;
  background: var(--particle-color, var(--chest-primary)); box-shadow: 0 0 18px var(--chest-particle-glow);
}
.reward-chest-stage.is-bursting .reward-chest-particles span { animation: rewardChestParticle 900ms cubic-bezier(.12,.72,.2,1) var(--particle-delay,0ms) both; }
.reward-chest-particles .reward-chest-star { border-radius: 0; clip-path: polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 94%,50% 72%,21% 94%,32% 57%,2% 35%,39% 35%); }
.reward-chest-particles span:nth-child(even) { --particle-color: var(--chest-secondary); }
.reward-chest-particles span:nth-child(1) { --particle-x:-8.8rem; --particle-y:-4.8rem; --particle-rotation:-130deg; --particle-delay:0ms; }
.reward-chest-particles span:nth-child(2) { --particle-x:-5.5rem; --particle-y:-7.8rem; --particle-rotation:95deg; --particle-delay:45ms; --particle-size:.85rem; }
.reward-chest-particles span:nth-child(3) { --particle-x:-1.9rem; --particle-y:-9rem; --particle-rotation:-70deg; --particle-delay:90ms; }
.reward-chest-particles span:nth-child(4) { --particle-x:3.2rem; --particle-y:-8.5rem; --particle-rotation:140deg; --particle-delay:20ms; --particle-size:.75rem; }
.reward-chest-particles span:nth-child(5) { --particle-x:7.4rem; --particle-y:-6.1rem; --particle-rotation:210deg; --particle-delay:75ms; }
.reward-chest-particles span:nth-child(6) { --particle-x:9.3rem; --particle-y:-2.1rem; --particle-rotation:-115deg; --particle-delay:120ms; --particle-size:.9rem; }
.reward-chest-particles span:nth-child(7) { --particle-x:8.5rem; --particle-y:3.3rem; --particle-rotation:165deg; --particle-delay:35ms; }
.reward-chest-particles span:nth-child(8) { --particle-x:5.1rem; --particle-y:6.4rem; --particle-rotation:-190deg; --particle-delay:145ms; --particle-size:.8rem; }
.reward-chest-particles span:nth-child(9) { --particle-x:1.6rem; --particle-y:7.2rem; --particle-rotation:105deg; --particle-delay:80ms; }
.reward-chest-particles span:nth-child(10) { --particle-x:-3.6rem; --particle-y:6.8rem; --particle-rotation:-155deg; --particle-delay:125ms; --particle-size:.85rem; }
.reward-chest-particles span:nth-child(11) { --particle-x:-7.5rem; --particle-y:4.6rem; --particle-rotation:175deg; --particle-delay:55ms; }
.reward-chest-particles span:nth-child(12) { --particle-x:-9.4rem; --particle-y:.2rem; --particle-rotation:-95deg; --particle-delay:165ms; --particle-size:.75rem; }
.reward-chest-particles span:nth-child(13) { --particle-x:-5.9rem; --particle-y:-2.5rem; --particle-rotation:135deg; --particle-delay:180ms; }
.reward-chest-particles span:nth-child(14) { --particle-x:6.1rem; --particle-y:.6rem; --particle-rotation:-145deg; --particle-delay:195ms; --particle-size:.7rem; }
@keyframes rewardChestArrival { from { opacity:0; transform:translateY(4rem) scale(.72) rotate(-5deg); } to { opacity:1; transform:none; } }
@keyframes rewardChestFloat { from { transform:translateY(0) scale(.98) rotate(-.5deg); } to { transform:translateY(-.45rem) scale(1.02) rotate(.5deg); } }
@keyframes rewardChestAmbient { from { transform:scale(.92); opacity:.65; } to { transform:scale(1.08); opacity:1; } }
@keyframes rewardChestPressure {
  0% { transform:translate(0,0) scale(1); } 14% { transform:translate(-.08rem,0) rotate(-.5deg) scale(1.002); }
  28% { transform:translate(.1rem,-.02rem) rotate(.7deg) scale(1.008); } 42% { transform:translate(-.16rem,.03rem) rotate(-1deg) scale(1.015); }
  54% { transform:translate(.2rem,-.04rem) rotate(1.4deg) scale(1.025); } 65% { transform:translate(-.28rem,.03rem) rotate(-1.8deg) scale(1.035); }
  75% { transform:translate(.34rem,-.06rem) rotate(2.3deg) scale(1.045); } 84% { transform:translate(-.4rem,.05rem) rotate(-2.8deg) scale(1.055); }
  92% { transform:translate(.35rem,.08rem) rotate(2.2deg) scale(1.02,1.08); } 100% { transform:translateY(.18rem) rotate(0) scale(1.08,.9); }
}
@keyframes rewardChestBurst { 0% { transform:translateY(.18rem) scale(1.08,.9); } 52% { transform:translateY(-.7rem) scale(1.15,1.12) rotate(-1.5deg); } 78% { transform:translateY(.08rem) scale(.97,1.03) rotate(.7deg); } 100% { transform:none; } }
@keyframes rewardChestPressureBuild { 0% { transform:scale(.92); opacity:.72; filter:blur(3px); } 70% { transform:scale(1.12); opacity:1; filter:blur(1px); } 100% { transform:scale(.82); opacity:1; filter:blur(0); } }
@keyframes rewardChestShockwave { from { opacity:.9; transform:scale(.45); } to { opacity:0; transform:scale(2.25); } }
@keyframes rewardChestRecoil { 0%,100% { transform:translateY(0); } 35% { transform:translateY(.35rem); } 70% { transform:translateY(-.18rem); } }
@keyframes rewardChestParticle { 0% { opacity:0; transform:translate(-50%,-50%) scale(.2) rotate(0); } 18%,72% { opacity:1; } 100% { opacity:0; transform:translate(calc(-50% + var(--particle-x)),calc(-50% + var(--particle-y))) scale(1.3) rotate(var(--particle-rotation)); } }
@keyframes rewardChestReveal { 0% { opacity:0; transform:translateY(1rem) scale(.72); } 65% { opacity:1; transform:translateY(-.12rem) scale(1.04); } 100% { opacity:1; transform:none; } }
@media (max-width: 480px) {
  .reward-chest-dialog { width:calc(100vw - 1rem); max-height:calc(100dvh - 1rem); border-radius:1rem; }
  .reward-chest-shell { padding:2rem .9rem 1.2rem; }
  .reward-chest-stage { height:17rem; }
  .reward-chest-details { flex-direction:column; }
}
@media (prefers-reduced-motion: reduce) {
  .reward-chest-stage::after, .reward-chest-particles { display:none !important; }
  .reward-chest-stage, .reward-chest-stage::before, .reward-chest-button, .reward-chest-button img, .reward-chest-reveal.is-revealed { animation:none !important; transition:none !important; }
}
