/* Uses the shared modal frame and its 4K UI scale; artwork stays bounded. */
#uiShell #profileForm .account-collection-link{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-width:0;min-height:60px;height:auto;flex:none;margin:10px 0 0;padding:9px 14px;text-align:left;white-space:normal;touch-action:manipulation}
#uiShell .account-collection-link>span:first-child{display:flex;flex:1;flex-direction:column;gap:3px;min-width:0}
#uiShell .account-collection-link strong{display:block;font-size:13px;line-height:1.35;color:#e5ddc3;overflow-wrap:anywhere}
#uiShell .account-collection-link small{display:block;font-size:10px;line-height:1.35;font-weight:400;color:#a8b99c;overflow-wrap:anywhere}
#uiShell .account-collection-link>span:last-child{flex:none;font-size:22px;line-height:1;color:#e7b77e}
#uiShell .chest-screen{min-width:0;color:#dce3c9}
#uiShell .chest-screen h3{font-size:16px;line-height:1.35;margin:0 0 8px;color:#eee3c5}
#uiShell .chest-screen p{margin:9px 0;color:#aab99f}
#uiShell .chest-screen button{font:inherit;cursor:pointer;touch-action:manipulation}
#uiShell .chest-screen button:disabled{cursor:default}
#uiShell .chest-market-tabs{display:flex;gap:8px;margin:0 0 14px}
#uiShell .chest-market-tabs button{flex:1;min-width:0;min-height:44px;padding:9px 12px;font-size:12px;font-weight:700;color:#b6c7ae;background:#172a21;border:1px solid var(--window-line);border-radius:6px}
#uiShell .chest-market-tabs button[aria-pressed=true]{color:#f1c38c;border-color:#d997575e;background:#bc79301c}
#uiShell .chest-store-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 16px}
#uiShell .chest-store-head>div:first-child{min-width:0}
#uiShell .chest-store-head strong{display:block;font-size:17px;color:#eadcbd}
#uiShell .chest-store-head small{display:block;max-width:350px;margin-top:5px;font-size:10px;line-height:1.5;color:#9aad90}
#uiShell .chest-wallet{flex:none;min-width:90px;text-align:right}
#uiShell .chest-wallet>span{font-size:10px;letter-spacing:.3px;color:#b6b299}
#uiShell .chest-wallet>strong{font-size:23px;line-height:1.25;color:#edba72}
#uiShell .chest-wallet>small{color:#c4a7ce;font-size:9px}
#uiShell .chest-offers{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
#uiShell .chest-offer{min-width:0;display:flex;flex-direction:column;padding:10px;background:linear-gradient(145deg,#26392b,#14261e);border:1px solid var(--window-line);border-radius:8px}
#uiShell .chest-offer.selected{border-color:#d99e62;background:linear-gradient(145deg,#39452d,#192c23)}
#uiShell .chest-preview-button{display:flex;flex:1;flex-direction:column;align-items:center;gap:6px;min-width:0;width:100%;padding:0;border:0;background:none;color:inherit;text-align:left}
#uiShell .chest-art{display:grid;place-items:center;min-width:0;flex:none;width:148px;max-width:100%;height:128px}
#uiShell .chest-art>svg{display:block;width:auto;height:auto;max-width:100%;max-height:100%;aspect-ratio:224/210;flex:none}
#uiShell .chest-offer-copy{display:block;align-self:stretch;min-width:0}
#uiShell .chest-offer-copy>strong{display:block;min-height:36px;font-size:13px;line-height:1.4;color:#eee3c5;overflow-wrap:anywhere}
#uiShell .chest-offer-copy>small{display:block;min-height:43px;font-size:11px;line-height:1.45;color:#b0c0a6}
#uiShell .chest-bonus{display:flex;align-items:center;gap:5px;min-height:26px;font-size:11px;line-height:1.4;color:#e7bc7d}
#uiShell .chest-bonus-muted{color:#7f957a;font-size:10px}
#uiShell .chest-pumpkin{display:inline-block;object-fit:contain;width:21px;height:21px;flex:none;vertical-align:middle}
#uiShell .chest-offer-buy{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:12px}
#uiShell .chest-offer-buy>strong{font-size:20px;line-height:1.1;white-space:nowrap;color:#e9c284}
#uiShell .chest-offer-buy>strong>small{display:block;margin-top:4px;font-size:9px;line-height:1.3;font-weight:400;color:#adb999}
#uiShell .chest-offer-buy>.primary{min-height:40px;padding:8px 10px;font-size:11px}
#uiShell .chest-buy-note{display:block;min-height:28px;margin-top:8px;font-size:9px;line-height:1.45;color:#a6b397}
#uiShell .chest-store-footer{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:14px 0}
#uiShell .chest-store-footer>p{flex:1;margin:0;font-size:10px;line-height:1.6}
#uiShell .chest-store-footer>button{flex:none}
#uiShell .chest-contents,#uiShell .chest-history{margin-top:14px;padding-top:14px;border-top:1px solid var(--window-line)}
#uiShell .chest-contents>summary,#uiShell .chest-history>summary{min-height:36px;font-size:12px;color:#e2c18b;cursor:pointer;touch-action:manipulation}
#uiShell .chest-content-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:14px 0 9px}
#uiShell .chest-content-head h3{margin:0}
#uiShell .chest-content-head>span{flex:none;font-size:10px;color:#c6c7a5}
#uiShell .chest-screen .chest-odds{font-size:11px;line-height:1.55;margin:0 0 13px}
#uiShell .chest-rewards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
#uiShell .chest-reward{display:flex;align-items:center;gap:9px;min-width:0;min-height:86px;padding:8px;border:1px solid var(--window-line);border-radius:6px;background:#172a22;text-align:left;color:#d9ddc5}
#uiShell button.chest-reward{width:100%;font-size:12px}
#uiShell .chest-reward.chosen{border-color:#e7ae68;background:#65512a52}
#uiShell .chest-reward.owned{border-color:#a8ba8e40;background:#263d2e66}
#uiShell button.chest-reward.owned:disabled{opacity:.75}
#uiShell .chest-reward-art{position:relative;display:grid;place-items:center;width:54px;height:66px;flex:none;overflow:hidden}
#uiShell .chest-reward-art>svg:not(.chest-tick){display:block;width:auto;height:auto;max-width:54px;max-height:62px;flex:none}
#uiShell .chest-reward-art>.chest-tick{position:absolute;right:0;bottom:0;width:20px;height:20px;border-radius:50%;background:#203e2b;color:#c7dfaa}
#uiShell .chest-reward-copy{display:block;min-width:0}
#uiShell .chest-reward-copy>strong{display:block;font-size:11px;line-height:1.4;overflow-wrap:anywhere}
#uiShell .chest-reward-copy>small{display:block;margin-top:5px;font-size:9px;line-height:1.5;color:#9eaf92;overflow-wrap:anywhere}
#uiShell .chest-notice,#uiShell .chest-error{padding:12px 14px;border:1px solid #b59a5b45;border-radius:6px;background:#8c70321b;font-size:12px;line-height:1.6}
#uiShell .chest-screen .chest-error{border-color:#c9896c70;background:#7c3e2824;color:#efb49a}
#uiShell .chest-toolbar,#uiShell .chest-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px}
#uiShell .chest-toolbar{justify-content:space-between;margin-bottom:18px}
#uiShell .chest-pending{padding:12px;margin-bottom:16px;border:1px solid #b59a5b45;border-radius:7px;background:#8c70321b}
#uiShell .chest-pending article{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0}
#uiShell .chest-pending article+article{border-top:1px solid var(--window-line)}
#uiShell .chest-pending article>div{min-width:0}
#uiShell .chest-pending strong{display:block;font-size:12px;color:#e6d7b2}
#uiShell .chest-pending small{font-size:10px;color:#dcb580}
#uiShell .chest-pending p{font-size:10px;margin:5px 0 0}
#uiShell .chest-pending button{flex:none;max-width:145px}
#uiShell .chest-actions{margin-top:18px}
#uiShell .chest-actions>.primary{flex:1;min-width:160px}
#uiShell .chest-inventory-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
#uiShell .chest-inventory-card{display:flex;align-items:center;gap:12px;min-width:0;padding:12px;border:1px solid var(--window-line);border-radius:7px;background:#172a22;color:#e7dec0;text-align:left}
#uiShell .chest-inventory-card>.chest-art{width:98px;height:96px}
#uiShell .chest-inventory-card>span:last-child{min-width:0}
#uiShell .chest-inventory-card strong{display:block;font-size:13px;line-height:1.4}
#uiShell .chest-inventory-card small{display:block;margin-top:5px;font-size:9px;line-height:1.5;color:#97ab8f}
#uiShell .chest-inventory-card b{display:block;margin-top:12px;font-size:11px;color:#e8ad66}
#uiShell .chest-empty{padding:28px 18px;border:1px dashed #96b08055;border-radius:7px;text-align:center}
#uiShell .chest-empty>strong{font-size:17px;color:#e4dbc0}
#uiShell .chest-empty p{max-width:390px;margin:10px auto 16px}
#uiShell .chest-history ol{list-style:none;padding:0;margin:0}
#uiShell .chest-history li+li{border-top:1px solid var(--window-line)}
#uiShell .chest-history button{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 10px;width:100%;padding:12px 0;color:#c6d0b6;border:0;background:none;text-align:left}
#uiShell .chest-history strong{font-size:12px}
#uiShell .chest-history small{font-size:9px;color:#94a489}
#uiShell .chest-history span{grid-column:1/-1;font-size:10px;line-height:1.5;color:#9ead91}
#uiShell .chest-confirm{max-width:520px;margin-inline:auto}
#uiShell .chest-confirm-product{display:flex;align-items:center;gap:18px;padding:14px;border:1px solid var(--window-line);border-radius:7px;background:#172a22}
#uiShell .chest-confirm-product>.chest-art{width:128px;height:125px}
#uiShell .chest-confirm-product h3{font-size:19px}
#uiShell .chest-payment{margin:20px 0}
#uiShell .chest-payment>div{display:flex;justify-content:space-between;gap:14px;padding:10px 0;border-bottom:1px solid var(--window-line);font-size:13px}
#uiShell .chest-payment dt{color:#a7b99a}
#uiShell .chest-payment dd{margin:0;color:#ebbf7a;font-weight:700;text-align:right}
#uiShell .chest-screen .chest-fine-print{font-size:10px;margin-top:13px;color:#8fa487}
#uiShell .chest-opening-layout{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);align-items:center;gap:16px;margin-top:14px}
#uiShell .chest-opening-stage{display:grid;place-items:center;min-width:0;height:220px;border:1px solid var(--window-line);border-radius:8px;background:radial-gradient(ellipse at 50% 90%,#81915826,transparent 65%),#13271e;overflow:hidden}
#uiShell .chest-opening-stage>.chest-art{width:190px;height:180px}
#uiShell .chest-opening-stage>canvas{display:block;width:100%;height:220px;max-width:100%;touch-action:pan-y}
#uiShell .chest-opening-copy{min-width:0}
#uiShell .chest-opening-copy>p:first-child{font-size:15px;font-weight:700;color:#e4d7b8}
#uiShell .chest-opening-copy .chest-bonus{font-size:14px}
#uiShell .chest-result{margin-top:16px;padding-top:16px;border-top:1px solid var(--window-line)}
#uiShell .chest-result-pumpkins{display:flex;align-items:center;justify-content:center;gap:8px;padding:12px;color:#edbd77}
#uiShell .chest-result .chest-rewards{grid-template-columns:repeat(2,minmax(0,1fr))}
#uiShell .chest-open-actions{position:sticky;bottom:calc(-1 * var(--window-pad));margin-inline:calc(-1 * var(--window-pad));padding:12px var(--window-pad);border-top:1px solid var(--window-line);background:var(--window-surface)}
#uiShell [data-chest-reveal][hidden]{display:none}
@media(max-width:620px){
 #uiShell .chest-offers{grid-template-columns:1fr}
 #uiShell .chest-offer{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 10px;padding:10px}
 #uiShell .chest-preview-button{grid-column:1/-1;display:grid;grid-template-columns:90px minmax(0,1fr);gap:12px;align-items:center}
 #uiShell .chest-preview-button>.chest-art{width:90px;height:87px}
 #uiShell .chest-offer-copy>strong,#uiShell .chest-offer-copy>small{min-height:0}
 #uiShell .chest-offer-copy>strong{font-size:14px;margin-bottom:5px}
 #uiShell .chest-offer-copy>small{font-size:11px}
 #uiShell .chest-offer-buy{grid-column:1/-1;margin-top:0}
 #uiShell .chest-offer-buy>strong>small{display:inline;margin-left:5px;font-size:10px}
 #uiShell .chest-offer-buy>.primary{min-height:44px;min-width:104px}
 #uiShell .chest-buy-note{grid-column:1/-1;min-height:0;margin:2px 0 0}
 #uiShell .chest-store-footer{align-items:stretch;flex-direction:column}
 #uiShell .chest-rewards{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
 #uiShell .chest-reward{gap:6px;padding:7px;min-height:82px}
 #uiShell .chest-reward-art{width:42px;height:60px}
 #uiShell .chest-reward-art>svg:not(.chest-tick){max-width:42px;max-height:56px}
 #uiShell .chest-reward-copy>strong{font-size:10px}
 #uiShell .chest-reward-copy>small{font-size:8px}
 #uiShell .chest-inventory-grid{grid-template-columns:1fr}
 #uiShell .chest-confirm-product{gap:12px;padding:10px}
 #uiShell .chest-confirm-product>.chest-art{width:94px;height:104px}
 #uiShell .chest-confirm-product h3{font-size:16px}
 #uiShell .chest-opening-layout{grid-template-columns:1fr;gap:8px}
 #uiShell .chest-opening-stage,#uiShell .chest-opening-stage>canvas{height:200px}
 #uiShell .chest-opening-copy>p{font-size:11px}
 #uiShell .chest-opening-copy>p:first-child{font-size:13px}
 #uiShell .chest-content-head h3{font-size:14px}
 #uiShell .chest-content-head>span{font-size:9px}
 #uiShell .chest-result .chest-rewards{grid-template-columns:1fr}
}
@media(max-width:350px){
 #uiShell .chest-rewards{grid-template-columns:1fr}
 #uiShell .chest-reward-art{width:50px}
 #uiShell .chest-reward-copy>strong{font-size:12px}
 #uiShell .chest-reward-copy>small{font-size:10px}
 #uiShell .chest-store-head{gap:8px}
 #uiShell .chest-store-head strong{font-size:15px}
 #uiShell .chest-wallet{min-width:65px}
 #uiShell .chest-confirm-product{align-items:flex-start}
}
@media(max-height:500px) and (orientation:landscape){
 #uiShell #profileForm .account-collection-link{min-height:44px;padding:6px 12px;margin-top:8px}
 #uiShell .account-collection-link>span:first-child{gap:1px}
 #uiShell .account-collection-link strong{font-size:12px;line-height:1.25}
 #uiShell .account-collection-link small{font-size:9px;line-height:1.25}
 #uiShell .chest-offers{grid-template-columns:repeat(3,minmax(0,1fr))}
 #uiShell .chest-offer{display:flex;padding:9px}
 #uiShell .chest-preview-button{display:flex;gap:3px}
 #uiShell .chest-preview-button>.chest-art{width:120px;height:80px}
 #uiShell .chest-offer-copy>strong{min-height:0;font-size:12px}
 #uiShell .chest-offer-copy>small{min-height:0;font-size:10px}
 #uiShell .chest-offer-buy{width:100%;margin-top:6px}
 #uiShell .chest-offer-buy>.primary{min-width:0;min-height:44px;padding:8px;font-size:10px}
 #uiShell .chest-offer-buy>strong>small{display:block;margin-left:0;font-size:9px}
 #uiShell .chest-buy-note{min-height:0;font-size:8px}
 #uiShell .chest-store-head{margin-bottom:10px}
 #uiShell .chest-opening-layout{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);margin-top:10px}
 #uiShell .chest-opening-stage,#uiShell .chest-opening-stage>canvas{height:180px}
 #uiShell .chest-rewards{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(prefers-reduced-motion:reduce){#uiShell .chest-screen *{scroll-behavior:auto;transition:none;animation:none}}
