/* Hand-marked boss meter: the pigment is irregular, the paper remains visible. */
#boss-hud{top:94px;width:min(660px,78%);padding:0;background:none;border:0;border-radius:0;box-shadow:none;pointer-events:none}
#boss-hud strong{color:#922d40;font-size:22px;letter-spacing:3px;text-shadow:1px 1px 0 #fff5dc,-1px -1px 0 #fff5dc,0 0 7px #fff0d5;transform:rotate(-.6deg)}
#boss-hud>div{height:39px;margin-top:1px;position:relative;overflow:visible;border:0;border-radius:0;background:transparent;transform:rotate(-.35deg)}
#boss-hud>div:before{content:'';position:absolute;inset:0;background-image:var(--boss-crayon);background-size:100% 100%;opacity:.17;filter:grayscale(.7)}
#boss-hud i{position:absolute;inset:0;width:100%!important;height:100%;background:var(--boss-crayon) center/100% 100% no-repeat;box-shadow:none;transition:clip-path .15s}
#boss-health-text{inset:0;line-height:39px;font-size:13px;color:#fff8df;text-shadow:1px 1px #913345,-1px -1px #913345;font-weight:bold}
@media(max-width:650px){#boss-hud{top:78px;width:78%;padding:0}#boss-hud strong{font-size:17px;letter-spacing:1px}#boss-hud>div{height:32px}#boss-health-text{line-height:32px;font-size:11px}}
/* Floating cut-paper keeps the same pencil outlines, fibres and muted inks as the world. */
#upgrades{background:radial-gradient(ellipse at 50% 44%,#55476899,#29223ac2);backdrop-filter:blur(2px);overflow:auto;isolation:isolate;padding:24px}
#upgrades .upgrade-paper{position:relative;width:min(950px,96vw);max-height:96vh;overflow:auto;z-index:2;padding:20px 20px 12px;background:transparent!important;background-image:none!important;border:0!important;border-radius:0!important;box-shadow:none!important}
#upgrades .up-top{justify-content:center;position:relative;min-height:45px;margin:0 0 8px}
#upgrades .up-top>span{display:none}#upgrades .up-top>b{position:absolute;right:10px;top:10px;color:#e9d9c0;transform:rotate(4deg);font-size:13px;border-bottom:1px dashed #ddc9b6;padding:3px 8px}
#upgrades .up-top h2{font-family:PaperHand,serif;font-size:38px;letter-spacing:5px;color:#f3e2bd;-webkit-text-stroke:0;text-shadow:2px 3px #70576e;transform:rotate(-2deg);font-weight:500}
#upgrades .up-top h2:before,#upgrades .up-top h2:after{content:'✧';font-size:26px;display:inline-block;margin:0 18px;color:#d9b989;rotate:15deg}
#upgrades .up-sub{color:#e5d4c7;margin:4px 0 22px;font-size:13px;letter-spacing:1px}
#upgrades #choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;align-items:stretch;padding:6px}
#upgrades .choice{position:relative;padding:33px 21px 23px;min-height:335px;display:flex;flex-direction:column;align-items:center;overflow:visible;background:var(--reward-paper) center/100% 100% no-repeat!important;border:0!important;border-radius:0!important;box-shadow:none!important;transform:rotate(var(--paper-tilt,-1deg))!important;transition:translate .16s,filter .16s;outline:none;text-align:center;filter:drop-shadow(3px 8px 0 #2019282b)}
#upgrades .choice:nth-child(2){--paper-tilt:1.2deg}#upgrades .choice:nth-child(3){--paper-tilt:-.7deg}
#upgrades .choice:before{content:'';position:absolute;width:76px;height:24px;top:1px;left:50%;transform:translateX(-50%) rotate(3deg);background:#d2bcc9b8;clip-path:polygon(3% 0,97% 4%,100% 18%,97% 33%,100% 48%,97% 62%,100% 80%,96% 100%,3% 95%,0 83%,3% 70%,0 55%,3% 40%,0 24%);border-top:1px dashed #e6d4d8}
#upgrades .choice:hover,#upgrades .choice:focus-visible{translate:0 -7px;filter:drop-shadow(3px 9px 1px #241b3b77)}
#upgrades .choice.recommended:before{background:#d8bb8bd9;width:104px}
#upgrades .choice>.key{top:29px;right:20px;color:#aa8e91;font-size:12px}
#upgrades .choice>small{font-size:10px;letter-spacing:2px;color:#9e809a;margin-top:2px}
#upgrades .choice>img{position:static;width:90px;height:90px;margin:13px auto 8px;object-fit:contain}
#upgrades .choice strong{font-size:20px;color:#725c73;font-weight:500;letter-spacing:1px}
#upgrades .choice .level{font-size:12px;color:#a17e79;margin:7px 0 11px}
#upgrades .choice p{font-size:12px;line-height:1.75;width:100%;flex:1;color:#8b7486;margin:0;min-height:44px}
#upgrades .choice p em{font-size:10px;color:#a88b8b}
.recommend-badge{position:absolute;top:2px;left:50%;transform:translateX(-50%) rotate(3deg);white-space:nowrap;color:#745d73;font-size:11px;padding:3px 6px;font-weight:500}
.recommend-reason{display:block;margin-top:10px;padding-top:9px;font-size:10px;line-height:1.5;color:#9d7d72;width:100%;border-top:1px dashed #cbb7b3}
.fusion-materials{width:100%;display:flex;align-items:center;justify-content:center;gap:4px;border-top:1px dashed #c2a0ad;margin-top:10px;padding-top:22px;position:relative}.consume-label{position:absolute;top:4px;left:0;font-size:9px;color:#a16f78}.fusion-materials>span:not(.consume-label){display:flex;flex-direction:column;align-items:center;max-width:65px}.fusion-materials img{position:static!important;width:30px!important;height:30px!important;margin:0!important;object-fit:contain}.fusion-materials small{font-size:9px!important;letter-spacing:0!important}.fusion-materials>b{font-size:12px;color:#9c8498}
.reward-countdown{margin:16px auto 0;text-align:center;font-size:12px;color:#eee0c9}.reward-meter{height:4px;background:#c7b4b339;clip-path:polygon(1% 0,99% 15%,100% 80%,1% 100%,0 55%);margin:9px auto 0;max-width:240px;overflow:hidden}#reward-time-fill{display:block;background:#dec293;height:100%;transform-origin:left center}
#upgrades .upgrade-actions{padding:0 9px;margin-top:14px}#upgrades .upgrade-actions>small{color:#bda8ba;font-size:9px}#upgrades .upgrade-actions>button{background:#e6d7c4;border:0;color:#846c82;font-size:11px;padding:8px 17px;transform:rotate(-2deg);clip-path:polygon(2% 0,100% 4%,98% 100%,0 95%)}
#reward-confetti{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:3}
#chest-stage{height:85px;position:relative;margin:0 auto 4px;display:flex;justify-content:center;transition:height .4s}
#chest-cinema{display:block;width:min(100%,750px);height:100%;object-fit:contain}
#skip-chest{position:absolute;bottom:0;right:12px;background:none;border:0;border-bottom:1px dashed #d2baa1;color:#e4ceb4;font-size:11px;padding:5px 8px}
.opening-chest #chest-stage{height:min(58vh,450px)}.opening-chest .upgrade-paper{width:min(1000px,96vw)}.opening-chest .up-top{margin-bottom:20px}
.opening-chest #choices,.opening-chest .upgrade-actions,.opening-chest .reward-countdown,.opening-chest #reward-subtitle{display:none!important}
.rewards-ready #skip-chest{display:none}.rewards-ready #chest-cinema{width:230px}.treasure-mode.rewards-ready .choice{animation:paper-arrival .5s both;animation-delay:var(--reveal-delay)}
@keyframes paper-arrival{from{opacity:0;translate:0 35px;scale:.88}to{opacity:1;translate:0 0;scale:1}}
@media(max-width:650px){#upgrades{padding:8px}#upgrades .upgrade-paper{padding:14px 3px;width:98vw}#upgrades .up-top h2{font-size:27px;letter-spacing:2px}#upgrades .up-top h2:before,#upgrades .up-top h2:after{font-size:17px;margin:0 8px}#upgrades .up-top>b{position:static;font-size:10px;padding:2px 4px;margin-left:5px}#upgrades .up-sub{font-size:10px;margin-bottom:13px}#upgrades #choices{gap:5px;padding:3px}#upgrades .choice{padding:29px 11px 18px;min-height:300px}#upgrades .choice>img{width:58px;height:64px;margin:9px auto 5px}#upgrades .choice strong{font-size:14px;letter-spacing:0}#upgrades .choice p{font-size:10px;line-height:1.6}#upgrades .choice p em{font-size:8px}#upgrades .choice>small{font-size:8px;letter-spacing:0}#upgrades .choice .level{font-size:9px;margin:5px 0 7px}#upgrades .choice>.key{font-size:9px;top:27px;right:14px}.recommend-badge{font-size:9px;top:4px}#upgrades .choice:before{width:55px}#upgrades .choice.recommended:before{width:82px}.recommend-reason{font-size:9px}.fusion-materials{gap:2px;flex-wrap:wrap}.fusion-materials img{width:23px!important;height:23px!important}.fusion-materials small{font-size:8px!important}.reward-countdown{font-size:10px}.upgrade-actions>small{max-width:170px;text-align:right}#chest-stage{height:65px}.opening-chest #chest-stage{height:340px}}
@media(max-height:600px){#upgrades .upgrade-paper{padding-top:4px}#upgrades .choice{min-height:240px;padding-top:27px;padding-bottom:16px}#upgrades .choice>img{height:45px;width:48px;margin:4px}#upgrades .choice p{font-size:10px}.recommend-reason{font-size:9px}#upgrades .up-top h2{font-size:25px}#upgrades .up-sub{margin-bottom:9px}#chest-stage{height:50px}.reward-countdown{margin-top:9px}#upgrades .upgrade-actions{margin-top:8px}}
@media(prefers-reduced-motion:reduce){#upgrades *{animation:none!important;transition:none!important}}.reduced-rewards *{animation:none!important;transition:none!important}

#boss-health-text{position:absolute;z-index:1;width:100%;text-align:center}
.rewards-ready #chest-stage{display:none}

#upgrades.jackpot-won #choices,#upgrades.jackpot-won .upgrade-actions,#upgrades.jackpot-won #skip-chest{display:none}#upgrades.jackpot-won #chest-stage{display:block!important}#upgrades.jackpot-won .up-top h2{color:#ffdb88;text-shadow:2px 3px #8d637c}#upgrades.jackpot-won #reward-status{font-size:20px;color:#ffe0a1}#upgrades.jackpot-won #reward-subtitle{font-size:18px;color:#ffebc1}#upgrades.jackpot-won #chest-cinema{filter:drop-shadow(0 0 20px #edc46544)}
