/* Field Drops (js/field-drops.js): the supply crate that lands on the finish card. Over the card (#modal 30, the ceremony 35), under
   the toasts (50). The fall, landing, glow and pop are classes the script adds in turn: falling, landed, glow, open, done. Calm and
   reduced motion show the landed, open crate as a still. */
.fdrop { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: calc(var(--safe-t) + 12px) 16px calc(var(--safe-b) + 16px); overflow: hidden; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.fd-dim { position: absolute; inset: 0; background: radial-gradient(ellipse 70% 46% at 50% 44%, rgba(40, 46, 26, .55), rgba(4, 5, 4, .82)); animation: fdFade .3s ease-out both; }
.fdrop.leaving { animation: fdFade .24s ease-in reverse both; pointer-events: none; }
.fd-stage { position: relative; width: 280px; height: 300px; flex: none; }

/* ground: the shadow sharpens and grows as the crate comes down */
.fd-shadow { position: absolute; left: 50%; bottom: 22px; width: 210px; height: 30px; margin-left: -105px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .62), rgba(0, 0, 0, 0)); }
.fdrop.falling .fd-shadow { animation: fdShadow 1.35s cubic-bezier(.3, .55, .5, 1) both; }

/* the crate under its canopy */
.fd-fall { position: absolute; left: 50%; bottom: 36px; width: 150px; margin-left: -75px; }
.fdrop.falling .fd-fall { animation: fdFall 1.35s cubic-bezier(.3, .55, .5, 1) both; }
.fd-sway { position: relative; transform-origin: 50% -60px; }
.fdrop.falling:not(.landed) .fd-sway { animation: fdSway 1.35s ease-in-out both; }
.fd-chute { position: absolute; left: 50%; bottom: 96px; width: 178px; margin-left: -89px; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .35)); transform-origin: 50% 100%; }
.fdrop.landed .fd-chute { animation: fdChute .7s ease-in both; }
.fdrop.calm .fd-chute, .fdrop.done .fd-chute { display: none; }
.fd-crate { position: relative; width: 150px; transform-origin: 50% 100%; }
.fd-crate-svg { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .35)); }
.fdrop.landed .fd-crate { animation: fdSquash .42s cubic-bezier(.3, 1.6, .5, 1) both; }
.fdrop.landed .fd-stage { animation: fdShake .32s linear both; }
.fd-lid { transform-box: fill-box; transform-origin: 8% 100%; transition: transform .45s cubic-bezier(.2, 1.5, .4, 1), opacity .5s; }
.fd-lid { transition: transform .5s cubic-bezier(.2, 1.1, .5, 1), opacity .45s .12s; }
.fdrop.open .fd-lid { transform: translate(-46px, -70px) rotate(-38deg); opacity: 0; }
.fdrop.calm .fd-lid { display: none; }

/* dust thrown out along the ground on landing */
.fd-dust { position: absolute; left: 50%; bottom: 40px; width: 0; height: 0; }
.fd-dust i { position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, rgba(236, 222, 184, .95), rgba(176, 152, 108, .6) 55%, rgba(120, 100, 70, 0) 72%); opacity: 0; }
.fdrop.landed .fd-dust i { animation: fdDust .8s cubic-bezier(.15, .7, .3, 1) both; }
.fdrop.calm .fd-dust { display: none; }

/* the glow before it opens: a soft pulse, gold for a Super Spin */
.fd-glow { position: absolute; inset: -34px -30px -14px; border-radius: 50%; background: radial-gradient(closest-side, rgba(226, 255, 190, .55), rgba(170, 230, 120, .18) 55%, rgba(0, 0, 0, 0)); opacity: 0; pointer-events: none; mix-blend-mode: screen; }
.fdrop.glow .fd-glow { animation: fdGlow .9s ease-in-out 2 both; }
.fdrop.super .fd-glow { background: radial-gradient(closest-side, rgba(255, 226, 120, .95), rgba(242, 183, 5, .45) 50%, rgba(0, 0, 0, 0)); inset: -56px -50px -26px; }
.fdrop.super.glow .fd-glow { animation: fdGlowGold .65s ease-in-out 2 both; }
.fdrop.super.glow .fd-star, .fdrop.super.calm .fd-star { fill: #ffd86a; filter: drop-shadow(0 0 4px #ffcf3a); transition: fill .3s; }
.fdrop.super.glow .fd-roundel, .fdrop.super.calm .fd-roundel { stroke: #ffd86a; transition: stroke .3s; }
.fdrop.super.glow .fd-crate-svg { filter: drop-shadow(0 0 10px rgba(255, 205, 60, .9)) drop-shadow(0 3px 0 rgba(0, 0, 0, .35)); }
.fd-rays { position: absolute; left: 50%; top: 46%; width: 0; height: 0; opacity: 0; }
.fd-rays i { position: absolute; left: -9px; bottom: 0; width: 18px; height: 190px; transform-origin: 50% 100%; transform: rotate(var(--r)); background: linear-gradient(rgba(255, 214, 90, 0), rgba(255, 214, 90, .5)); clip-path: polygon(50% 100%, 0 0, 100% 0); }
.fdrop.super.glow .fd-rays { animation: fdRays 4s linear infinite, fdFade .5s ease-out both; opacity: 1; }
.fdrop.super.calm .fd-rays { opacity: .7; }

/* the pop: a flash at the lid, the spin rises out of the crate */
.fd-burst { position: absolute; left: 50%; bottom: 120px; width: 220px; height: 220px; margin: 0 0 -110px -110px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 240, .95), rgba(255, 236, 170, .35) 45%, rgba(0, 0, 0, 0)); opacity: 0; pointer-events: none; }
.fdrop.open:not(.calm) .fd-burst { animation: fdBurst .55s ease-out both; }
.fdrop.super .fd-burst { background: radial-gradient(closest-side, rgba(255, 246, 200, 1), rgba(255, 200, 60, .55) 45%, rgba(0, 0, 0, 0)); }
.fd-prize { position: absolute; left: 50%; bottom: 122px; width: 156px; height: 156px; margin-left: -78px; opacity: 0; transform: translateY(70px) scale(.35); transition: transform .55s cubic-bezier(.2, 1.4, .4, 1) .08s, opacity .25s .08s; pointer-events: none; }
.fd-prize canvas { width: 156px; height: 156px; display: block; }
.fdrop.open .fd-prize { opacity: 1; transform: none; }
.fdrop.calm .fd-prize { transition: none; }

/* the card: what it is, Spin now or Later, and the "i" */
.fd-card { position: relative; width: min(100%, 340px); padding: 12px 14px 10px; text-align: center; background: linear-gradient(180deg, #1d1c18, #121110); border: 1px solid #6d6650; border-bottom: 4px solid #4e4836; box-shadow: inset 0 0 0 3px #0c0b0a, 0 10px 26px rgba(0, 0, 0, .5); opacity: 0; transform: translateY(14px); transition: opacity .3s, transform .35s cubic-bezier(.2, 1.3, .4, 1); pointer-events: none; }
.fdrop.done .fd-card { opacity: 1; transform: none; pointer-events: auto; }
.fdrop.super .fd-card { border-color: #c79a2c; border-bottom-color: #8a6614; box-shadow: inset 0 0 0 3px #0c0b0a, 0 0 22px rgba(242, 183, 5, .28), 0 10px 26px rgba(0, 0, 0, .5); }
.fd-eyebrow { display: inline-flex; align-items: center; gap: 6px; color: #b9c48a; font: 400 15px var(--display); letter-spacing: .12em; text-transform: uppercase; }
.fd-eyebrow svg { width: 16px; height: 16px; }
.fdrop.super .fd-card .fd-eyebrow { color: #f2c84a; }
.fd-card h3 { margin: 2px 0 2px; font: 400 32px/1 var(--display); text-transform: uppercase; color: var(--fg); }
.fdrop.super .fd-card h3 { color: #ffd86a; text-shadow: 0 0 12px rgba(242, 183, 5, .45); }
.fd-card p { margin: 0 0 10px; color: #c9c3b4; font-size: 14px; line-height: 1.3; }
.fd-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; }
.fd-actions .btn { width: 100%; min-height: 48px; margin: 0; }
.fd-hint { display: block; margin-top: 7px; color: #8f8a84; font-size: 12px; }
.fd-info-btn { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; padding: 0; border-radius: 50%; border: 2px solid #8a8466; background: #1a1916; color: #e9e3c6; font: italic 700 18px/28px Georgia, serif; cursor: pointer; }
.fd-info-btn::after { content: ''; position: absolute; inset: -7px; } /* a 48 px target */
.fd-info { position: absolute; left: 50%; bottom: calc(var(--safe-b) + 16px); width: min(calc(100% - 32px), 360px); transform: translateX(-50%); padding: 14px; background: #141310; border: 1px solid #6d6650; border-bottom: 4px solid #4e4836; box-shadow: inset 0 0 0 3px #0b0a09, 0 12px 30px rgba(0, 0, 0, .6); color: #d8d2c2; font-size: 14px; line-height: 1.35; max-height: calc(100dvh - var(--safe-t) - var(--safe-b) - 40px); overflow-y: auto; }
.fd-info p { margin: 8px 0; }
.fd-info .fd-fine { color: #9a948a; font-size: 13px; }
.fd-info .btn { width: 100%; min-height: 46px; margin-top: 8px; }
.fd-odds { margin: 8px 0 0; border-top: 1px solid #3a372d; padding-top: 8px; }
.fd-odds summary { cursor: pointer; font: 400 18px var(--display); text-transform: uppercase; color: #e9e3c6; min-height: 32px; }
.fdrop.info .fd-card { visibility: hidden; }

/* the finish card takes the thud */
.finish.fd-nudge, .war-after.fd-nudge { animation: fdNudge .38s cubic-bezier(.3, .6, .4, 1); }

@keyframes fdFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fdFall { 0% { transform: translateY(-112vh); } 78% { transform: translateY(-14px); } 100% { transform: translateY(0); } }
@keyframes fdSway { 0% { transform: rotate(-7deg); } 30% { transform: rotate(5deg); } 60% { transform: rotate(-4deg); } 85% { transform: rotate(2deg); } 100% { transform: rotate(0); } }
@keyframes fdShadow { 0% { transform: scale(.18); opacity: .1; } 80% { transform: scale(.85); opacity: .8; } 100% { transform: scale(1); opacity: 1; } }
@keyframes fdChute { 0% { transform: none; opacity: 1; } 45% { transform: translate(18px, 40px) scale(1.04, .55) rotate(10deg); opacity: .9; } 100% { transform: translate(84px, 96px) scale(.8, .2) rotate(26deg); opacity: 0; } }
@keyframes fdSquash { 0% { transform: scale(1.12, .82); } 45% { transform: scale(.95, 1.07); } 100% { transform: none; } }
@keyframes fdShake { 0% { transform: translate(0, 5px); } 25% { transform: translate(-3px, -2px); } 50% { transform: translate(2px, 1px); } 75% { transform: translate(-1px, 0); } 100% { transform: none; } }
@keyframes fdDust { 0% { opacity: .95; transform: translate(0, 0) scale(.4); } 100% { opacity: 0; transform: translate(calc(cos(var(--a)) * var(--d) * 1.6), calc(sin(var(--a)) * var(--d) * .32 - 14px)) scale(calc(var(--s) * 2.4)); } }
@keyframes fdGlow { 0%, 100% { opacity: 0; transform: scale(.85); } 50% { opacity: 1; transform: scale(1.05); } }
@keyframes fdGlowGold { 0% { opacity: .2; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.12); } 100% { opacity: .55; transform: scale(.95); } }
@keyframes fdRays { to { transform: rotate(360deg); } }
@keyframes fdBurst { 0% { opacity: 0; transform: scale(.3); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(1.5); } }
@keyframes fdNudge { 0% { transform: none; } 30% { transform: translateY(7px); } 60% { transform: translateY(-3px); } 100% { transform: none; } }

.fdrop.calm *, .fdrop.calm { animation: none !important; }
.fdrop.super.calm .fd-glow { opacity: .75; }
@media (prefers-reduced-motion: reduce) { .fdrop *, .fdrop, .finish.fd-nudge { animation: none !important; transition: none !important; } }
@media (max-height: 640px) { .fd-stage { height: 250px; transform: scale(.86); margin: -18px 0 -24px; } .fd-card h3 { font-size: 27px; } }
.fdrop.super .fd-in-hot { stop-color: #ffd34a; }
/* a short landscape phone: the crate beside its card */
@media (max-height: 480px) { .fdrop { flex-direction: row; gap: 10px; } .fd-stage { transform: scale(.74); margin: -39px -36px; } .fd-card { width: min(46vw, 340px); } .fd-info { bottom: calc(var(--safe-b) + 8px); max-height: calc(100dvh - 16px); } }
