.hud { height: 76px; flex-shrink: 0; }
.speed-meter { text-align: center; color: #cf7965; }
.speed-meter>span { display: block; font-size: 10px; font-weight: 900; }
.speed-meter strong { display: block; font-size: 23px; line-height: 1.2; }
.speed-track,.rescue-track { background: #e8e4d6; border-radius: 10px; overflow: hidden; }
.speed-track { height: 5px; margin: 4px 5px 0; }
.speed-track i { display:block; height:100%; background:linear-gradient(90deg,#8fb699,#e8c26f,#e78b76); }
.notice { flex-shrink:0; background:#fae9d7; }
.notice-dot { background:#de9274; box-shadow:0 0 0 4px #f5d7bd; }
.notice b { color:#b17a5f; font-size:9px; }
.notice div span { font-size:11px; }
.bottom-panel { grid-template-columns:1fr 92px; gap:16px; height:88px; flex-shrink:0; }
.rescue-progress>div:first-child { display:flex; justify-content:space-between; font-size:10px; }
.rescue-progress em { font-style:normal; color:#d28467; }
.rescue-progress small { font-size:9px; color:#8c9a90; }
.rescue-track { height:9px; margin:7px 0 4px; }
.rescue-track i { display:block; height:100%; width:0; background:#8dbb9a; transition:width .2s; }
#timeLeft { color:#a87d64; font-weight:900; }
.legend { gap:8px; font-size:9px; }
.modal-art { width:122px; height:106px; object-fit:contain; margin:-10px auto 4px; }
.modal h2 { font-size:23px; }
.modal .result-stats { padding:9px 3px 0; font-size:10px; color:#ba8666; }
.modal .best-score { margin:11px auto; }
.modal p:not(.modal-kicker) { font-size:11px; }
.icon-btn:disabled { opacity:.4; cursor:default; }
.rabbit-speech { position:absolute; top:calc(42% - 31px); left:3%; z-index:8; background:#fff9e8; border:1.5px solid #c2b497; border-radius:12px; padding:6px 9px; color:#a57a60; font-size:10px; font-weight:900; transform:rotate(-4deg); }
.rabbit-speech:after { content:''; position:absolute; bottom:-6px; left:30px; width:8px; height:8px; background:#fff9e8; border-bottom:1.5px solid #c2b497; border-right:1.5px solid #c2b497; transform:rotate(45deg); }
.factory[data-mood=danger] .machine-light { background:#ef977b; box-shadow:0 0 12px #ef977b; }
.phone[data-phase=playing] .factory[data-mood=danger] .machine-light { animation:warning-flash .45s infinite alternate; }
.phone[data-phase=playing] .factory[data-mood=danger] .qc-rabbit .ear { animation:ear-worry .22s infinite alternate; }
.factory[data-mood=hopeful] .rabbit-speech { color:#689575; border-color:#9abda1; }
.scene-countdown { position:absolute; z-index:16; inset:0; display:grid; place-items:center; color:#fff9e8; text-shadow:0 4px 0 #92745b; font-weight:900; font-size:100px; background:#4f64632b; pointer-events:none; }
.scene-countdown[hidden] { display:none; }
.toast { top:14%; font-size:14px; white-space:nowrap; color:#5a9670; background:#fffbec; border-radius:14px; padding:8px 12px; box-shadow:0 3px 0 #d0c6ac; }
.toast.toast-bad { color:#c77d6c; }
.brake-spark { position:absolute; z-index:10; pointer-events:none; font-size:15px; color:#498569; font-weight:900; text-shadow:0 1px #fff; animation:brake-pop .65s ease-out forwards; }
.packing-stage { position:absolute; z-index:10; left:3%; bottom:5%; width:110px; height:100px; visibility:hidden; pointer-events:none; }
.packing-crate { position:absolute; bottom:0; width:108px; height:76px; }
.crate-back { position:absolute; inset:8px 0 0; background:#b98c60; border:3px solid #806349; border-radius:8px; }
.crate-front { position:absolute; left:0; right:0; bottom:0; height:35px; border:3px solid #806349; background:#edc995; border-radius:0 0 8px 8px; text-align:center; font-size:10px; font-weight:900; padding-top:8px; color:#9c7655; }
.crate-lid { position:absolute; top:-26px; left:-4px; width:116px; height:27px; border:3px solid #806349; border-radius:6px; background:repeating-linear-gradient(90deg,#e7bf88 0 45px,#a9bb97 45px 66px,#e7bf88 66px 116px); transform:rotate(-12deg); transform-origin:left bottom; }
.packed-cake { position:absolute; width:98px; height:87px; left:5px; bottom:18px; opacity:0; }
.packing-puff { position:absolute; left:34px; top:-15px; color:#fff4d5; font-size:60px; opacity:0; }
.outcome-banner { position:absolute; top:12%; left:8%; right:8%; z-index:12; padding:13px 6px; text-align:center; color:#668b6b; font-size:16px; font-weight:900; background:#fff9e8; border:2px solid #a9bfa0; border-radius:15px; opacity:0; transform:translateY(-12px); transition:.3s; }
.rescue-success .outcome-banner,.rescue-failure .outcome-banner { opacity:1; transform:none; }
.rescue-failure .outcome-banner { color:#ba806b; border-color:#d6a68a; }
.rescue-success .qc-rabbit { animation:rabbit-celebrate .55s ease-in-out 3; }
.rescue-failure .qc-rabbit { animation:rabbit-pack 1.25s ease-in forwards; z-index:11; }
.rescue-failure .rabbit-speech { animation:speech-disappear .4s .5s forwards; }
.rescue-failure .packing-stage { visibility:visible; }
.rescue-failure .crate-lid { animation:close-box .35s 1.1s forwards; }
.rescue-failure .packed-cake { animation:reveal-cake .6s 1.6s forwards; }
.rescue-failure .packing-puff { animation:packing-poof .5s 1.25s; }
.rescue-confetti { position:absolute; inset:0; z-index:12; pointer-events:none; overflow:hidden; display:none; }
.rescue-success .rescue-confetti { display:block; }
.rescue-confetti i { position:absolute; left:12%; top:15%; font-style:normal; font-size:26px; color:#e9bc6d; animation:confetti-fall 2s ease-out both; }
.rescue-confetti i:nth-child(2) { left:30%; color:#e8a38b; animation-delay:.1s; }
.rescue-confetti i:nth-child(3) { left:46%; animation-delay:.3s; }
.rescue-confetti i:nth-child(4) { left:60%; color:#95b99a; animation-delay:.15s; }
.rescue-confetti i:nth-child(5) { left:75%; color:#8ebac2; animation-delay:.4s; }
.rescue-confetti i:nth-child(6) { left:87%; color:#e8a38b; animation-delay:.2s; }
.paused .factory * { animation-play-state:paused!important; }
@keyframes brake-pop { to { transform:translate(-15px,-45px) scale(1.2); opacity:0; } }
@keyframes warning-flash { to { opacity:.4; } }
@keyframes ear-worry { to { margin-top:3px; } }
@keyframes rabbit-celebrate { 50% { transform:translateY(-17px) rotate(-6deg); } }
@keyframes rabbit-pack { 15% { transform:translateY(-10px) rotate(-8deg); } 80% { transform:translate(var(--pack-x),var(--pack-y)) scale(.3) rotate(12deg); opacity:1; } 100% { transform:translate(var(--pack-x),var(--pack-y)) scale(0); opacity:0; } }
@keyframes close-box { to { top:5px; transform:rotate(0); } }
@keyframes reveal-cake { to { opacity:1; transform:translateY(-33px) rotate(-8deg); } }
@keyframes packing-poof { 50% { opacity:1; transform:scale(1.7); } 100% { opacity:0; transform:scale(2); } }
@keyframes speech-disappear { to { opacity:0; } }
@keyframes confetti-fall { from { transform:translateY(-40px) rotate(0); opacity:0; } 20% { opacity:1; } to { transform:translateY(320px) rotate(180deg); opacity:0; } }
@media(max-height:730px) { .hud {height:65px;} .bottom-panel {height:78px;} .modal {padding-top:18px;padding-bottom:16px;} .modal-art {height:80px;} }
@media(prefers-reduced-motion:reduce) { .rescue-confetti,.brake-spark {display:none;} .phone[data-phase=playing] .qc-rabbit .ear,.phone[data-phase=playing] .machine-light {animation:none;} }
