/* Collection is a set of screen-sized panels, with every route kept in view. */
.modal.collection-screen,.modal.piece-screen{max-width:500px;padding:16px;max-height:calc(100dvh - 32px);overflow-y:auto;border-radius:25px}
.collection-screen .modal-close,.piece-screen .modal-close{top:12px;right:12px;width:40px;height:40px}
.collection-top{padding:3px 44px 0 2px}.collection-top .modal-eyebrow{margin:0 0 4px;font-size:12px;letter-spacing:1px}.collection-top h2{font-size:27px;font-weight:700;margin:0 0 12px;text-wrap:initial}
.collection-balance{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:5px 16px;min-height:34px;padding:5px 8px;background:#f0e8dc;border:1px solid #e1d2be;border-radius:12px;color:#633d64;font-size:14px;line-height:1.3}
.collection-balance>span{display:flex;align-items:center;gap:4px;white-space:nowrap}.collection-balance svg{width:17px;height:17px}.collection-balance>span:first-child svg{color:#a06d14}
.collection-screen .collection-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:12px 0}
.collection-screen .collection-item{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:9px 3px;border-radius:17px;background:linear-gradient(#fffef7,#f0f5e1);border-color:#c9d4ad;min-height:0}
.collection-screen .collection-item:nth-child(3n){background:linear-gradient(#fff9fc,#f8e4eb);border-color:#dfb8cc}
.collection-screen .collection-item .gem{width:clamp(48px,9dvh,80px);height:clamp(48px,9dvh,80px);max-width:100%}.collection-screen .gem svg,.collection-screen .gem img{display:block;width:100%;height:100%;object-fit:contain}
.collection-screen .collection-item strong{font-size:18px;font-weight:700;margin:3px 0;line-height:1.2}.collection-screen .collection-item small{font-size:12px;line-height:1.3;min-height:16px}
.collection-screen .collection-item.locked{background:#eee7ed;border-color:#d8c9d7}.collection-screen .collection-item.locked::after{content:none}

.collection-screen>.primary-button{min-height:44px;padding:10px 15px;font-size:15px}
.piece-toolbar{min-height:40px;display:flex;align-items:center;padding-right:42px;margin-bottom:5px}.piece-toolbar .text-button{min-height:40px;gap:6px;padding:4px 6px;font-size:14px;color:#633e6b}.piece-toolbar .text-button svg{width:18px;height:18px}
.piece-identity{display:flex;align-items:center;gap:12px;min-height:70px;margin:0 0 10px;padding-inline:2px}.piece-avatar{width:clamp(52px,10dvh,76px);height:clamp(52px,10dvh,76px);flex-shrink:0}.piece-avatar svg,.piece-avatar img{display:block;width:100%;height:100%;object-fit:contain}.piece-kicker{font-size:12px;font-weight:700;letter-spacing:.6px;line-height:1.3;color:#715372}.piece-identity h2{font-size:30px;font-weight:800;line-height:1.15;margin:1px 0 3px;text-wrap:initial}.piece-status{display:block;font-size:13px;line-height:1.35;color:#705570}
.piece-tabs{display:flex;gap:4px;padding:4px;margin:10px 0;background:#e9dddf;border:1px solid #d5c0ce;border-radius:15px}.piece-tabs>button{flex:1;display:flex;align-items:center;justify-content:center;gap:5px;min-height:40px;border-radius:11px;font-size:15px;font-weight:700;color:#714f78;padding:6px}.piece-tabs>button[aria-pressed="true"]{background:linear-gradient(#fffdf4,#fff0d8);color:#482351;box-shadow:0 2px 3px #74574122}.ready-label{font-size:11px;background:#ddefbd;border-radius:7px;padding:3px;color:#3e6331}
.piece-pane{display:flex;flex-direction:column;gap:10px;min-width:0}.piece-screen .piece-pane p{font-size:14px;line-height:1.4;margin:0;color:#69506b}.piece-screen .piece-pane h3{font-size:20px;font-weight:700;line-height:1.25;margin:0;color:#4e2858}.piece-screen .piece-panel-heading p{margin-top:4px}.piece-screen .piece-rule{font-size:13px;line-height:1.4;color:#725a70}.piece-screen .piece-fineprint{font-size:12px;line-height:1.35;color:#786373}
.piece-pane>.secondary-button,.piece-pane-footer>.primary-button,.look-actions>.primary-button,.look-actions>.secondary-button,.locked-piece>.primary-button{min-height:44px;padding:10px 12px;font-size:14px;line-height:1.3}.piece-pane>.secondary-button svg{width:18px;height:18px}
.power-descriptions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.power-description{padding:11px 13px;background:#efe5f2;border:1px solid #dac7df;border-radius:15px}.power-description.next-power{background:#edf3dd;border-color:#cddab8}.power-caption{display:block;font-size:12px;line-height:1.3;letter-spacing:.4px;font-weight:700;color:#755082;margin-bottom:6px}.piece-screen .power-description h3{font-size:17px;margin:3px 0}.piece-screen .power-description p{font-size:14px;line-height:1.35}
.piece-pane-footer{display:grid;gap:7px;padding-top:3px}.piece-upgrade-cost{display:flex;align-items:center;justify-content:center;gap:7px 20px;font-size:14px;font-weight:700;color:#624167}.piece-upgrade-cost>span{display:flex;align-items:center;gap:4px}.piece-upgrade-cost svg{width:18px;height:18px}
.piece-screen .upgrade-comparison{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0}.piece-screen .upgrade-comparison>div{padding:9px;background:#f1e7f3;border-color:#d9c6df}.piece-screen .upgrade-comparison .upgrade-preview{width:clamp(88px,19dvh,134px);max-width:100%;margin:7px auto 0;gap:2px;padding:4px}.piece-screen .upgrade-comparison>div>strong{font-size:14px}
.evolution-forms{display:grid;grid-template-columns:1fr 1fr;gap:10px}.evolution-forms>div{display:flex;flex-direction:column;align-items:center;gap:4px;padding:7px;background:#f1f5e6;border:1px solid #d2dabc;border-radius:16px}.evolution-forms img,.evolution-forms svg{width:clamp(50px,10dvh,78px);height:clamp(50px,10dvh,78px);object-fit:contain}.evolution-forms b{font-size:14px;line-height:1.3;color:#5d4263}
.evolution-checks{display:grid;gap:5px}.evolution-checks>div{display:flex;align-items:center;gap:7px;min-height:34px;padding:5px 8px;border:1px solid #e1d2c3;border-radius:10px;font-size:14px;line-height:1.3;color:#71596c}.evolution-checks svg{flex-shrink:0;width:18px;height:18px}.evolution-checks span{flex:1}.evolution-checks b{white-space:nowrap}.evolution-checks .done{color:#3b6435;background:#ecf4df;border-color:#c8dbaf}
.compact-talents{display:grid;gap:8px}.piece-screen .talent-choice{padding:10px;gap:8px;min-height:76px;border-radius:14px}.piece-screen .talent-choice.chosen{padding:9px}.piece-screen .talent-choice b{font-size:15px}.piece-screen .talent-choice small{font-size:13px;line-height:1.35;margin-top:3px}.piece-screen .talent-choice em{display:block;font-size:12px}.piece-screen .talent-choice>svg{width:24px;height:24px;flex-shrink:0;color:#66904c}
.look-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.look-choice{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;gap:3px;padding:8px 3px;border:1px solid #d6c4d8;border-radius:15px;background:#fffaf2;color:#61406e}.look-choice.selected{border:2px solid #8aa75a;padding:7px 2px;background:#eff5df}.look-choice svg{width:clamp(46px,9dvh,68px);height:clamp(46px,9dvh,68px)}.look-choice b{font-size:14px;line-height:1.3}.look-choice small{font-size:12px;line-height:1.25;color:#775e7c}.look-choice .skin-starlight{filter:drop-shadow(0 0 5px #f5ca43)}.look-choice .skin-aurora{filter:drop-shadow(0 0 5px #6cd8bd) saturate(1.12)}
.look-caption{min-height:0}.piece-screen .look-caption h3{font-size:18px;margin-bottom:4px}.look-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.look-actions:has(>button:only-child){grid-template-columns:1fr}.look-actions svg{width:18px;height:18px;flex-shrink:0}
.compact-form-choice{display:grid;gap:7px;padding-top:9px;border-top:1px solid #dccbcf}.compact-form-choice>b{font-size:14px;color:#5b3c64}.compact-form-choice>div{display:grid;grid-template-columns:1fr 1fr;gap:8px}.compact-form-choice button{min-height:42px;padding:8px;font-size:14px}.compact-form-choice button[aria-pressed="true"]{background:#e3efcb;border-color:#91ae69;font-weight:700}
.locked-piece{padding-top:15px}.piece-unlock{display:flex;align-items:center;gap:10px;padding:14px;background:#efe7ef;border-radius:15px;color:#5d3e67;font-size:15px;line-height:1.4}.piece-unlock svg{flex-shrink:0}
.form-cards{display:grid;grid-template-columns:1fr 1fr;gap:10px}.form-cards>button{display:flex;flex-direction:column;align-items:center;gap:5px;min-width:0;padding:10px;border:1px solid #d5c4d4;border-radius:17px;background:#fffaf1}.form-cards>button[aria-pressed="true"]{background:#e8f2d7;border:2px solid #8eab60;padding:9px}.form-cards img,.form-cards svg{width:clamp(64px,15dvh,110px);height:clamp(64px,15dvh,110px);object-fit:contain}.form-cards b{font-size:15px;color:#56365e}.form-cards small{font-size:12px;color:#725778}
.gift-rules{display:grid;gap:10px}.gift-rules>section{padding:11px 12px;background:#eef4df;border:1px solid #cfdbb8;border-radius:14px}.piece-screen .gift-rules h3{font-size:17px;margin:0 0 5px}.piece-screen .gift-rules p{font-size:14px;line-height:1.4}
@media(max-width:520px){.modal-backdrop:has(.piece-screen),.modal-backdrop:has(.collection-screen){padding:max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))}.modal.collection-screen,.modal.piece-screen{padding:13px;max-height:calc(100dvh - max(10px,env(safe-area-inset-top)) - max(10px,env(safe-area-inset-bottom)));border-radius:22px}.piece-toolbar{margin-bottom:3px}.piece-identity{gap:9px;margin-bottom:8px}.piece-identity h2{font-size:28px}.piece-kicker{font-size:11px}.collection-balance{font-size:13px;gap:5px 12px}.piece-tabs{margin:8px 0}.piece-tabs>button{font-size:14px}.piece-pane{gap:9px}.piece-screen .talent-choice em{display:none}.collection-screen .collection-grid{gap:7px;margin:10px 0}.collection-screen .collection-item{padding:8px 2px}.collection-screen .collection-item strong{font-size:17px}}
@media(max-height:650px){.piece-toolbar{min-height:34px;margin:0}.piece-toolbar .text-button{min-height:34px}.piece-identity{min-height:60px;margin-bottom:6px}.piece-identity h2{font-size:26px}.piece-avatar{width:52px;height:52px}.piece-tabs{margin:7px 0;padding:3px}.piece-tabs>button{min-height:37px}.piece-pane{gap:8px}.power-description{padding:8px 10px}.power-descriptions{gap:6px}.piece-screen .piece-panel-heading h3{font-size:18px}.piece-screen .piece-pane p{font-size:13px}.piece-screen .power-description p{font-size:14px}.piece-pane-footer{gap:6px;padding:0}.look-caption{min-height:0}.look-choices{gap:6px}.look-choice{padding:6px 2px}.look-choice.selected{padding:5px 1px}.compact-form-choice{gap:5px;padding-top:7px}.evolution-forms>div{padding:5px}.piece-screen .talent-choice{min-height:67px;padding:8px}.piece-screen .talent-choice.chosen{padding:7px}}
/* Short landscape screens put identity/navigation beside the active panel. */
@media(min-width:600px) and (max-height:550px){.modal.piece-screen{display:grid;grid-template-columns:180px minmax(0,1fr);grid-template-rows:35px auto auto 1fr;column-gap:18px;max-width:820px;padding:13px;max-height:calc(100dvh - 24px)}.piece-toolbar{grid-column:1/-1;grid-row:1}.piece-identity{grid-column:1;grid-row:2;flex-direction:column;text-align:center;gap:5px;margin:5px 0 9px}.piece-avatar{width:72px;height:72px}.piece-screen>.collection-balance{grid-column:1;grid-row:3;gap:4px;font-size:13px;padding:7px}.piece-tabs{grid-column:1;grid-row:4;flex-direction:column;margin:8px 0 0;align-self:start}.piece-tabs>button{flex:initial;min-height:36px}.piece-pane{grid-column:2;grid-row:2/5;gap:8px}.power-descriptions{grid-template-columns:1fr 1fr;gap:7px}.power-description{padding:8px}.piece-screen .power-description h3{font-size:16px}.piece-screen .power-description p{font-size:13px}.piece-screen .piece-rule{font-size:12px}.evolution-forms img,.evolution-forms svg{width:46px;height:46px}.evolution-checks>div{min-height:30px;font-size:13px;padding:4px 7px}.piece-screen .piece-panel-heading p{font-size:13px}.piece-pane>.secondary-button,.piece-pane-footer>.primary-button,.look-actions>button{min-height:40px;padding:8px}.piece-screen .talent-choice{min-height:64px}.look-choice svg{width:44px;height:44px}.compact-form-choice{gap:5px;padding-top:6px}.compact-form-choice button{min-height:38px;padding:7px}.piece-screen .piece-fineprint{font-size:12px}.piece-screen .upgrade-comparison .upgrade-preview{width:96px}.locked-piece{padding:6px 0 0}.modal.collection-screen{max-width:760px;padding:13px}.collection-screen .collection-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:7px;margin:9px 0}.collection-screen .collection-item .gem{width:56px;height:56px}.collection-screen .collection-item{padding:8px 2px}.collection-top h2{font-size:24px;margin-bottom:8px}.collection-screen .collection-save-note{margin:7px 0}.collection-screen .collection-item strong{font-size:16px}}
@media(forced-colors:active){.piece-tabs>button[aria-pressed="true"],.look-choice.selected,.compact-form-choice button[aria-pressed="true"]{outline:2px solid Highlight;outline-offset:-3px}}
/* Earned mastery and compact two-form pages. */
.mastery-track{height:14px;border-radius:12px;background:#d9ccdf;overflow:hidden;border:1px solid #b8a0bf}.mastery-track>span{display:block;height:100%;background:linear-gradient(90deg,#8ac95a,#51a89a);border-radius:inherit}.mastery-controls,.looks-footer,.form-pages,.gift-focus{display:flex;align-items:center;gap:8px}.mastery-controls>button,.looks-footer>button{flex:1;min-width:0;min-height:44px;padding:8px;font-size:14px}.form-pages{justify-content:space-between}.form-pages>button,.gift-focus>button{min-height:42px;padding:8px 12px;font-size:14px}.form-pages>span{font-size:13px;color:#735578;white-space:nowrap}.evolution-forms small{display:block;font-size:13px;color:#735578}.owned-look-label{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:700}.owned-look-label select{flex:1;min-width:0;min-height:42px;border:1px solid #bca4be;background:#fff9ed;color:#50315b;border-radius:10px;padding:8px;font:inherit}.gift-focus{flex-wrap:wrap;font-size:13px}.gift-focus button[aria-pressed="true"]{outline:2px solid #648d43;outline-offset:-2px}.pane-forms .form-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.pane-forms .form-cards svg{width:80px;height:80px}.piece-tabs>button{min-width:0}.store-hearts{font-size:14px;text-align:center;margin:8px 0 0}
@media(max-height:650px){.pane-forms .form-cards svg{width:56px;height:56px}.pane-growth .piece-rule{font-size:13px;line-height:1.35}.looks-footer>button{font-size:13px;min-height:40px}.owned-look-label select{min-height:38px}.gift-focus>button{min-height:36px}.pane-gifts .talent-choice{padding:8px}.pane-gifts .piece-panel-heading p{font-size:13px}.mastery-controls>button{min-height:40px}}
