/* Countdown study for the independent UI preview. All timing comes from preview.js. */
.challenge-back,.leave-actions button{position:relative;border:3px solid #152d34;border-radius:12px 16px 11px 14px;background:#d7d9bb;color:#183036;box-shadow:3px 4px 0 #173238,inset 0 0 0 2px #eee9c9;padding:7px 15px;font:18px Happy,sans-serif;white-space:nowrap;cursor:pointer;transition:translate .12s,box-shadow .12s}
.challenge-back:hover,.leave-actions button:hover{translate:0 -3px}
.challenge-back:active,.leave-actions button:active{translate:2px 3px;box-shadow:0 1px 0 #173238}
.challenge-controls{max-width:930px;margin:13px auto -8px;display:flex;align-items:center;justify-content:space-between;position:relative;z-index:3;color:#e4dbc0;font:15px Happy,sans-serif;letter-spacing:1px}
.challenge-back{background:#e0c183;font-size:18px;padding:6px 17px;transform:rotate(-2deg)}
.challenge-controls>span{color:#d5d9ba;text-shadow:2px 2px 0 #173638}
.fuse-map .burnt{stroke:#546651;filter:drop-shadow(0 0 2px #e9a65d)}
.fuse-map .spark{filter:drop-shadow(0 0 8px #ffd17a)}
.fuse-field .detonation{position:absolute;left:59%;bottom:-3%;width:190px;height:190px;z-index:4;pointer-events:none;opacity:0;display:grid;place-items:center;border:7px solid #172e35;border-radius:42% 58% 50% 50%;background:#e6ba6e;box-shadow:0 0 0 14px #fff0b8a8,0 0 0 28px #db7f6b7c;transform:scale(.15) rotate(-20deg)}
.detonation span{font:65px Happy,sans-serif;color:#d46c5e;-webkit-text-stroke:5px #162e34;paint-order:stroke fill;text-shadow:3px 5px 0 #152e35}
.fuse-field.detonating .detonation{animation:detonate .82s ease-out forwards}
.fuse-field.detonating .hero-bomb{animation:bomb-pop .82s ease-out forwards}
.fuse-field.detonating .hero-book{animation:book-blast .82s ease-out forwards}
@keyframes detonate{0%{opacity:0;transform:scale(.15) rotate(-20deg)}20%{opacity:1;transform:scale(1.16) rotate(9deg)}65%{opacity:1;transform:scale(.95) rotate(-4deg)}100%{opacity:0;transform:scale(1.55) rotate(8deg)}}
@keyframes bomb-pop{35%{transform:scale(1.25)}70%,100%{transform:scale(0);opacity:0}}
@keyframes book-blast{35%{transform:translate(-5px,-10px) rotate(-14deg)}100%{transform:translate(-100px,-100px) rotate(-34deg)}}
.leave-dialog{position:fixed;inset:0;z-index:20;display:grid;place-items:center;padding:20px;background:#09282ba8;backdrop-filter:blur(4px)}
.leave-dialog[hidden]{display:none}
.leave-card{position:relative;width:min(440px,100%);padding:33px 30px 26px;text-align:center;background:#e0dec7;color:#183036;border:6px solid #132e34;border-radius:40% 36% 32% 28% / 20% 23% 20% 22%;box-shadow:9px 13px 0 #0d292d,0 0 0 4px #e7c478;transform:rotate(-1.5deg);animation:dialog-pop .28s ease-out}
.leave-star{position:absolute;top:-23px;right:29px;color:#e5b664;font:50px Happy,sans-serif;-webkit-text-stroke:3px #152e34}
.leave-card h2{margin:0 0 13px;font:43px/1.25 Happy,sans-serif;color:#d07163;paint-order:stroke fill;-webkit-text-stroke:4px #172e34;text-shadow:2px 4px 0 #172e34}
.leave-card p{margin:0 auto 24px;max-width:320px;font-size:14px;line-height:1.7}
.leave-actions{display:flex;justify-content:center;gap:13px}
.leave-actions button{background:#d0d6b3;font-size:19px}
.leave-actions button:last-child{background:#e5bb78}
@keyframes dialog-pop{from{opacity:0;transform:translateY(18px) scale(.85) rotate(-7deg)}to{opacity:1;transform:translateY(0) scale(1) rotate(-1.5deg)}}
@media(max-width:700px){
 .challenge-controls{margin:17px auto -19px;font-size:11px}
 .challenge-back{font-size:15px;padding:5px 12px}
 .fuse-field .detonation{left:40%;bottom:4%;width:135px;height:135px}
 .detonation span{font-size:45px}
 .leave-card{padding:32px 20px 27px;border-radius:35% 30% 31% 33% / 15% 19% 16% 20%}
 .leave-card h2{font-size:33px}
 .leave-card p{font-size:12px}
 .leave-actions button{font-size:16px;padding:8px 10px}
}
@media(prefers-reduced-motion:reduce){.fuse-field.detonating .detonation{opacity:1;transform:scale(1);animation:none}.fuse-field.detonating .hero-bomb,.fuse-field.detonating .hero-book{animation:none}}
.reduce-motion .fuse-field.detonating .detonation{opacity:1;transform:scale(1)}
