/* Collection interactions use the same slate palette as the expedition. */
.crate-art { object-fit:contain; width:100%; height:100%; }
.expedition-crates { display:flex; align-items:center; gap:8px; padding:8px 14px; border:1px solid #6c8495; border-radius:18px; background:#233c50; color:#f4ead4; text-align:left; cursor:pointer; min-width:220px; }
.expedition-crates>.crate-art { width:78px; height:78px; flex:none; }
.crate-widget-copy { display:grid; gap:3px; }
.crate-widget-copy small { color:#b9cbd5; font-size:.66rem; }
.crate-widget-copy b { font-size:1.05rem; }
.crate-widget-copy>span { color:#a5dfbb; font-size:.75rem; }
.has-crates>.crate-art { animation:crate-wiggle 3s ease-in-out infinite; }
.expedition-crates:disabled { opacity:.65; cursor:default; }
.room-crates-button { display:flex; align-items:center; justify-content:center; gap:8px; margin:0 auto 14px; padding:3px 16px 3px 5px; border:1px solid #71909d; border-radius:30px; background:#233d50; color:#f5e7c8; cursor:pointer; font-weight:800; }
.room-crates-button img { width:48px; height:48px; object-fit:contain; }
.room-crates-button b { background:#3f6b64; padding:3px 8px; border-radius:12px; }
.forge-hotspot { position:absolute; left:76.8%; top:39%; width:23.2%; height:46%; padding:0; border:0; border-radius:20%; background:transparent; cursor:pointer; color:#ffebc8; }
.forge-hotspot>span { position:absolute; top:0; left:50%; transform:translateX(-50%); padding:8px 18px; border:1px solid #dca66d; border-radius:22px; background:#263c50ed; box-shadow:0 3px 14px #070f1d88; font-weight:900; white-space:nowrap; animation:forge-bob 2.8s ease-in-out infinite; }
.forge-hotspot.is-ready>span { border-color:#a7ebae; box-shadow:0 0 20px #98e6a966; }
.forge-hotspot:focus-visible { outline:3px solid #c0e8c9; outline-offset:-4px; }
#crateDialog,#forgeDialog { width:min(620px,calc(100vw - 28px)); color:#ecf3ed; background:#23394c; border:1px solid #617487; border-radius:24px; }
#crateDialog .dialog-header,#forgeDialog .dialog-header { background:#23394c; }
#crateSubtitle,.loot-note,.forge-note,#forgeReadyNote,#forgeOwned { color:#b5c7d2; font-size:.82rem; line-height:1.5; }
.crate-actions { display:flex; flex-wrap:wrap; gap:10px; margin:16px 0; }
.crate-stage-group h3,.find-summary h3 { color:#e9d3ac; font-size:.95rem; }
.crate-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(95px,1fr)); gap:10px; }
.crate-choice { display:grid; justify-items:center; padding:6px; border:1px solid #5a7386; border-radius:15px; color:#d9e9e2; background:#1a3042; cursor:pointer; }
.crate-choice .crate-art { width:100%; height:100px; }
.crate-choice span { font-size:.75rem; padding-bottom:6px; }
.crate-choice:hover { background:#304d60; border-color:#c7ab7b; }
.crate-choice:disabled { cursor:wait; opacity:.6; }
.empty-crates { text-align:center; color:#b9cbd3; line-height:1.5; }
.empty-crates img { width:135px; height:135px; }
.find-summary { text-align:center; }
.find-summary-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(100px,1fr)); gap:12px; margin:18px 0; }
.find-result { display:flex; flex-direction:column; align-items:center; padding:12px 5px; background:#1c3144; border-radius:16px; }
.find-result .trophy-sprite { width:90px; height:82px; max-width:100%; }
.find-result b { font-size:.85rem; margin:5px 0; }
.find-result>span:last-child { color:#a7d5be; }
.find-summary-note { color:#bdd0d8; font-size:.8rem; }
.dust-pile { display:block; width:90px; height:82px; max-width:100%; object-fit:contain; }
.crate-opening { position:relative; height:240px; overflow:hidden; }
.crate-fragment { position:absolute; inset:20px calc(50% - 100px); width:200px; height:200px; animation:crate-break .65s ease-out both; }
.piece-0 { clip-path:polygon(0 0,50% 0,50% 50%,0 50%); --break-x:-75px; --break-y:-45px; --break-r:-22deg; }
.piece-1 { clip-path:polygon(50% 0,100% 0,100% 50%,50% 50%); --break-x:75px; --break-y:-45px; --break-r:22deg; }
.piece-2 { clip-path:polygon(0 50%,50% 50%,50% 100%,0 100%); --break-x:-65px; --break-y:55px; --break-r:-35deg; }
.piece-3 { clip-path:polygon(50% 50%,100% 50%,100% 100%,50% 100%); --break-x:65px; --break-y:55px; --break-r:35deg; }
.forge-target-label { display:grid; gap:8px; color:#c5d6df; font-size:.8rem; }
#forgeTarget { width:100%; padding:12px; color:#f3eee1; background:#192e40; border:1px solid #648292; border-radius:12px; font:inherit; }
.forge-output { text-align:center; padding:12px 0; }
#forgePreview .trophy-sprite { width:150px; height:130px; max-width:100%; margin:auto; }
#forgeTreasureName { margin:5px 0; color:#f1d3a2; }
#forgeOwned { margin:4px 0; }
.forge-ingredients { display:flex; justify-content:center; gap:12px; flex-wrap:wrap; margin:18px 0; }
.forge-ingredient { position:relative; width:112px; display:grid; justify-items:center; padding:12px 6px; border:1px solid #69808d; background:#1b3042; border-radius:16px; gap:6px; }
.forge-ingredient .trophy-sprite { width:86px; height:76px; }
.forge-ingredient>span { font-size:.75rem; color:#c3d5df; }
.ingredient-count { padding:4px 12px; border-radius:12px; background:#435361; color:#e4e5df; font-size:.85rem; }
.forge-ingredient.is-enough { border-color:#85cfa1; background:#254a45; }
.is-enough .ingredient-count { background:#397951; color:#e7ffe9; }
#forgeButton { display:block; width:100%; margin:18px 0 10px; padding:14px; border:1px solid #6e8591; border-radius:14px; background:#405361; color:#b3c2c9; font:inherit; font-weight:900; cursor:pointer; }
#forgeButton:disabled { cursor:default; opacity:.65; }
#forgeButton.is-ready { background:#397c5e; color:#fff5da; border-color:#b1efba; box-shadow:0 0 18px #8ed4a649; }
#forgeReadyNote,#forgeMessage,#crateMessage { text-align:center; min-height:1.4em; }
.forge-success,.is-revealed { animation:forge-reveal .4s ease-out; }
#crateToss { position:relative; display:inline-block; width:1px; height:1px; pointer-events:none; }
.crate-toss { position:absolute; width:43px; height:43px; right:0; bottom:0; animation:crate-toss 1s var(--toss-delay,0ms) ease-out both; }
.crate-toss-note { position:absolute; right:0; top:8px; white-space:nowrap; color:#d3c497; font-size:.7rem; animation:forge-reveal .25s ease-out; }
@keyframes crate-wiggle { 0%,65%,100% { transform:rotate(0); } 70%,80% { transform:rotate(-5deg); } 75%,85% { transform:rotate(5deg); } }
@keyframes forge-bob { 0%,100% { translate:0 0; } 50% { translate:0 -5px; } }
@keyframes crate-break { 0%,20% { transform:translate(0,0) rotate(0); opacity:1; } 100% { transform:translate(var(--break-x),var(--break-y)) rotate(var(--break-r)); opacity:0; } }
@keyframes forge-reveal { from { opacity:.3; transform:scale(.9); } to { opacity:1; transform:scale(1); } }
@keyframes crate-toss { 0% { transform:translate(0,0) scale(.4) rotate(-20deg); opacity:0; } 25% { opacity:1; } 55% { transform:translate(var(--toss-x),-50px) scale(1) rotate(10deg); opacity:1; } 100% { transform:translate(var(--toss-x),-10px) scale(.8) rotate(25deg); opacity:0; } }
@media(max-width:600px) { .expedition-crates { width:100%; grid-column:1/-1; } .forge-hotspot { left:69%; top:74%; width:29.7%; height:13%; } .forge-hotspot>span { padding:6px 13px; font-size:.8rem; } .forge-ingredient { width:92px; } .forge-ingredient .trophy-sprite { width:72px; } }
@media(prefers-reduced-motion:reduce) { .has-crates>.crate-art,.forge-hotspot>span,.crate-toss,.crate-fragment,.forge-success,.is-revealed { animation:none; } .crate-toss { display:none; } }

.expedition-summary { display:grid; grid-template-columns:auto minmax(0,1fr); gap:16px 20px; }
.expedition-summary>.expedition-crates { grid-column:1 / -1; width:100%; min-width:0; margin:0; }
.crate-footnote,.forge-preserve-note { text-align:center; font-size:.73rem; line-height:1.5; color:#b5c7d2; }
@media(max-width:600px) { .expedition-summary { column-gap:10px; } }

.forge-keep-toggle { display:flex; align-items:center; justify-content:center; gap:9px; margin:18px 0 7px; padding:10px; border:1px solid #637c88; border-radius:12px; background:#1b3042; color:#d5e3e7; font-size:.8rem; line-height:1.4; cursor:pointer; }
.forge-keep-toggle input { accent-color:#79ce9d; width:18px; height:18px; flex:none; margin:0; }
.forge-keep-toggle:focus-within { outline:2px solid #a0ddc2; outline-offset:3px; }
