/* Store purchase states reuse the bounded native dialog and plump button faces. */
.store-confirm,.store-state{text-align:center}
.store-product-art{display:block;width:88px;height:88px;object-fit:contain;margin:0 auto 10px;filter:drop-shadow(0 3px 2px #49332966)}
.store-processing{display:flex;flex-direction:column;align-items:center;gap:12px;padding:6px}
#modal .store-processing h1,#modal .store-processing p{margin:0}
.store-processing .store-product-art{margin:0}
#modal:has(.store-processing){border:3px solid #b49363;border-radius:25px;background:linear-gradient(var(--cream-200),#f1ddb5);box-shadow:0 6px #785b42,0 18px 55px #0008}
/* Telegram Stars terms sheet: the User Agreement link in the Settings link ink, centred under the title. */
#modal .store-stars-terms .settings-legal{justify-content:center;margin:2px 0 0}
#modal .store-stars-terms .settings-legal .legal-link{color:#6b4a2d;font-size:13px}
#modal .store-stars-terms .settings-legal .legal-link:active>span{color:#a0703f}
:root[data-input-modality=keyboard] #modal .store-stars-terms .settings-legal .legal-link:focus-visible{outline-color:#b67939}
/* AC217/AC218 supersede AC175: native prices inherit the standard action
   label stroke, shadow and weight; paid actions use the Store gift Claim face.
   Disabled offers retain the shared unavailable treatment. */
:is(#online,#modal) .secondary:is(.store-buy,[data-action="store-purchase"]):not(:disabled){--small-top:var(--btn-claim-top);--small-bottom:var(--btn-claim-bottom);--small-edge:var(--btn-claim-edge);--small-lip:var(--btn-claim-lip);--small-shine:var(--btn-claim-shine)}
.store-price{font:900 24px/1.2 Lucky,system-ui;color:#6c4322}
.store-waiting{color:var(--gold-100);font:800 13px/1.2 system-ui;text-align:center}
#online .store-buy{font-size:var(--tier-full-fs);min-height:var(--tier-full-h);margin:0;padding:6px 8px;white-space:nowrap}
#online .perk-card-action:has(.store-buy){flex-wrap:wrap;gap:8px}
#online .perk-card-action .store-buy{width:100%}
#online .perk-card-action:has(.store-buy) .perk-claim{width:auto;flex:1}
/* An active pass keeps its claim and extension actions side by side. */
#online .perk-card.is-monthly.is-active:has(.store-buy) .perk-card-main{grid-template-columns:minmax(0,1fr) 184px}
html[lang="pl"] #online .perk-card.is-monthly.is-active:has(.store-buy) .perk-card-main{grid-template-columns:minmax(0,1fr) 172px}
#online .perk-card.is-monthly.is-active .perk-card-action:has(.store-buy){flex-wrap:nowrap}
#online .perk-card.is-monthly.is-active .perk-card-action:has(.store-buy) .perk-claim,
#online .perk-card.is-monthly.is-active .perk-card-action .store-buy{flex:1;min-width:0;width:auto;padding:6px;font-size:var(--tier-dense-fs)}
#online .perk-card.is-monthly.is-active .perk-card-action .store-buy{font-size:var(--tier-full-fs)}
/* Keep the claimed countdown and extension price inside the same paired row. */
#online .perk-card.is-monthly.is-active .perk-card-action:has(.store-buy) .perk-claimed{flex:1;min-width:0}
#online .perk-card.is-monthly.is-active .perk-card-action:has(.store-buy) .perk-claimed small{white-space:normal}
#online .perk-card.is-monthly.is-active .perk-card-action:has(.store-buy) .perk-claim{min-height:44px}
html[lang="pl"] #online .perk-card.is-monthly.is-active .perk-card-action:has(.store-buy) .perk-claim,
html[lang="pl"] #online .perk-card.is-monthly.is-active .perk-card-action:has(.store-buy) .perk-claimed{flex:0 0 88px}

/* Raw Gem purchases use the shared green Claim palette (AC218). */
#online .raw-gem-buy,#modal .raw-gem-buy{--small-top:var(--btn-claim-top);--small-bottom:var(--btn-claim-bottom);--small-edge:var(--btn-claim-edge);--small-lip:var(--btn-claim-lip);--small-shine:var(--btn-claim-shine)}
.store-gems{flex:none;display:flex;flex-direction:column;gap:7px}
.store-gem-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.store-gem-pack{display:flex;flex-direction:column;align-items:center;gap:4px;min-width:0;padding:6px 0 8px;border:2px solid #b38b52;border-radius:16px;background:linear-gradient(var(--cream-250),#f4d483);color:#3d2a1f}
.store-gem-pack>img{width:64px;height:36px;object-fit:contain}
.store-gem-pack>b{font:16px/1.15 Lucky,system-ui;text-align:center}
#online .store-gem-pack .store-buy{width:100%;margin:0;padding-inline:2px}
/* AC270: a compact 32px painted face inside the standard 44px tap target.
   The displayed price remains the exact string supplied by StoreKit. */
#online .store-gem-pack .store-buy.button-compact{width:calc(100% - 12px);min-height:44px;min-width:44px;padding:4px 2px;font-size:16px}
#online .store-v2.has-gems{gap:8px;padding:10px}
#online .store-v2.has-gems .store-banner{min-height:48px;flex:1 1 64px}
#online .store-v2.has-gems .store-gift{flex:0 1 auto}
#online .store-v2.has-gems .store-gift-figure{width:clamp(64px,10dvh,100px)}
#online .store-v2.has-gems .store-pack-stage{height:clamp(28px,4dvh,40px)}
@media(max-height:730px){
 #online .store-v2.has-gems{gap:4px;padding:6px}
 #online .store-v2.has-gems .store-banner{min-height:44px;flex-basis:44px}
 #online .store-v2.has-gems .store-gift{gap:4px;padding:4px 8px}
 #online .store-v2.has-gems .store-pack-stage{height:28px}
 #online .store-v2.has-gems .store-packs{gap:3px}
 .store-gems{gap:3px}
 .store-gem-pack{gap:3px;padding-top:4px}
 .store-gem-pack>img{width:56px;height:28px}
}
.store-buy .button-label{column-gap:var(--content-priceRowGap,0px)}
.stars-price{display:inline-flex;align-items:center;gap:calc(6px + var(--content-priceRowGap,0px));vertical-align:middle;white-space:nowrap}
.stars-price>.stars-price-icon{width:1.08em;height:1.08em;flex:none;object-fit:contain}
.stars-price-amount{line-height:1}

/* Keep the shop artwork flush with the top bar at every height. */
#online .store-panel.store-v2,
#online .store-panel.store-v2.has-gems{padding:0 0 10px}

/* AC333: the amount belongs to its illustration; the native price target stays separate. */
.store-gem-pack>b{margin-top:-6px}
/* Visual polish r2 (finding 120): the generic wait mark (the paw), same footprint as the product art. */
.store-processing-paw{display:grid;place-items:center;width:72px;height:72px;margin:0 auto 4px;border-radius:50%;background:radial-gradient(circle,#fff6dc,#f0d9a6 70%);box-shadow:inset 0 -3px #d8b673}
.store-processing-paw>svg{width:44px;height:44px;color:#7a4a2a;fill:currentColor}

/* AC827 (build 190): the purchase confirm is a gaming checkout sheet. The pack's art pops onto a lit stage,
   the rewards stagger in as rarity tiles, the price sits on the big Buy button with one quiet test line.
   Motion is transform/opacity only; reduced motion shows the final frame. */
.store-checkout{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center}
#modal .store-checkout h1{margin:2px 0 0;font:26px/1.05 Lucky,system-ui;text-wrap:balance}
.store-checkout-stage{height:112px;flex:none}
.store-checkout-stage.is-single .store-product-art{position:absolute;left:50%;top:50%;width:92px;height:92px;margin:-46px 0 0 -46px;filter:drop-shadow(0 5px 6px #0009)}
.store-checkout-stage .founder-stage-rays{animation:skill-spotlight-turn 14s linear infinite}
.store-checkout-items{display:grid;grid-template-columns:repeat(var(--n,3),minmax(0,96px));justify-content:center;gap:10px;width:100%;margin:2px 0 0;padding:0;list-style:none}
.store-checkout-item{position:relative;display:flex;flex-direction:column;align-items:center;gap:5px;min-width:0}
.store-checkout-item>.eq-slot-icon{--tier:var(--rarity-standard);--tier-accent:var(--tier);position:relative;display:grid;place-items:center;width:64px;height:64px;box-sizing:border-box;padding:7px;border-radius:14px;border:2px solid color-mix(in srgb,var(--tier) 70%,#5e4630);background:radial-gradient(circle at 50% 40%,color-mix(in srgb,var(--tier) 26%,var(--cream-200)) 0 34%,color-mix(in srgb,var(--tier-accent) 58%,#cdb68c) 100%);box-shadow:inset 0 1px #fffb,inset 0 -3px color-mix(in srgb,var(--tier-accent) 45%,#0000),0 3px 0 #5e463055}
.store-checkout-item>.eq-slot-icon[data-tier=legendary]{--tier:var(--rarity-legendary);--tier-accent:var(--rarity-legendary-accent)}
.store-checkout-item>.eq-slot-icon[data-tier=epic]{--tier:var(--rarity-epic);--tier-accent:var(--rarity-epic)}
.store-checkout-item>.eq-slot-icon[data-tier=rare]{--tier:var(--rarity-rare);--tier-accent:var(--rarity-rare)}
.store-checkout-item>.eq-slot-icon img{width:100%;height:100%;object-fit:contain}
.store-checkout-count{position:absolute;top:44px;left:50%;transform:translateX(-50%);padding:0 6px;border-radius:8px;background:#2a2148e6;color:var(--cream-50);font:13px/18px Lucky,system-ui;white-space:nowrap}
.store-checkout-item small{display:block;max-width:100%;color:#4a3b2a;font:800 12px/1.15 system-ui,sans-serif;text-wrap:balance;overflow-wrap:anywhere}
.store-checkout-benefits{width:100%;margin:0;text-align:left}
#modal .store-checkout-benefits li{min-height:30px;padding:3px 8px;border:1.5px solid #d8bd8a;border-radius:10px;background:linear-gradient(#fff8e6,#f3e2bd);color:#3d2a1f;box-shadow:inset 0 1px #fff}
.store-checkout-term{color:#6b5434;font:700 12px/1.3 system-ui,sans-serif;text-wrap:balance}
.store-checkout-test{color:#8a7458;font:600 11.5px/1.2 system-ui,sans-serif}
#modal:has(.store-checkout)>.equipment-actions{display:flex;align-items:stretch;gap:10px}
#modal:has(.store-checkout)>.equipment-actions>button{flex:1;min-width:0;margin:0;min-height:60px}
/* AC845 (build 194, owner: "bez nazwy 'kup' przy cenie"): Buy shows the price alone, lettered like every button. */
#modal:has(.store-checkout)>.equipment-actions>.store-checkout-buy{flex:1.55}
@media(prefers-reduced-motion:no-preference){
 .store-checkout-stage{animation:store-checkout-stage .46s cubic-bezier(.34,1.56,.64,1) both}
 .store-checkout-stage>:not(.founder-stage-rays,.starter-value){animation:store-checkout-pop .5s cubic-bezier(.34,1.56,.64,1) .08s both}
 #modal .store-checkout h1{animation:store-checkout-rise .32s cubic-bezier(.16,1,.3,1) .14s both}
 .store-checkout-item{animation:store-checkout-tile .42s cubic-bezier(.34,1.56,.64,1) calc(.22s + var(--i,0)*.07s) both}
 .store-checkout-benefits>li{animation:store-checkout-rise .32s cubic-bezier(.16,1,.3,1) .22s both}
 .store-checkout-term,.store-checkout-test{animation:store-checkout-fade .3s ease-out .36s both}
 #modal:has(.store-checkout) .store-checkout-buy:not(:disabled){animation:store-checkout-nudge .5s cubic-bezier(.34,1.56,.64,1) .48s both}
}
@media(prefers-reduced-motion:reduce){.store-checkout-stage .founder-stage-rays{animation:none}}
@keyframes store-checkout-stage{from{opacity:0;transform:scale(.92)}}
@keyframes store-checkout-pop{from{opacity:0;transform:translateY(10px) scale(.6)}}
@keyframes store-checkout-rise{from{opacity:0;transform:translateY(6px)}}
@keyframes store-checkout-tile{from{opacity:0;transform:translateY(10px) scale(.7)}}
@keyframes store-checkout-fade{from{opacity:0}}
@keyframes store-checkout-nudge{0%{transform:scale(1)}45%{transform:scale(1.06)}100%{transform:scale(1)}}
@media(max-height:700px){.store-checkout{gap:5px}.store-checkout-stage{height:84px}.store-checkout-stage.is-single .store-product-art{width:70px;height:70px;margin:-35px 0 0 -35px}.store-checkout-item>.eq-slot-icon{width:54px;height:54px}.store-checkout-count{top:36px}}
