/* PERKS stage: Perks section (store), Your Perks (profile) and Physical Items. Gold on a plain surface: no veins or logos behind text, no blue, cyan or purple. */
.pk-shop{margin-top:18px}
.pk-head h2{margin:0 0 4px}
.pk-deal{margin:8px 0;padding:10px 12px;border:1px solid var(--gold-line);border-radius:12px;background:var(--gold-tint);color:var(--text)}
.pk-filters,.ph-tiers{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}
.pk-filters button,.ph-tiers button{min-height:44px;padding:0 14px;border-radius:999px;border:1px solid var(--gold-line);background:var(--surface);color:var(--text);font:inherit;cursor:pointer}
.pk-filters button[aria-pressed=true],.ph-tiers button[aria-pressed=true]{background:var(--gold-metal,var(--gold));border-color:var(--gold);color:#16120a;font-weight:700}
.pk-group{margin:18px 0 8px;font-size:1.05rem;color:var(--gold-text)}
.pk-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:12px}
.pk-card{position:relative;display:flex;flex-direction:column;gap:6px;padding:14px;border:1px solid var(--gold-line);border-radius:14px;background:linear-gradient(160deg,var(--gold-tint),var(--surface) 55%);color:var(--text);overflow:hidden}
.pk-top{display:flex;align-items:center;gap:8px}
.pk-glyph{display:grid;place-items:center;width:44px;height:44px;border-radius:12px;border:1px solid var(--gold-line);background:var(--surface);font-size:1.4rem;filter:grayscale(1) sepia(1) saturate(2.6) brightness(1.05)}
.pk-rarity{font-size:.75rem;letter-spacing:.06em;text-transform:uppercase;color:var(--gold-text)}
.pk-flag{margin-left:auto;padding:2px 8px;border-radius:999px;background:var(--gold-metal,var(--gold));color:#16120a;font-size:.72rem;font-weight:700}
.pk-card h3{margin:2px 0 0;font-size:1rem}
.pk-how,.pk-gives{margin:0;color:var(--text-soft);font-size:.9rem}
.pk-foot{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:auto}
.pk-price b{color:var(--gold-text);font-size:1.05rem}.pk-price s{color:var(--text-muted)}
.pk-earned{color:var(--gold-text);font-weight:600}
.pk-state{padding:2px 8px;border-radius:999px;border:1px solid var(--gold-line);font-size:.78rem}
.pk-active,.pk-own{background:var(--gold-tint);color:var(--gold-text)}
.pk-out{color:var(--text-muted)}
.pk-actions{display:flex;flex-wrap:wrap;gap:8px}
.pk-buy,.pk-act{display:inline-grid;place-items:center;min-height:44px;padding:0 16px;border-radius:10px;border:1px solid var(--gold);background:var(--gold-metal,var(--gold));color:#16120a;font:inherit;font-weight:700;text-decoration:none;cursor:pointer}
.pk-act{background:transparent;color:var(--gold-text)}
.pk-buy:disabled,.pk-act:disabled{opacity:.55;cursor:not-allowed}
.pk-epic,.pk-legendary{border-color:var(--gold)}
.pk-premium::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(110deg,transparent 35%,color-mix(in srgb,var(--gold-strong) 22%,transparent) 50%,transparent 65%);background-size:250% 100%;animation:pk-shimmer 4.5s ease-in-out infinite}
.pk-deal.pk-card,.pk-card.pk-deal{box-shadow:0 0 0 2px var(--gold)}
@keyframes pk-shimmer{0%{background-position:120% 0}60%,100%{background-position:-120% 0}}
.pk-coin{position:absolute;z-index:1000;display:grid;place-items:center;width:28px;height:28px;margin-left:-14px;border-radius:50%;background:radial-gradient(circle at 35% 30%,var(--gold-soft),var(--gold) 60%,#8a6a1c);color:#16120a;font-size:.62rem;font-weight:800;pointer-events:none;animation:pk-pop 1.1s ease-out forwards}
@keyframes pk-pop{0%{transform:translateY(0) scale(.6);opacity:0}15%{opacity:1}100%{transform:translateY(-90px) scale(1.1);opacity:0}}
.pk-confirm{max-width:min(420px,calc(100vw - 24px));border:1px solid var(--gold-line);border-radius:14px;background:var(--surface);color:var(--text)}
.pk-confirm .cz-actions{display:flex;gap:8px;flex-wrap:wrap}.pk-confirm button{min-height:44px}
.pk-pref{display:grid;gap:6px;margin:14px 0 0;max-width:420px}
.pk-pref select,.pk-pref input:not([type=checkbox]),.pk-pref button{min-height:44px}
.pk-check{display:flex;align-items:center;gap:8px;min-height:44px}
.pk-flair-showcase{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0}.pk-flair-showcase span{padding:6px 10px;border:1px solid var(--gold-line);border-radius:999px;background:var(--gold-tint)}
/* Physical Items: category icon (no photos), tier chip, budget state. */
.store-product-image.ph-icon{display:grid;place-items:center;background:linear-gradient(160deg,var(--gold-tint),var(--surface));color:var(--gold)}
.store-product-image.ph-icon svg{width:72px;height:72px}
.ph-tier{display:inline-block;margin:0 0 4px;padding:2px 10px;border-radius:999px;border:1px solid var(--gold-line);color:var(--gold-text);font-size:.75rem;letter-spacing:.05em;text-transform:uppercase}
.ph-next{color:var(--text-muted);font-size:.85rem}
@media (max-width:420px){.pk-cards{grid-template-columns:1fr}.pk-card{padding:12px}}
@media (prefers-reduced-motion:reduce){.pk-premium::after,.pk-coin{animation:none}.pk-coin{display:none}}
/* Profile flair from perks: accent edge, theme wash and slot showcase (public profile and Your Perks). */
.pk-flair{border-color:var(--pk-accent,var(--gold-line))!important;box-shadow:inset 0 3px 0 var(--pk-accent,transparent)}
.pk-theme-theme-onyx-gold{background:linear-gradient(170deg,#1b1812,var(--surface) 60%)!important}
.pk-theme-theme-ember-glow{background:linear-gradient(170deg,color-mix(in srgb,#e2621b 18%,var(--surface)),var(--surface) 60%)!important}
.pk-theme-theme-champagne-silk{background:linear-gradient(170deg,color-mix(in srgb,#e8cf98 22%,var(--surface)),var(--surface) 60%)!important}
.pk-theme-theme-emerald-vault{background:linear-gradient(170deg,color-mix(in srgb,#1f8a5b 20%,var(--surface)),var(--surface) 60%)!important}
.pk-theme-theme-royal-ruby{background:linear-gradient(170deg,color-mix(in srgb,#b3263b 20%,var(--surface)),var(--surface) 60%)!important}
/* STORE TABS (Aaron 12:49): one tab at a time under a slim gold header with its own line and filters. */
.st-sr{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;padding:0}
.st-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}
.st-head{margin:0 0 12px;padding:14px 18px;border:1px solid var(--gold-line);border-radius:16px;background:linear-gradient(135deg,var(--gold-tint),var(--surface) 62%);box-shadow:inset 0 1px 0 rgba(255,236,170,.08)}
.st-head h2{margin:0 0 4px;font-size:1.35rem;color:var(--gold-text)}
.st-head p{margin:0;color:var(--text-muted);font-size:.95rem;line-height:1.45}
.store-browse[hidden],.ph-panel[hidden],.st-soon[hidden],.pf-shop[hidden],#cz-grid[hidden]{display:none}
.st-soon{margin:8px 0 18px}
/* PHYSICAL ITEMS: how it works, product photo on a light tile, Brand New badge, fresh-for-you line. */
.ph-steps{list-style:none;display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:0 0 10px;padding:10px;border:1px solid var(--gold-line);border-radius:14px;background:linear-gradient(135deg,var(--gold-tint),var(--surface) 70%)}
.ph-steps li{display:flex;align-items:center;gap:10px;min-height:44px;font-weight:700;color:var(--text);animation:ph-step-in .5s ease both}
.ph-steps li:nth-child(2){animation-delay:.12s}.ph-steps li:nth-child(3){animation-delay:.24s}
.ph-steps b{display:grid;place-items:center;width:24px;height:24px;flex:none;border-radius:50%;background:var(--gold-metal,var(--gold));color:#16120a;font-size:.8rem}
.ph-step-icon{display:grid;place-items:center;width:36px;height:36px;flex:none;border-radius:10px;border:1px solid var(--gold-line);color:var(--gold)}
.ph-step-icon svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round;stroke-linecap:round}
@keyframes ph-step-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.ph-shelves{margin-bottom:0}
.store-product-image.ph-photo{display:grid;place-items:center;padding:14px;background:#fff;border-bottom:1px solid var(--gold-line)}
.store-product-image.ph-photo img{width:100%;height:100%;object-fit:contain;display:block}
.store-product-image.ph-photo.ph-icon{background:linear-gradient(160deg,var(--gold-tint),var(--surface))}
.ph-new{position:absolute;top:10px;left:10px;display:inline-flex;align-items:center;gap:5px;padding:3px 9px 3px 6px;border-radius:999px;background:linear-gradient(135deg,#f4d67d,#c9a043);color:#16120a;font-size:.72rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase;box-shadow:0 1px 3px rgba(0,0,0,.25)}
.ph-new svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round;stroke-linecap:round}
.ph-line{display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px;margin:2px 0 6px;color:var(--text-muted);font-size:.85rem}
.ph-line svg{width:15px;height:15px;flex:none;fill:none;stroke:var(--gold);stroke-width:1.7;stroke-linejoin:round;stroke-linecap:round}
.ph-dot{color:var(--gold)}
.ph-modal-line{display:block;margin-top:8px}
.pf-shop{margin-top:22px}.pf-mine{margin-top:22px}
@media (max-width:640px){.ph-steps{grid-template-columns:1fr}.st-head{padding:12px 14px}}
@media (prefers-reduced-motion:reduce){.ph-steps li{animation:none}}
/* STORE TABS polish: the tab header is always a stacked block; a photo tile is a short 16:10 light panel so rows stay compact; on phones
   the category and tier pills are one sideways-scrolling row each instead of five wrapped rows. */
.st-head{display:block}
.store-product-image.ph-photo{aspect-ratio:16/10;height:auto;min-height:0;overflow:hidden}
.store-product-image.ph-photo{position:relative}.store-product-image.ph-photo img{position:absolute;inset:12px;width:calc(100% - 24px);height:calc(100% - 24px);max-height:none;object-fit:contain}
@media (max-width:640px){#ph-panel .ph-tiers{flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;padding-bottom:4px;margin:8px 0}#ph-panel .ph-tiers::-webkit-scrollbar{display:none}#ph-panel .ph-tiers button{flex:0 0 auto;white-space:nowrap}}
.ph-half{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
/* DAILY REVEAL (Aaron, 4 Nov 2026): the Lucky Coin flip and the Bronze / Silver / Gold Login Chest pop-ups (store-perks.js reveal()).
   Gold on dark marble; each chest has its own metal and its own opening. --at is when the prize shows (0 with reduced motion). */
.pk-reveal{width:min(360px,calc(100vw - 32px));padding:22px 20px 20px;border:1px solid var(--gold-line);border-radius:18px;text-align:center;color:var(--text);
 background:radial-gradient(120% 80% at 30% 0%,rgba(255,236,190,.09),transparent 60%),linear-gradient(160deg,#1d1a15,#0f0d0a 70%),var(--surface);box-shadow:0 24px 70px rgba(0,0,0,.6)}
.pk-reveal::backdrop{background:rgba(6,5,3,.74)}
.pk-reveal h2{margin:0 0 4px;font-size:1.15rem;color:var(--gold-text)}
.pkr-stage{position:relative;height:200px;display:grid;place-items:center;perspective:900px}
.pkr-shadow{position:absolute;bottom:18px;left:50%;width:120px;height:14px;margin-left:-60px;border-radius:50%;background:rgba(0,0,0,.55);filter:blur(4px)}
.pkr-prize{opacity:0;animation:pkr-in .35s ease-out var(--at) forwards}
.pkr-result{margin:4px 0 0;font-size:1.05rem;font-weight:800;color:var(--text)}
.pkr-bb{margin:2px 0 0;font-size:1.6rem;font-weight:800;color:var(--gold)}
.pkr-xp{margin:2px 0 0;font-size:1.6rem;font-weight:800;color:var(--text)}
.pkr-drop{margin:4px 0 0;font-weight:700;color:var(--gold-text)}
.pkr-note{margin:8px 0 14px;font-size:.85rem;color:var(--text-muted)}
.pkr-close{min-height:44px;min-width:160px}
/* Lucky Coin: a gold coin with an embossed B, Heads on one side and Tails on the other; it spins up and lands on the result (--end). */
.pkr-coin{position:relative;width:120px;height:120px;transform-style:preserve-3d;transform:rotateY(var(--end));animation:pkr-flip 1.6s cubic-bezier(.25,.7,.3,1) both}
.pkr-face{position:absolute;inset:0;display:grid;place-content:center;border-radius:50%;backface-visibility:hidden;color:#5a3f0e;
 background:radial-gradient(circle at 34% 28%,#fff3c8,var(--gold-soft) 30%,var(--gold) 62%,#8a6a1c);box-shadow:inset 0 0 0 6px rgba(110,74,16,.55),inset 0 0 0 9px rgba(255,240,200,.35)}
.pkr-face b{font:900 3rem/1 Cinzel,Georgia,serif}.pkr-face i{font-style:normal;font-size:.7rem;font-weight:800;letter-spacing:.12em;text-transform:uppercase}
.pkr-tails{transform:rotateY(180deg)}
.pkr-coinflip .pkr-shadow{animation:pkr-shadow 1.6s cubic-bezier(.25,.7,.3,1) both}
@keyframes pkr-flip{0%{transform:translateY(40px) rotateY(0)}45%{transform:translateY(-62px) rotateY(calc(var(--end) * .55))}100%{transform:translateY(0) rotateY(var(--end))}}
@keyframes pkr-shadow{0%,100%{transform:scale(1);opacity:1}45%{transform:scale(.45);opacity:.4}}
/* Login Chests: one chest shape, three metals (--m1 light, --m2 mid, --m3 dark), three ways to open. */
.pkr-bronze{--m1:#f0bf8a;--m2:#a86b32;--m3:#5e3a17}.pkr-silver{--m1:#fbfbf8;--m2:#b8b8b4;--m3:#5f5f5b}.pkr-gold{--m1:#fff1c1;--m2:#e2b144;--m3:#7a5512}
.pkr-chest{position:relative;width:150px;height:118px;margin-top:20px;transform-style:preserve-3d}
.pkr-base,.pkr-lid{position:absolute;left:0;right:0;border:3px solid var(--m3);background:linear-gradient(180deg,var(--m1),var(--m2) 55%,var(--m3))}
.pkr-base{bottom:0;height:72px;border-radius:6px 6px 10px 10px;box-shadow:inset 0 -10px 0 rgba(0,0,0,.18)}
.pkr-base::before,.pkr-lid::before{content:'';position:absolute;top:0;bottom:0;left:22px;width:14px;background:var(--m3);opacity:.55;box-shadow:92px 0 0 var(--m3)}
.pkr-lock{position:absolute;top:-6px;left:50%;width:26px;height:30px;margin-left:-13px;border-radius:5px;background:linear-gradient(180deg,#fff3c8,var(--gold) 60%,#7a5512);border:2px solid #5a3f0e}
.pkr-lid{top:0;height:50px;border-radius:40px 40px 4px 4px;transform-origin:50% 100% -10px;z-index:2;animation:pkr-open .5s cubic-bezier(.3,1.6,.5,1) calc(var(--at) - .45s) both}
.pkr-beam{position:absolute;left:12px;right:12px;bottom:62px;height:0;border-radius:50% 50% 0 0;background:linear-gradient(0deg,rgba(255,226,150,.95),rgba(255,214,120,0));animation:pkr-beam .7s ease-out calc(var(--at) - .35s) both}
.pkr-rays{position:absolute;width:260px;height:260px;border-radius:50%;opacity:0;background:repeating-conic-gradient(rgba(255,214,120,.38) 0 9deg,transparent 9deg 24deg);-webkit-mask:radial-gradient(circle,#000 20%,transparent 68%);mask:radial-gradient(circle,#000 20%,transparent 68%)}
@keyframes pkr-open{from{transform:rotateX(0)}to{transform:rotateX(-112deg)}}
@keyframes pkr-beam{from{height:0;opacity:0}to{height:120px;opacity:1}}
@keyframes pkr-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
/* Bronze: two quick shakes, then the lid pops. */
.pkr-bronze .pkr-chest{animation:pkr-shake .42s ease-in-out 2 both}
@keyframes pkr-shake{0%,100%{transform:rotate(0)}25%{transform:rotate(-6deg)}75%{transform:rotate(6deg)}}
/* Silver: two hops, then it bursts open with a ring of light. */
.pkr-silver .pkr-chest{animation:pkr-hop .55s cubic-bezier(.3,.7,.4,1) 2 both}
.pkr-silver .pkr-rays{animation:pkr-ring .8s ease-out calc(var(--at) - .3s) both}
@keyframes pkr-hop{0%,100%{transform:translateY(0) scale(1,1)}20%{transform:translateY(0) scale(1.08,.9)}55%{transform:translateY(-34px) scale(.96,1.05)}}
@keyframes pkr-ring{from{opacity:.9;transform:scale(.2)}to{opacity:0;transform:scale(1.3)}}
/* Gold: it glows and trembles while light rays spin up behind it, then blasts open and coins fly out. */
.pkr-gold .pkr-chest{animation:pkr-charge 1.8s ease-in both}
.pkr-gold .pkr-rays{animation:pkr-rays 2.6s linear .3s both}
.pkr-bit{position:absolute;top:96px;left:50%;width:22px;height:22px;margin-left:-11px;border-radius:50%;opacity:0;background:radial-gradient(circle at 35% 30%,#fff3c8,var(--gold) 60%,#7a5512);animation:pkr-bit .9s cubic-bezier(.2,.8,.4,1) calc(var(--at) - .4s + var(--d)) both}
@keyframes pkr-charge{0%{transform:scale(1);filter:drop-shadow(0 0 0 rgba(255,214,120,0))}70%{transform:scale(1.06) rotate(-2deg);filter:drop-shadow(0 0 18px rgba(255,214,120,.8))}80%{transform:scale(1.06) rotate(2deg)}90%{transform:scale(1.08) rotate(-2deg)}100%{transform:scale(1);filter:drop-shadow(0 0 26px rgba(255,214,120,.9))}}
@keyframes pkr-rays{0%{opacity:0;transform:rotate(0) scale(.6)}25%{opacity:1}100%{opacity:.75;transform:rotate(200deg) scale(1.1)}}
@keyframes pkr-bit{0%{opacity:1;transform:translate(0,0) scale(.5)}70%{opacity:1}100%{opacity:0;transform:translate(var(--dx),var(--dy)) scale(1)}}
/* Reduced motion (or the calm class): the final picture straight away, nothing moves. */
.pkr-calm *,.pkr-calm .pkr-prize{animation:none!important}.pkr-calm .pkr-prize{opacity:1}.pkr-calm .pkr-lid{transform:rotateX(-112deg)}.pkr-calm .pkr-beam{height:120px}.pkr-calm .pkr-bit{display:none}
@media(prefers-reduced-motion:reduce){.pk-reveal *{animation:none!important}.pk-reveal .pkr-prize{opacity:1}.pk-reveal .pkr-lid{transform:rotateX(-112deg)}.pk-reveal .pkr-beam{height:120px}.pk-reveal .pkr-bit{display:none}}
/* PERKS DISPLAY (Aaron, 11 Nov 2026): the reveal is always a dark card, so it carries its own light text colours (the light theme's dark text
   made "You Got" and the amounts almost invisible); a small Close button sits top right; tapping outside no longer closes it. */
.pk-reveal{position:relative;--text:#f3efe4;--text-soft:#d9d3c4;--text-muted:#cfc8b8;--gold:#d4a843;--gold-text:#e7c25a;--gold-line:#77612c}
.pkr-none{margin:2px 0 0;font-size:1.05rem;font-weight:700;color:var(--text-soft)}
.pkr-x{position:absolute;top:8px;right:8px;width:44px;height:44px;border:0;border-radius:50%;background:transparent;color:var(--text-soft);font-size:1.5rem;line-height:1;cursor:pointer}
.pkr-x:hover,.pkr-x:focus-visible{background:rgba(255,255,255,.08);color:var(--text)}
/* MERCH COMING SOON banner (12 Nov 2026): gold means rewards; tokens only, so light and dark both work. */
.merch-soon{display:flex;align-items:center;gap:20px;padding:22px 24px;border:1px solid var(--gold-line);border-radius:16px;background:linear-gradient(135deg,var(--gold-tint),var(--raised));box-shadow:0 0 0 1px var(--gold-glow) inset}
.merch-soon .ms-art{flex:0 0 84px;height:84px;display:grid;place-items:center;border-radius:50%;background:var(--sunken);border:1px solid var(--gold-line)}
.merch-soon .ms-art svg{width:48px;height:48px;fill:none;stroke:var(--gold-text);stroke-width:3;stroke-linejoin:round}
.merch-soon .ms-copy{min-width:0}
.merch-soon .ms-tag{display:inline-block;padding:3px 10px;border-radius:999px;background:var(--gold);color:var(--on-gold);font-size:12px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}
.merch-soon h2{margin:8px 0 6px;font-size:clamp(20px,4.5vw,26px);color:var(--gold-text)}
.merch-soon p{margin:0 0 12px;color:var(--text-muted);line-height:1.5}
.merch-soon .ms-link{display:inline-block;padding:9px 16px;border-radius:10px;border:1px solid var(--gold-line);color:var(--gold-text);font-weight:700;text-decoration:none;transition:transform .18s,background-color .18s}
.merch-soon .ms-link:hover{background:var(--gold-hover)}.merch-soon .ms-link:active{transform:scale(.97)}
.ms-chip{margin-left:6px;padding:1px 7px;border-radius:999px;background:var(--gold);color:var(--on-gold);font-size:10px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;vertical-align:middle}
@media (max-width:560px){.merch-soon{flex-direction:column;text-align:center;padding:20px 16px}.merch-soon .ms-art{flex-basis:auto;width:72px;height:72px}}
@media (prefers-reduced-motion:reduce){.merch-soon .ms-link{transition:none}}
