/* Existing cream paper dialog, wooden header, and centered individual loot PNGs. */
.craft-wallet{padding:10px;border:3px double #bda778;border-radius:7px;background:#fff9ed;font-size:15px}
.craft-wallet small{color:#625440;display:block;font-size:11px;line-height:1.6;margin-top:5px}
.craft-list{display:grid;gap:12px;margin-top:10px}
.craft-card{border:2px solid #c3b496;border-radius:8px;background:#fff9ed;padding:10px;min-width:0}
.craft-card header{display:flex;align-items:center;gap:9px}
.craft-card .loot-icon{width:56px;height:56px;object-fit:contain;flex:none}
.craft-card h3{font-size:16px;margin:0 0 4px}
.craft-card p{font-size:12px;line-height:1.7;margin:4px 0}
.craft-card ul{list-style:none;margin:9px 0;padding:0;font-size:12px}
.craft-card li{display:flex;flex-wrap:wrap;justify-content:space-between;gap:2px 8px;line-height:1.8}
.craft-shortage{color:#8c3528;font-weight:700}
.craft-card footer{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:8px;font-size:13px}
#prepDialog [data-craft],#prepDialog #craftPrepare{min-height:44px;padding:7px 14px;border:3px double #dac388;border-radius:8px;background:linear-gradient(#527343,#2b4932);color:#fff3d6}
#prepDialog [data-craft]:disabled{background:#e1d7c3;color:#635644;border-color:#b6a688;opacity:1}
.craft-notice:empty{display:none}
.craft-notice{margin-top:10px;padding:10px;background:#eee9cb;border:1px solid #acac77;border-radius:7px;font-size:13px;line-height:1.8}
#craftPrepare{display:block;width:100%;margin-top:7px}
.craft-footnote{font-size:11px;line-height:1.8;margin-top:12px}

/* Each sprite, caption and light stays independent for a future Unity UI timeline. */
.craft-success-item{display:flex;align-items:center;gap:10px}
.craft-success-item .loot-icon{width:64px;height:64px;object-fit:contain;flex:none}
#prepDialog .craft-effect{position:fixed;inset:0;z-index:5;width:100%;height:100%;margin:0;padding:12px;border:0;border-radius:0;background:#30271966;color:#453c2c;display:grid;place-items:center;overflow:hidden;cursor:pointer;touch-action:manipulation;animation:craft-veil-in 120ms ease-out both}
#prepDialog .craft-effect:hover{filter:none}
#prepDialog .craft-effect:focus-visible{outline:3px solid #d4c49c;outline-offset:-6px}
.craft-effect-stage{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;width:min(360px,100%);height:min(370px,calc(100dvh - 24px));isolation:isolate}
.craft-effect-stage::before{content:'';position:absolute;inset:0 -8px;z-index:-1;border-radius:50%;background:radial-gradient(ellipse,#fff8e8f5 0%,#f8f0dce8 40%,#f7efd77a 60%,transparent 73%);pointer-events:none}
.craft-effect-heading{font-size:12px;letter-spacing:.13em;color:#5c6445;margin-bottom:10px}
.craft-effect-point{position:relative;display:block;width:100%;height:172px;flex:none}
.craft-effect-glow,.craft-effect-ring,.craft-effect-equipment,.craft-effect-material,.craft-effect-spark{position:absolute;left:50%;top:50%}
.craft-effect-glow{width:160px;height:160px;margin:-80px;background:radial-gradient(circle,#fff5cccf,#a7ba7f55 45%,transparent 70%);border-radius:50%;opacity:.35}
.craft-effect-ring{width:82px;height:28px;margin:-14px -41px;border:2px solid #b7a36688;border-radius:50%;box-shadow:0 0 10px #d4d3a780;transform:translateY(18px)}
.craft-effect-material{width:116px;margin:-33px -58px;display:flex;align-items:center;flex-direction:column;gap:2px;opacity:0;visibility:hidden}
.craft-effect-material .loot-icon{width:58px;height:58px;object-fit:contain;filter:drop-shadow(0 3px 2px #5e482a25)}
.craft-effect-material>span{background:#fff8eae8;border-radius:9px;padding:2px 5px;white-space:nowrap;font-size:10px;line-height:1.5;color:#51412d}
.craft-effect-material em{font-style:normal;font-weight:700;margin-left:4px}
.craft-effect-equipment{width:120px;height:120px;margin:-60px;opacity:0;filter:drop-shadow(0 6px 5px #5e482a33)}
.craft-effect-equipment .loot-icon{width:100%;height:100%;object-fit:contain}
.craft-effect-spark{color:#b49c55;font-size:21px;line-height:1;opacity:0;margin:-10px}
.craft-effect-spark:nth-child(even){color:#83965f}
.craft-effect-caption{position:relative;max-width:100%;padding:6px 12px;border-radius:10px;background:#fff8eae6;font-size:17px;font-weight:700;text-align:center;line-height:1.6;overflow-wrap:anywhere}
#prepDialog .craft-effect-action{min-height:44px;min-width:132px;margin-top:12px;padding:7px 20px;border:3px double #dac388;border-radius:9px;background:linear-gradient(#527343,#2b4932);color:#fff3d6;font-size:14px}
#prepDialog #craftEffectSkip{background:#fff8eae8;color:#51412d;font-size:12px}
#prepDialog .craft-effect[data-phase=reveal]{cursor:default}
.craft-effect[data-phase=gather] .craft-effect-material{visibility:visible;animation:craft-material-gather 1600ms ease-in both}
.craft-effect[data-phase=mix] .craft-effect-glow{animation:craft-mix-light 900ms ease-out both}
.craft-effect[data-phase=mix] .craft-effect-ring{animation:craft-mix-ring 900ms ease-out both}
.craft-effect[data-phase=reveal] .craft-effect-glow{animation:craft-reveal-glow 1050ms ease-out both}
.craft-effect[data-phase=reveal] .craft-effect-equipment{animation:craft-equipment-pop 650ms ease-out both}
.craft-effect[data-phase=reveal] .craft-effect-spark{animation:craft-spark 600ms ease-out both}
.craft-effect[data-phase=reveal] .craft-effect-caption{animation:craft-veil-in 200ms ease-out both}
@keyframes craft-veil-in{from{opacity:0}to{opacity:1}}
@keyframes craft-material-gather{0%,40%{opacity:1;transform:translate(var(--material-x),var(--material-y)) scale(1)}55%{opacity:1;transform:translate(var(--material-x),calc(var(--material-y) - 8px)) scale(1)}100%{opacity:0;transform:translate(0,0) scale(.25)}}
@keyframes craft-mix-light{0%{opacity:.35;transform:scale(.7)}65%{opacity:1;transform:scale(1.12)}100%{opacity:.8;transform:scale(1)}}
@keyframes craft-mix-ring{0%{opacity:.8;transform:translateY(18px) scale(1)}100%{opacity:0;transform:translateY(18px) scale(1.7)}}
@keyframes craft-reveal-glow{0%{opacity:.8}35%{opacity:1}100%{opacity:0}}
@keyframes craft-equipment-pop{0%{opacity:0;transform:scale(.85)}28%{opacity:1}65%{opacity:1;transform:scale(1.05)}100%{opacity:1;transform:scale(1)}}
@keyframes craft-spark{0%{opacity:0;transform:translate(0,0) scale(.6)}30%{opacity:.8}100%{opacity:0;transform:translate(var(--spark-x),var(--spark-y)) scale(1)}}
#prepDialog .craft-effect.is-skipped *{animation:none}
#prepDialog .craft-effect.is-skipped .craft-effect-equipment{opacity:1;transform:none}
/* Also honor a preference change while a normal timeline is already running. */
#prepDialog .craft-effect.reduced-motion,#prepDialog .craft-effect.reduced-motion *{animation:none;transform:none}
#prepDialog .craft-effect.reduced-motion[data-phase=gather] .craft-effect-material{opacity:1;transform:translate(var(--material-x),var(--material-y))}
#prepDialog .craft-effect.reduced-motion[data-phase=mix] .craft-effect-glow{animation:craft-veil-in 120ms ease-out both}
#prepDialog .craft-effect.reduced-motion[data-phase=reveal] .craft-effect-equipment{animation:craft-veil-in 120ms ease-out both;opacity:1}
@media(prefers-reduced-motion:reduce){
 #prepDialog .craft-effect,#prepDialog .craft-effect *{animation:none;transform:none}
 #prepDialog .craft-effect[data-phase=gather] .craft-effect-material{opacity:1;transform:translate(var(--material-x),var(--material-y))}
 #prepDialog .craft-effect[data-phase=mix] .craft-effect-glow{animation:craft-veil-in 120ms ease-out both}
 #prepDialog .craft-effect[data-phase=reveal] .craft-effect-equipment{animation:craft-veil-in 120ms ease-out both;opacity:1}
}
@media(max-height:400px){.craft-effect-point{height:132px}.craft-effect-heading{margin-bottom:0}.craft-effect-stage{height:270px}.craft-effect-equipment{width:100px;height:100px;margin:-50px}.craft-effect-caption{font-size:15px}#prepDialog .craft-effect-action{margin-top:4px}.craft-effect-material{--material-y:-36px!important}}
