/* One more try: how close that was, what to buy, what is next. Rules in web/lib/pull.mjs and web/lib/next-goal.mjs. */
.result-close{display:grid;gap:4px;margin:0 0 8px;padding:8px 10px;border-radius:8px;background:#2c230ccc;border:1px solid #d9b257;text-align:center}
.result-close strong{display:block;color:#ffe08a;font-size:15px;font-weight:900;line-height:1.3;word-break:keep-all}
.result-close small{display:block;color:#f2e3bd;font-size:12px;font-weight:700;line-height:1.35;word-break:keep-all}
.result-close.quiet{padding-block:5px;background:#0d2530cc;border-color:#58dbe366}.result-close.quiet small{color:#cfe3e8;font-weight:650}
.close-bar{position:relative;height:9px;border-radius:5px;background:#0a151e;box-shadow:inset 0 0 0 1px #5a4a22}
.close-bar i{display:block;height:100%;width:var(--to);border-radius:5px;background:linear-gradient(90deg,#d79c35,#ffd76a);animation:close-fill .7s .15s cubic-bezier(.2,.7,.2,1) both}
.close-bar em{position:absolute;top:-3px;bottom:-3px;width:2px;margin-left:-1px;background:#eafff8;box-shadow:0 0 3px #000}
@keyframes close-fill{from{width:var(--from)}to{width:var(--to)}}
.result-chips.bump>span{animation:chip-bump .34s ease-out}
.chip-bump{animation:chip-bump .34s ease-out}
#research-chips.chip-bump{display:inline-block}
@keyframes chip-bump{0%{transform:scale(1)}35%{transform:scale(1.18);filter:brightness(1.35)}100%{transform:scale(1)}}
.lab-cta{display:grid;justify-items:center;gap:0;min-width:0;line-height:1.2}.lab-cta b{font-weight:inherit}
.lab-cta small{font-size:11.5px;font-weight:700;line-height:1.25;opacity:.9;word-break:keep-all;letter-spacing:-.2px}
#result-research{min-height:50px;padding-block:6px}
#result-research svg{flex:none}
.result-opened.reveal{position:relative;display:grid;align-content:end;justify-items:center;gap:1px;min-height:66px;overflow:hidden;padding:6px 10px;background:#3a2d0f}
.result-opened.reveal .opened-art{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.75;pointer-events:none}
.result-opened.reveal::after{content:'';position:absolute;inset:0;background:linear-gradient(180deg,#0000 20%,#0a0f14d9 90%);pointer-events:none}
.result-opened.reveal p,.result-opened.reveal small{position:relative;z-index:1;text-shadow:0 1px 3px #000}
.result-opened.reveal small{color:#e8f2f4;font-size:11px;font-weight:650;line-height:1.3;word-break:keep-all}
.result-opened.reveal.show{animation:opened-in .5s ease-out both}
.result-opened.reveal.show .opened-art{animation:opened-art 1.4s ease-out both}
@keyframes opened-in{0%{transform:scale(.94);opacity:.2;box-shadow:0 0 0 #ffc74b00}50%{transform:scale(1.02);opacity:1;box-shadow:0 0 18px #ffc74baa}100%{transform:scale(1);box-shadow:0 0 0 #ffc74b00}}
@keyframes opened-art{from{transform:scale(1.14)}to{transform:scale(1)}}
#research-screen .research-row.just-bought{animation:row-bought .55s ease-out}
@keyframes row-bought{0%{box-shadow:0 0 0 2px #ffd76a,inset 0 0 18px #ffd76a88;filter:brightness(1.3)}100%{box-shadow:0 0 0 0 #ffd76a00,inset 0 0 0 #ffd76a00;filter:brightness(1)}}
.research-float{position:absolute;right:66px;top:6px;z-index:2;color:#ffe08a;font-size:17px;font-weight:900;text-shadow:0 1px 2px #000,0 0 6px #000;pointer-events:none;animation:float-up .85s ease-out both}
@keyframes float-up{0%{transform:translateY(10px) scale(.8);opacity:0}25%{transform:translateY(0) scale(1.12);opacity:1}100%{transform:translateY(-14px) scale(1);opacity:0}}
.research-tag{display:inline-block;margin-left:5px;padding:0 5px;border-radius:5px;background:#ffd76a;color:#2a1a02;font-size:10.5px;font-weight:900;line-height:16px;vertical-align:1px}
#research-screen .research-note{color:#cfe3e8}
.title-goal{display:flex;align-items:center;justify-content:center;gap:5px;width:100%;min-height:36px;margin:0 0 6px;padding:3px 10px;border:1px solid #c9a24f;border-radius:8px;background:#07111be6;color:#ffe9b0;font-size:12.5px;font-weight:800;line-height:1.25;word-break:keep-all;text-align:center;box-shadow:0 1px 6px #0008}
.title-goal[hidden]{display:none}.title-goal svg{flex:none;width:16px;height:16px}
.title-goal.rest{min-height:44px;background:linear-gradient(#ffd76a,#e8a93a);border-color:#fff0b0;color:#2a1a02;font-weight:900;animation:rest-glow 1.8s ease-in-out infinite}
.title-goal.claimed{background:#0d3a33;border-color:#70c7b4;color:#c6f5e8}
@keyframes rest-glow{0%,100%{box-shadow:0 0 0 #ffd76a00}50%{box-shadow:0 0 12px #ffd76acc}}
.wave-goal{display:block;margin-top:1px;color:#ffe08a;font-size:11.5px;font-weight:800;line-height:1.3;word-break:keep-all}
#toast.jackpot{background:linear-gradient(#ffd76a,#e8a93a);color:#2a1a02;font-size:14px;font-weight:900;border-color:#fff0b0;box-shadow:0 0 16px #ffd76a99}
#stage-screen{z-index:40}#stage-screen .sub-body{display:grid;justify-items:center;gap:6px;text-align:center}
.stage-stand{position:relative;display:grid;place-items:center;width:200px;height:200px;margin-top:4px}
.stage-stand canvas,.stage-stand img{grid-area:1/1;width:190px;height:190px;object-fit:contain;position:relative;animation:stage-in .6s cubic-bezier(.2,1.4,.4,1) both}
.stage-stand.art-ready canvas{visibility:hidden}
.stage-rays{position:absolute;inset:-8px;border-radius:50%;background:repeating-conic-gradient(#ffd76a55 0 12deg,#ffd76a00 12deg 30deg);animation:stage-spin 9s linear infinite;mask:radial-gradient(circle,#000 30%,#0000 70%);-webkit-mask:radial-gradient(circle,#000 30%,#0000 70%)}
.stage-name{margin:0;color:#ffe08a;font-size:24px;font-weight:900}.stage-line{margin:0;color:#eaf4f6;font-size:13.5px;font-weight:700;line-height:1.45;word-break:keep-all}.stage-note{margin:0}
#stage-screen .wide-button{width:100%;margin-top:6px}
@keyframes stage-in{0%{transform:scale(.5);opacity:0}100%{transform:scale(1);opacity:1}}
@keyframes stage-spin{to{transform:rotate(360deg)}}
@media(max-height:680px){.result-close{margin-bottom:4px;padding:5px 8px}.result-close strong{font-size:14px}.title-goal{min-height:32px;margin-bottom:4px;font-size:12px}.title-goal.rest{min-height:44px}.stage-stand{width:150px;height:150px}.stage-stand canvas,.stage-stand img{width:140px;height:140px}.stage-name{font-size:20px}}
@media(prefers-reduced-motion:reduce){.close-bar i,.result-chips.bump>span,.chip-bump,.result-opened.reveal.show,.result-opened.reveal.show .opened-art,#research-screen .research-row.just-bought,.research-float,.title-goal.rest,.stage-stand canvas,.stage-stand img,.stage-rays{animation:none}}
/* Between waves: first the cleared-wave banner with its chips, then what comes next and the closest goal. */
.battlefield:has(.wave-banner.wave-clear:not([hidden])) .wave-preview{visibility:hidden}
.game-shell:not(.work-open) .battlefield:has(.wave-preview:not([hidden])) .toast{top:72px}
.game-shell:not(.work-open) .battlefield:has(.wave-preview:not([hidden]) .wave-goal) .toast{top:88px}
