/* Full-screen painted celebrations (quest, level-up, loot/badge, boss).
   Backdrop, confetti, chest and icons come from the painted set. Copy is live HTML so it can be EN/ES.
   Phone first (390×844). Motion turns off under prefers-reduced-motion. */
.aqc,.lu-ov{position:fixed;inset:0;z-index:9999;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;
  padding:calc(10px + env(safe-area-inset-top)) 14px calc(12px + env(safe-area-inset-bottom));box-sizing:border-box;
  background:#14203f;color:#fff8e8;text-align:center;cursor:pointer;overflow:hidden;
  font-family:Nunito,"Trebuchet MS",sans-serif}
body:has(.aqc),body:has(.lu-ov){overflow:hidden}
.aqc-bg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 38%;z-index:0;pointer-events:none}
.aqc-bit{position:absolute;z-index:1;width:54px;height:auto;pointer-events:none;top:-8%;
  animation:aqc-fall 3.2s linear infinite;animation-delay:calc(var(--i) * -.7s)}
@keyframes aqc-fall{to{transform:translateY(78vh) rotate(18deg)}}
.aqc,.aqc *,.lu-ov,.lu-ov *{box-sizing:border-box}
.aqc-stack{position:relative;z-index:2;display:flex;flex-direction:column;align-items:center;width:min(100%,420px);flex:1;min-height:0;
  overflow:auto;scrollbar-gutter:stable;overflow-wrap:anywhere}
.aqc-title{margin-top:4vh;width:100%;max-width:340px;min-height:84px;display:flex;align-items:center;justify-content:center;
  padding:18px 46px 22px;background-position:center;background-size:100% 100%;background-repeat:no-repeat;
  color:#3b2415;font-weight:900;font-size:clamp(16px,4.7vw,22px);line-height:1.05;letter-spacing:.2px;text-wrap:balance}
.aqc-title span{background:#fff3d6;color:#3b2415;font-weight:900;border-radius:8px;padding:2px 8px;line-height:1.15;
  box-decoration-break:clone;-webkit-box-decoration-break:clone}
.aqc:has(.aqc-skip) .aqc-title{margin-top:64px}
.aqc-giggle,.aqc-sub{margin:8px 8px 0;max-width:34ch;font-weight:800;font-size:15px;line-height:1.3;
  background:#1a1030;color:#fff8e8;border-radius:14px;padding:6px 10px}
.aqc-sub{font-size:13px;margin-top:4px}
.aqc-grow{flex:1;min-height:12px}
.aqc-hero{width:min(18vw,72px);height:min(18vw,72px);object-fit:contain;margin:0 0 8px;filter:drop-shadow(0 3px 0 #1a103055)}
.aqc-item{margin-top:4px;min-height:54px;width:min(100%,300px);display:flex;align-items:center;justify-content:center;
  padding:8px 36px 12px;background-position:center;background-size:100% 100%;background-repeat:no-repeat;
  color:#3b2415;font-weight:900;font-size:16px}
.aqc-item span{background:#fff3d6;color:#3b2415;font-weight:900;border-radius:8px;padding:2px 8px;line-height:1.2;
  box-decoration-break:clone;-webkit-box-decoration-break:clone}
.aqc-chest{animation:aqc-pop .55s cubic-bezier(.2,1.4,.4,1) both}
@keyframes aqc-pop{from{transform:scale(.2) rotate(-8deg)}to{transform:none}}
.aqc-level{position:relative;z-index:3;align-self:center;width:auto;max-width:100%;margin:8px 0;padding:14px 18px;
  background:#1a1030;border-radius:18px;
  font-size:clamp(72px,22vw,108px);font-weight:900;line-height:1;color:#ffe56a;opacity:1;
  -webkit-text-stroke:5px #2a1608;paint-order:stroke fill;
  text-shadow:0 3px 0 #6a3d0c,0 0 6px #ffe56a}
.aqc-more{margin-top:6px;max-width:100%;text-align:left}
.aqc-more summary{display:inline-flex;align-items:center;min-height:48px;background:#1a1030;color:#fff8e8;font-weight:800;font-size:15px;
  border-radius:12px;padding:0 14px;margin-top:8px}
details.aqc-more:not([open]) > :not(summary){display:none}
.lu-un{display:flex;align-items:center;gap:8px;background:#1a1030;color:#fff8e8;border-radius:12px;padding:6px 8px;margin:4px 0;font-weight:800;font-size:13px;text-align:left}
.lu-un small{font-weight:800;color:#fff8e8}
.lu-ico{width:40px;height:40px;object-fit:contain;flex:none;filter:drop-shadow(0 2px 0 #1a103088)}
.aqc-counts{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-top:8px;padding-top:8px;max-width:100%}
.aqc-count{display:flex;align-items:center;gap:4px;max-width:100%;min-width:0;background:#1a1030;color:#fff8e8;border-radius:999px;padding:3px 10px 3px 3px;font-weight:900;font-size:16px}
.aqc-count img{width:36px;height:36px;object-fit:contain}
.aqc-count small{font-size:11px;font-weight:800;color:#fff8e8}
.aqc-haul{list-style:none;margin:8px 0 0;padding:0;max-height:22vh;overflow:auto;width:min(100%,340px)}
.aqc-haul li{background:#1a1030;color:#fff8e8;border-radius:12px;margin:4px 0;padding:6px 8px;font-weight:800;font-size:13px}
.aqc-haul small{font-weight:800;color:#fff8e8}
.aqc-earn{margin:8px 8px 0;max-width:34ch;font-weight:800;font-size:16px;line-height:1.35;
  background:#1a1030;color:#fff8e8;border-radius:14px;padding:8px 12px}
.aqc-go,.aqs-go{display:block;width:min(280px,100%);max-width:100%;height:64px;margin:8px auto 0;padding:0 28px;border:0;border-radius:18px;cursor:pointer;
  color:#3a2412;font:800 18px/1 Nunito,"Trebuchet MS",sans-serif;text-align:center;text-decoration:none;line-height:64px;
  background:#f6c945 url("https://art.agentquest.app/ui/v4/button-primary.webp") center/100% 100% no-repeat}
.aqc-hint{display:inline-flex;align-items:center;justify-content:center;min-height:48px;min-width:48px;margin:8px 0 0;padding:0 16px;border:0;border-radius:999px;background:#1a1030;color:#fff8e8;
  font:800 16px/1 Nunito,"Trebuchet MS",sans-serif;cursor:pointer}
.aqc-skip{position:fixed;top:calc(10px + env(safe-area-inset-top));right:10px;z-index:10000;border:0;border-radius:999px;
  padding:0 14px;min-height:48px;min-width:48px;background:#1a1030;color:#fff8e8;font-weight:800;cursor:pointer}
.aqc-still .aqc-bit,.aqc-still .aqc-chest{animation:none}
@media (prefers-reduced-motion:reduce){
  .aqc-bit,.aqc-chest{animation:none!important}
}
@media (min-width:700px){
  .aqc-title{margin-top:6vh}
  .aqc-hero{width:96px}
}
