/* Outcome-specific result illustrations. Every ending has its own motion language. */
.ending-screen{--end:#4d7c3f;--soft:#dcebd0;--sky:#cce8ef;padding:12px 18px 24px}
.ending-screen--quit{--end:#6d6251;--soft:#e8e0ce;--sky:#d9e4df}
.ending-screen--car{--end:#b24336;--soft:#f3d5ce;--sky:#d9e2ea}
.ending-screen--bite{--end:#8a4f32;--soft:#f2dfc8;--sky:#ead9ca}
.ending-screen--collapse{--end:#34738a;--soft:#d5ebec;--sky:#cce6ec}
.ending-screen--bruised{--end:#76528c;--soft:#e7dbee;--sky:#ddd9e8}
.ending-screen--failed{--end:#59636a;--soft:#e0e4e5;--sky:#d8e0e3}
.ending-screen .results-panel{max-width:620px!important;margin-top:2vh!important;border-color:var(--end);overflow:hidden;position:relative}
.ending-hero{margin:-18px -22px 14px;background:linear-gradient(180deg,var(--sky),var(--soft));border-bottom:3px solid var(--end)}
.ending-visual{height:174px;overflow:hidden;position:relative}
.ending-scene{position:absolute;inset:0;font-size:48px;overflow:hidden}
.ending-scene--success{background:radial-gradient(circle at 14% 25%,rgba(255,255,255,.72) 0 4%,transparent 5%)}
.ending-scene--quit{background:linear-gradient(165deg,rgba(255,255,255,.3),transparent 58%)}
.ending-scene--bite{background:radial-gradient(circle at 72% 45%,rgba(255,255,255,.34),transparent 38%)}
.ending-scene--collapse{background:linear-gradient(120deg,rgba(255,255,255,.38),transparent 55%)}
.ending-scene--bruised{background:repeating-linear-gradient(135deg,transparent 0 22px,rgba(118,82,140,.055) 22px 44px)}
.ending-scene--failed{background:linear-gradient(#cbd6da,#dbe3df)}
.ending-scene>*{position:absolute;display:block;line-height:1;font-style:normal}
.e-ground{left:0!important;right:0!important;bottom:0!important;height:34px;background:linear-gradient(#80ad63,#66964d);z-index:1}
.ending-copy{position:relative;z-index:3;background:rgba(251,248,236,.94);padding:8px 16px 10px;text-align:center}
.ending-kicker{font-family:Silkscreen,monospace;color:var(--end);font-size:clamp(13px,3vw,18px);letter-spacing:2px}
.ending-summary{font-size:14px;font-weight:700;margin-top:3px;color:#3e4939}
.e-home{right:9%;bottom:24px;z-index:2;font-size:72px}
.e-sun{left:8%;top:14px;font-size:44px;animation:end-sunrise 1.3s ease-out both}
.e-walker{left:27%;bottom:25px;z-index:3;animation:end-walk-home 1.55s ease-out both}
.e-pack{left:42%;bottom:24px;z-index:3;font-size:43px;letter-spacing:-8px;animation:end-dog-hop .6s ease-in-out 2 alternate}
.e-confetti{top:-14px;width:9px;height:18px;border-radius:3px;background:#f2c422;animation:end-confetti 1.65s ease-in infinite}
.e-confetti.c1{left:12%;animation-delay:.1s}.e-confetti.c2{left:28%;background:#c0503e;animation-delay:.55s}
.e-confetti.c3{left:46%;background:#5b8fb9;animation-delay:.25s}.e-confetti.c4{left:67%;background:#7aa34f;animation-delay:.75s}
.e-confetti.c5{left:86%;background:#e8849b;animation-delay:.4s}
.ending-scene--quit .e-home{left:8%;right:auto}
.ending-scene--quit .e-walker{left:42%;animation:end-turn-home 1.4s ease-out both}
.ending-scene--quit .e-pack{left:53%;animation:end-turn-home 1.4s .12s ease-out both}
.e-turn{left:37%;top:25px;color:#6d6251;font-size:46px;animation:end-turn-sign 1s ease-in-out 2}
.e-route{left:29%;right:10%;bottom:44px;height:6px;border-top:5px dashed #c79b3c;transform-origin:left;animation:end-route-retract 1.25s .2s ease-in both}
.ending-scene--car{background:linear-gradient(#c9d9e4 0 58%,#626a70 59% 100%)}
.e-city{right:8%;bottom:66px;font-size:70px;opacity:.7}
.e-ambulance{left:38%;bottom:24px;z-index:4;font-size:86px;animation:end-ambulance-arrive 1.25s cubic-bezier(.2,.8,.2,1) both}
.e-siren{top:25px;width:18px;height:18px;border-radius:50%;filter:blur(1px);animation:end-siren .42s steps(2,end) infinite}
.e-siren.red{left:46%;background:#e64035;color:#e64035}.e-siren.blue{left:53%;background:#438fd4;color:#438fd4;animation-delay:.21s}
.e-road{left:0;right:0;bottom:0;height:62px;background:repeating-linear-gradient(90deg,transparent 0 12%,#f5dc72 12% 20%,transparent 20% 35%);background-size:180px 6px;background-repeat:repeat-x;background-position:center}
.ending-scene--bite .e-dog{right:17%;bottom:25px;z-index:3;font-size:76px;animation:end-dog-watch 1.2s ease-in-out infinite alternate}
.e-kit{left:24%;bottom:31px;z-index:3;width:72px;height:54px;border:5px solid #fff4e9;border-radius:10px;background:#c0503e;
  color:#fff;font:700 43px/42px Arial,sans-serif!important;text-align:center;box-shadow:0 5px 0 rgba(90,45,30,.2);animation:end-kit-pop .7s cubic-bezier(.2,1.5,.4,1) both}
.ending-scene--bite .e-bandage{left:47%;top:26px;font-size:44px;animation:end-bandage-float 1.6s ease-in-out infinite}
.e-paw{color:#9f6545;font-size:25px;opacity:.55;animation:end-paw-fade 1.5s ease-out infinite}
.e-paw.p1{left:55%;bottom:55px}.e-paw.p2{left:66%;bottom:88px;animation-delay:.55s}
.e-tree{left:8%;bottom:22px;z-index:3;font-size:105px;transform-origin:bottom;animation:end-tree-sway 2.4s ease-in-out infinite alternate}
.e-bench{left:40%;bottom:34px;width:118px;height:34px;border:8px solid #754f32;border-top-width:12px;z-index:2}
.e-rest{left:48%;bottom:55px;z-index:4;font-size:54px;animation:end-rest-breathe 1.8s ease-in-out infinite}
.e-water{right:16%;bottom:34px;z-index:4;font-size:48px;animation:end-water-offer 1s ease-out both}
.e-drop{right:21%;top:25px;width:9px;height:14px;border-radius:60%;background:#4aabc7;animation:end-drop 1.4s ease-in infinite}
.e-drop.d2{right:16%;animation-delay:.6s}
.e-barrier{left:12%;bottom:24px;z-index:3;font-size:83px;animation:end-barrier-settle .65s ease-out both}
.e-ice{left:48%;bottom:39px;z-index:4;font-size:66px;animation:end-ice-bob 1.4s ease-in-out infinite}
.ending-scene--bruised .e-bandage{right:15%;top:27px;font-size:49px;animation:end-bandage-float 1.8s ease-in-out infinite reverse}
.e-star{color:#76528c;font-size:32px;animation:end-star-spin 1.5s linear infinite}
.e-star.s1{left:46%;top:25px}.e-star.s2{left:64%;top:55px;animation-delay:.5s}
.ending-scene--failed .e-cloud{left:31%;top:12px;font-size:67px;animation:end-cloud-drift 2.5s ease-in-out infinite alternate}
.ending-scene--failed .e-walker{left:42%;bottom:28px;animation:end-rest-breathe 1.8s ease-in-out infinite}
.ending-scene--failed .e-dog{left:56%;bottom:28px;z-index:3}
@keyframes end-sunrise{from{transform:translateY(70px) rotate(-30deg);opacity:0}to{transform:none;opacity:1}}
@keyframes end-walk-home{from{transform:translateX(-190px)}to{transform:none}}
@keyframes end-dog-hop{from{transform:translateY(0)}to{transform:translateY(-9px)}}
@keyframes end-confetti{0%{transform:translateY(-15px) rotate(0);opacity:0}10%{opacity:1}100%{transform:translateY(180px) rotate(420deg);opacity:.85}}
@keyframes end-turn-home{0%{transform:translateX(110px) scaleX(-1)}45%{transform:translateX(85px) scaleX(-1)}55%{transform:translateX(85px) scaleX(1)}100%{transform:translateX(0) scaleX(1)}}
@keyframes end-turn-sign{50%{transform:rotate(-18deg) scale(1.15)}}
@keyframes end-route-retract{to{transform:scaleX(0)}}
@keyframes end-ambulance-arrive{from{transform:translateX(-430px)}70%{transform:translateX(12px)}to{transform:none}}
@keyframes end-siren{0%{opacity:.15;box-shadow:0 0 0 transparent}100%{opacity:1;box-shadow:0 0 25px 12px currentColor}}
@keyframes end-dog-watch{to{transform:rotate(4deg)}}
@keyframes end-kit-pop{from{transform:scale(.25);opacity:0}to{transform:none;opacity:1}}
@keyframes end-bandage-float{50%{transform:translateY(-12px) rotate(10deg)}}
@keyframes end-paw-fade{from{transform:translate(-12px,12px);opacity:0}to{transform:none;opacity:.6}}
@keyframes end-tree-sway{to{transform:rotate(2.5deg)}}
@keyframes end-rest-breathe{50%{transform:translateY(3px) scale(.98)}}
@keyframes end-water-offer{from{transform:translateX(80px) rotate(20deg);opacity:0}to{transform:none;opacity:1}}
@keyframes end-drop{from{transform:translateY(-15px);opacity:0}30%{opacity:1}to{transform:translateY(75px);opacity:0}}
@keyframes end-barrier-settle{from{transform:translateY(-80px) rotate(-9deg)}70%{transform:translateY(5px) rotate(3deg)}to{transform:none}}
@keyframes end-ice-bob{50%{transform:translateY(-8px) rotate(-4deg)}}
@keyframes end-star-spin{to{transform:rotate(360deg)}}
@keyframes end-cloud-drift{to{transform:translateX(22px)}}
@media(max-width:520px){
  .ending-visual{height:145px}.ending-scene{font-size:38px}.e-home{font-size:58px}
  .e-ambulance{font-size:72px}.e-tree{font-size:88px}.ending-copy{padding:7px 10px}.ending-summary{font-size:12px}
}
@media(prefers-reduced-motion:reduce){
  .ending-screen .ending-scene *{animation:none!important;transition:none!important}
}
.reduced-motion .ending-screen .ending-scene *{animation:none!important;transition:none!important}
