/* All styling is scoped to the additive collection modes. */
.collect-expansion-switch{display:flex;flex-wrap:wrap;gap:.5rem;margin-block:1rem}
.collect-expansion-switch button[aria-pressed=true]{background:#355f54;color:#fff;border-color:#355f54}
.collect-expansion{--cex-ink:#29483f;--cex-sage:#dce8d8;--cex-paper:#fffcf3;color:var(--cex-ink);max-width:1100px;margin:auto;padding-block:.5rem 1.5rem}
.collect-expansion *{box-sizing:border-box}
.collect-expansion button,.collect-expansion select{font:inherit;min-height:48px;border:1.5px solid #b4c4b4;border-radius:14px;background:#fffcf3;color:#29483f;max-width:100%;padding:.65rem .85rem;cursor:pointer;touch-action:manipulation}
.collect-expansion button:disabled{cursor:default;opacity:.52}
.collect-expansion button:focus-visible,.collect-expansion select:focus-visible,.collect-expansion summary:focus-visible,.collect-expansion-switch button:focus-visible{outline:3px solid #386ba0;outline-offset:3px}
.collect-expansion button[aria-pressed=true]{border-color:#315f52;background:#e3efdf;box-shadow:inset 0 0 0 2px #315f52}
.collect-expansion img{display:block;object-fit:contain;max-width:100%;pointer-events:none;user-select:none}
.cex-settings{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.8rem;background:#f0f3e8;border-radius:18px;padding:1rem}
.cex-settings label{display:flex;flex-direction:column;gap:.4rem;font-weight:650;min-width:0}
.cex-settings select{width:100%;background:#fffdf6;font-weight:400}
.cex-intro{line-height:1.65;margin:1rem 0 .4rem}
.cex-progress{font-size:.95rem;display:flex;align-items:center;gap:.75rem;margin-block:.4rem 1rem}
.cex-progress b{display:inline-block;padding:.25rem .7rem;border-radius:20px;background:#dfead9;white-space:nowrap}
.cex-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(126px,1fr));gap:.75rem;margin-block:1rem}
.cex-card{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.4rem;min-width:0!important;width:100%;min-height:166px!important;text-align:center;overflow-wrap:anywhere}
.cex-card img{width:100%;height:112px}
.cex-card strong,.cex-kept strong,.cex-goal strong,.cex-focus-card strong{display:block;line-height:1.5;font-size:1rem;overflow-wrap:anywhere}
.cex-card img.cex-scene{height:auto;aspect-ratio:3/2;object-fit:contain}
.cex-scenes{grid-template-columns:repeat(auto-fit,minmax(210px,1fr))}
.cex-selection{min-height:1.7rem;margin-block:.5rem;font-weight:650}
.cex-actions,.cex-methods{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;margin-block:1rem}
.cex-actions button[data-cex-action=add],.cex-actions button[data-cex-action=pair],.cex-bin>button{background:#355f54;color:white}
.cex-status{border-inline-start:4px solid #7a9b78;background:#eef3e8;border-radius:8px;padding:1rem;line-height:1.6;min-height:3.4rem}
.cex-stage{position:relative;isolation:isolate;border-radius:24px;overflow:hidden;border:1px solid #d5bea2;min-height:310px;margin-block:1rem;background:#e7dbc4}
.cex-stage .cex-backdrop{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-1}
.cex-stage-content{padding:clamp(.7rem,3vw,1.6rem)}
.cex-stage h4{background:#fffcf3ed;border-radius:10px;padding:.45rem .8rem;display:table;margin:0 0 1rem}
.cex-stage .cex-card,.cex-stage .cex-kept{background:#fffcf3f2}
.cex-empty{background:#fffcf3e8;border-radius:15px;padding:1rem;display:table;margin:5rem auto 1rem}
.cex-kept-grid{grid-template-columns:repeat(auto-fit,minmax(110px,1fr))}
.cex-kept{display:flex;align-items:center;flex-direction:column;border:1px solid #cbb89c;border-radius:16px;padding:.6rem;min-width:0;gap:.4rem;background:#fffcf3}
.cex-kept img{height:88px;width:100%}
.cex-kept button{font-size:.88rem;width:100%}
.cex-bins{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1rem;margin-block:1rem}
.cex-bin{border:2px solid #bba482;border-radius:20px;background:#f2e7d3;padding:1rem;min-width:0}
.cex-bin h4{margin:0 0 1rem;line-height:1.5}
.cex-bin>.cex-grid{min-height:120px;align-content:start}
.cex-bin>button{width:100%}
.cex-goals{display:flex;flex-wrap:wrap;gap:.6rem}
.cex-goal{position:relative;display:flex;align-items:center;flex-direction:column;background:#fffaf0;border:2px dashed #b2c1a7;border-radius:16px;padding:.5rem;max-width:135px;flex:1 1 95px;text-align:center}
.cex-goal img{width:74px;height:74px}
.cex-goal.cex-collected{border-style:solid;background:#e1ecd9}
.cex-goal>span{position:absolute;inset-inline-end:7px;top:4px;color:#315f52}
.cex-link{display:grid;grid-template-columns:minmax(0,1fr) 24px minmax(0,1fr);align-items:center;gap:1rem;max-width:680px;margin:2rem auto}
.cex-link>span{text-align:center;font-size:1.8rem;color:#fff;background:#355f54;border-radius:50%;line-height:1.1}
.cex-focus-card,.cex-covered,.cex-model{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;border-radius:20px;padding:1rem;background:#fffcf3f2;min-height:200px;text-align:center}
.cex-focus-card img,.cex-model img{width:150px;height:150px}
.cex-covered{font-size:3rem;background:#d8e5d5e8;color:#4d7461;border:3px dashed #527665}
.cex-focus-stage{min-height:245px}
.cex-focus-stage .cex-focus-card{width:min(300px,90%);margin:.5rem auto}
.cex-focus-card.cex-action-card{width:min(400px,96%)}
.cex-action-card img.cex-scene{width:100%;height:auto;aspect-ratio:3/2}
.cex-model{width:220px;max-width:100%;margin:1rem auto;border:2px solid #c6b58b;background:#fffaf0}
.cex-memory-grid{grid-template-columns:repeat(auto-fit,minmax(142px,1fr));align-items:stretch}
.cex-memory-grid.cex-large{grid-template-columns:repeat(auto-fit,minmax(205px,1fr))}
.cex-memory-card{min-height:210px!important}
.cex-memory-card small{font-size:.8rem}
.cex-memory-card.cex-open{outline:3px solid #4a7b68;outline-offset:0}
.cex-card-back{font-size:3.7rem;line-height:1.7;color:#7c9a72}
.cex-hint{outline:4px dashed #b57b25!important;outline-offset:2px}
.cex-help{padding:1rem;background:#f7f1e5;border-radius:14px;line-height:1.7;margin-block:1rem}
.cex-help summary{cursor:pointer;min-height:44px;display:list-item}
@media(max-width:600px){
 .cex-settings{grid-template-columns:1fr;padding:.75rem;gap:.65rem}
 .cex-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem}
 .cex-card{min-height:145px!important;padding:.5rem!important}
 .cex-card img{height:92px}
 .cex-bins{grid-template-columns:1fr}
 .cex-scenes{grid-template-columns:1fr 1fr}
 .cex-kept-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .cex-memory-grid.cex-large{grid-template-columns:1fr}
 .cex-memory-grid.cex-large img{height:180px}
 .cex-link{gap:.4rem;grid-template-columns:minmax(0,1fr) 20px minmax(0,1fr);margin:1rem auto}
 .cex-focus-card,.cex-covered{min-height:160px;padding:.5rem}
 .cex-focus-card img{width:100%;height:110px}
 .cex-stage{border-radius:16px;min-height:250px}
 .cex-stage-content{padding:.65rem}
 .cex-actions button,.cex-methods button{flex:1 1 120px}
 .cex-status{padding:.8rem}
}
@media(prefers-reduced-motion:reduce){.collect-expansion *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
