/* ===== THE ALBUM SCREEN (redesigned 14 Nov 2026: calm and roomy) =====
   Top: round arrow, the album's name and season, sparkles, pearl and trade. Under it: one row of page pills and a rarity drop-down.
   Middle: only the cards (the name and rarity are already printed on each card). Bottom: one slim progress line.
   Tap a card: a small pop-up with the card, its story and what to do (wish, close). The card art, reveal, zoom and pearl rules are further down. */
html body #albumOv>.gpanel.album:not(#_):not(#_):not(#_):not(#_):not(#_){display:flex !important; flex-direction:column; gap:8px; overflow:hidden !important; position:relative; border:0 !important; border-radius:0 !important; box-shadow:none !important; background:none !important;
  padding:calc(var(--safeT,0px) + 8px) calc(var(--safeR,0px) + 14px) calc(var(--safeB,0px) + 8px) calc(var(--safeL,0px) + 14px) !important}
html body #albumOv .gpanel.album::before,html body #albumOv .gpanel.album::after{content:none !important}
html body #albumOv .atop:not(#_){display:flex; align-items:center; gap:12px; flex:none; min-width:0; padding:0 0 0 46px; min-height:38px}
html body #albumOv .alogo:not(#_){display:grid; flex:1 1 auto; min-width:0; justify-items:start; padding:0; border:0; background:none; line-height:1.15}
.alogo b{font-size:20px; font-weight:700; color:var(--k-ink,#e9ece1); letter-spacing:.01em; white-space:nowrap}
.alogo i{font-style:normal; font-size:12px; color:var(--k-mute,#a8bdb2); white-space:nowrap}
.aspark{display:inline-flex; align-items:baseline; gap:5px; flex:none; padding:4px 11px; border-radius:99px; background:rgba(9,28,25,.62); border:1px solid var(--k-line,rgba(233,236,225,.3)); font-size:13px}
.aspark b{font-size:15px; color:var(--k-ink,#e9ece1)} .aspark small{font-size:11px !important; color:var(--k-mute,#a8bdb2) !important}
#albumOv .atrade{flex:none; position:relative}

/* page pills + rarity drop-down */
.apages{display:flex; align-items:center; gap:10px; flex:none; min-width:0}
html body #albumOv nav.aside:not(#_){flex:1 1 0; min-width:0; width:auto; display:flex; gap:6px; overflow-x:auto; scrollbar-width:none; padding:2px 0}
.aside::-webkit-scrollbar{display:none}
html body #albumOv .aside-p:not(#_){flex:none; display:inline-flex; align-items:baseline; gap:7px; width:auto; padding:7px 14px; border:1px solid var(--k-line,rgba(233,236,225,.3)); border-radius:99px; background:rgba(9,28,25,.62); color:var(--k-ink,#e9ece1); font:inherit; cursor:pointer; box-shadow:none; white-space:nowrap}
.aside-p b{font-size:13px; font-weight:700} .aside-p small{font-size:11.5px !important; color:var(--k-mute,#a8bdb2) !important}
html body #albumOv .aside-p.on:not(#_){background:linear-gradient(180deg,#2a6a5e,#1d4d45); border-color:var(--k-acc,#d9b765)}
.aside-p.on small{color:#e9ece1 !important}
.aside-p.done small{color:#8fd6a0 !important}
html body #albumOv select.afilters:not(#_):not(#_){flex:none !important; width:150px !important; min-width:0; max-width:40vw; margin:0 !important; height:34px; padding:0 30px 0 12px; border:1px solid var(--k-line,rgba(233,236,225,.3)); border-radius:10px; background-color:rgba(9,28,25,.78); color:var(--k-ink,#e9ece1); font:700 13px system-ui; appearance:none; -webkit-appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23e9ece1' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 11px center; background-size:12px 8px}

/* the cards */
.amain{flex:1 1 auto; display:flex; flex-direction:column; min-height:0; min-width:0}
.agrid{flex:1 1 auto; min-height:0; overflow-y:auto; display:grid; grid-template-columns:repeat(auto-fill,minmax(clamp(84px,calc((100dvh - 200px)*.643),128px),1fr)); gap:14px; align-content:start; padding:6px 2px 10px}
.aslotw{display:block; min-width:0}
/* the slim progress line */
.afoot{flex:none; display:flex; align-items:center; gap:12px; padding:8px 2px 0; border-top:1px solid rgba(233,236,225,.14)}
.afoot b{flex:none; font-size:13px; color:var(--k-ink,#e9ece1)}
.afoot small{flex:1 1 0; min-width:0; font-size:11px !important; line-height:1.3; color:var(--k-mute,#a8bdb2) !important}
.abar{flex:0 0 clamp(90px,22%,200px); height:7px; border-radius:99px; background:rgba(0,0,0,.4); overflow:hidden}
.abar i{display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#2a7d69,#58c4a4)}

/* the pop-up for a tapped card */
html body #albumOv .adetail:not(#_){position:fixed; inset:0; z-index:70; display:flex; align-items:center; justify-content:center; gap:18px; padding:18px; background:rgba(3,12,10,.78); overflow:hidden !important; flex-direction:row; border:0; border-radius:0}
html body #albumOv .adetail[hidden]{display:none !important}
html body #albumOv .adt-card.acard:not(#_){flex:none; --h:min(70vh,260px); height:var(--h); width:calc(var(--h)*9/14); aspect-ratio:auto; cursor:default}
.adt-text{display:flex; flex-direction:column; align-items:flex-start; gap:8px; width:min(330px,52vw); max-height:calc(100dvh - 36px); padding:14px 16px; border:1px solid var(--k-line,rgba(233,236,225,.3)); border-radius:14px; background:#0e2f2a; color:var(--k-ink,#e9ece1); box-sizing:border-box}
.adt-text h3{margin:0 !important; font-size:19px !important; color:var(--k-ink,#e9ece1) !important; text-transform:none !important; letter-spacing:.01em !important}
.adt-text h3::after{display:none !important}
.adt-more{display:grid; gap:8px; width:100%; min-height:0; overflow-y:auto; align-content:start; justify-items:start; scrollbar-width:none}
.adt-more::-webkit-scrollbar{display:none}
.adt-text p{margin:0; font-size:12.5px; line-height:1.4; color:#d9dfd2}
.adt-text .btn,.adt-text .ghost{width:auto; margin:0 !important}
.adt-text .note{font-size:11px !important; margin:0}
.adet{display:grid; grid-template-columns:auto 1fr; gap:4px 10px; margin:0; font-size:12px}
.adet dt{color:var(--k-mute,#a8bdb2); font-weight:700} .adet dd{margin:0; color:var(--k-ink,#e9ece1)}
@media (max-height:340px){ html body #albumOv .adt-card.acard:not(#_){--h:min(76vh,230px)} .adt-text{padding:10px 12px; gap:6px} .adet{font-size:11px} }
@media (max-width:640px){ .agrid{gap:10px} .aspark small{display:none} .alogo i{display:none} }

/* one card: the user's picture whole; its rarity's colour only as a soft light around it */
.acard{--rc:rgba(220,210,190,.35); position:relative; display:block; width:100%; aspect-ratio:9/14; padding:0; border:0; border-radius:7px; cursor:pointer;
  background:#0a101c; box-shadow:0 0 0 1px var(--rc), 0 3px 8px rgba(0,0,0,.5); overflow:hidden; font:inherit; color:#fff}
.acard .apic{position:absolute; inset:0; border-radius:inherit; overflow:hidden}
.acard .apic img{width:100%; height:100%; object-fit:cover; display:block}
.acard.r-U{--rc:rgba(111,207,124,.6)} .acard.r-R{--rc:rgba(74,163,255,.7)} .acard.r-E{--rc:rgba(180,108,255,.75)}
.acard.r-L{--rc:rgba(232,180,74,.85)} .acard.r-M{--rc:rgba(160,140,255,.9)}
.acard.have:is(.r-R,.r-E){box-shadow:0 0 0 1px var(--rc), 0 0 9px var(--rc), 0 3px 8px rgba(0,0,0,.5)}
.acard.have:is(.r-L,.r-M){box-shadow:0 0 0 1px var(--rc), 0 0 14px var(--rc), 0 3px 8px rgba(0,0,0,.5)}
/* a slow sheen across owned Legendary and Mythical cards only, so scrolling stays smooth */
.acard.have:is(.r-L,.r-M) .apic::after{content:""; position:absolute; inset:0; background:linear-gradient(105deg,transparent 40%,rgba(255,245,220,.28) 50%,transparent 60%) -150% 0/250% 100% no-repeat; animation:asheen 5s ease-in-out infinite}
@keyframes asheen{0%,60%{background-position:-150% 0} 100%{background-position:150% 0}}
.acard.on{outline:2px solid var(--k-acc,#d9b765); outline-offset:2px}
.acard.locked{--rc:rgba(160,170,190,.35); background:linear-gradient(160deg,#1a2233,#0b111c)}
.acard.locked::before{content:""; position:absolute; inset:4px; border:1px solid rgba(160,170,190,.28); border-radius:5px; pointer-events:none}
.aslot{position:absolute; inset:0; display:grid; place-items:center}
.aslot svg{width:52%; aspect-ratio:1; padding:12%; box-sizing:border-box; border-radius:50%; background:rgba(255,255,255,.05); border:1px solid rgba(160,170,190,.25); fill:rgba(160,170,190,.32)}
.ano{position:absolute; top:4px; left:4px; z-index:2; font-style:normal; font-size:9px; font-weight:800; padding:1px 4px; border-radius:5px; background:rgba(4,8,16,.78); color:#e9dcc3; border:1px solid rgba(201,154,82,.5)}
.acard .adup{position:absolute; bottom:4px; right:4px; z-index:2; font-style:normal; font-size:10px; font-weight:800; padding:1px 6px; border-radius:99px; background:rgba(0,0,0,.78); color:#ffe7a8}
.acard .anew{position:absolute; top:4px; right:4px; z-index:2; font-style:normal; font-size:8px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; padding:2px 5px; border-radius:99px; background:#e0453a; color:#fff}
.acard:active{transform:scale(.97)}
@media (prefers-reduced-motion:reduce){ .acard .apic::after{animation:none !important} }
.arar,.acap small{color:#d7cfbf}
.arar{display:inline-block; font-size:10px; font-weight:800; letter-spacing:.12em; text-transform:uppercase; padding:3px 10px; border-radius:7px; background:rgba(0,0,0,.45); border:1px solid currentColor}
.r-U:is(.arar,small){color:#8fe09a} .r-R:is(.arar,small){color:#7cc0ff} .r-E:is(.arar,small){color:#d2a4ff} .r-L:is(.arar,small){color:#ffd36a} .r-M:is(.arar,small){color:#b8adff}
.arar.r-M{background:linear-gradient(90deg,rgba(80,60,200,.5),rgba(160,60,200,.45))}

/* the home button's dot when new cards are waiting */
#navAlbum{position:relative}
.ndot{position:absolute; top:4px; right:16px; width:9px; height:9px; border-radius:50%; background:#e0453a; box-shadow:0 0 0 2px rgba(0,0,0,.4)}
/* (trading's pop-up reuses this dark screen) */
.abig{position:fixed; inset:0; z-index:60; display:flex; align-items:center; justify-content:center; gap:22px; padding:16px; background:rgba(4,3,2,.82)}
.abig[hidden]{display:none}

/* ---------- a new card: the user's pack opens, its card back stands up and turns into the card ----------
   .arev-stage has the shape of one animation frame (512 x 768); the card sits exactly where the card back stands in the
   last frame (left 21.9%, top 20.7%, 56.3% x 57.8%). */
.arev{position:fixed; inset:0; z-index:90; display:grid; place-items:center; background:radial-gradient(60% 70% at 40% 50%,rgba(20,30,60,.92),rgba(4,6,12,.94))}
.arev-in{display:flex; align-items:center; justify-content:center; gap:22px; padding:12px; max-width:100%}
.arev-stage{position:relative; height:min(92vh,520px); aspect-ratio:512/768; flex:none}
.arev-card{position:absolute; left:21.9%; top:20.7%; width:56.3%; height:57.8%; opacity:0}
.arev.shown .arev-card{opacity:1}
.arev-face{position:absolute; inset:0; aspect-ratio:auto; cursor:default}
.arev-glow{position:absolute; inset:-30%; border-radius:50%; background:radial-gradient(closest-side,var(--lt,rgba(220,210,180,.25)),transparent); pointer-events:none}
.arev.r-U .arev-card{--lt:rgba(111,207,124,.45)} .arev.r-R .arev-card{--lt:rgba(74,163,255,.5)} .arev.r-E .arev-card{--lt:rgba(180,108,255,.55)}
.arev.r-L .arev-card{--lt:rgba(255,205,100,.6)} .arev.r-M .arev-card{--lt:rgba(150,120,255,.65)}
.arev-text{display:grid; gap:6px; justify-items:start; max-width:250px; color:#f4ead2; opacity:0}
.arev.shown .arev-text{opacity:1}
.arev-text b{font-size:22px; color:#f5cf9f; line-height:1.15; font-family:var(--f-display)} .arev-text small{font-size:13px; color:#c9d3e3}
.arev-how{color:#e8d5b0 !important; font-size:12px !important; opacity:.9}
.arev-btns{display:flex; flex-wrap:wrap; gap:8px; margin-top:6px}
.arev-btns .btn,.arev-btns .ghost{width:auto; margin:0; padding:9px 16px}
/* from Rare up a soft pulse; Epic and up a ring of light; Mythical slow rays behind (only transforms and opacity move) */
.arev.shown:not(.dup):is(.r-R,.r-E,.r-L,.r-M) .arev-glow{animation:arevPulse 2.6s ease-in-out .6s infinite}
@keyframes arevPulse{50%{transform:scale(1.1); opacity:.75}}
.arev-ring{position:absolute; inset:-9%; border-radius:16px; pointer-events:none; opacity:0;
  background:conic-gradient(from 0deg, transparent 0 20%, var(--lt) 30%, transparent 45% 70%, var(--lt) 80%, transparent 95%);
  -webkit-mask:radial-gradient(closest-side, transparent 80%, #000 82%, #000 96%, transparent 100%); mask:radial-gradient(closest-side, transparent 80%, #000 82%, #000 96%, transparent 100%)}
.arev.shown .arev-ring{animation:arevIn .6s ease-out .4s forwards, arevSpin 5s linear .4s infinite}
.arev-rays{position:absolute; inset:-80%; pointer-events:none; opacity:0; border-radius:50%;
  background:repeating-conic-gradient(from 0deg, rgba(170,150,255,.22) 0 6deg, transparent 6deg 20deg);
  -webkit-mask:radial-gradient(circle, #000 10%, transparent 62%); mask:radial-gradient(circle, #000 10%, transparent 62%)}
.arev.shown .arev-rays{animation:arevIn 1s ease-out .3s forwards, arevSpin 26s linear .3s infinite}
@keyframes arevSpin{to{transform:rotate(360deg)}} @keyframes arevIn{to{opacity:1}}
@media (prefers-reduced-motion:reduce){ .arev *{animation:none !important} .arev.shown .arev-ring,.arev.shown .arev-rays{opacity:1} }
@media (max-width:560px){ .arev-in{flex-direction:column; gap:8px} .arev-stage{height:min(62vh,440px)} .arev-text{justify-items:center; text-align:center} }
/* (4 Nov 2026) press and hold an album card: it opens big in the middle (js/album.js albumZoom) */
.albzoom{position:fixed; inset:0; z-index:90; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px;
  background:rgba(6,4,3,.86); backdrop-filter:blur(3px); padding:16px}
.albzoom[hidden]{display:none}
.albzoom figure{margin:0; height:min(76vh,560px); aspect-ratio:5/7; width:auto; max-width:90vw}
.albzoom figure .apic,.albzoom figure img{width:100%; height:100%; object-fit:cover; border-radius:14px; display:block}
.albzoom figcaption{display:grid; justify-items:center; gap:2px; color:#f6e6da} .albzoom figcaption b{font-size:20px}
.albzoom .albzx{position:absolute; top:14px; right:14px}
/* (7 Nov 2026, user) the whole card, in its own shape, as big as the screen allows */
.albzoom figure.albfull{height:auto !important; width:auto !important; max-width:none !important; aspect-ratio:auto; display:grid; place-items:center}
.albzoom figure.albfull img{width:auto; height:auto; max-height:calc(100dvh - 20px); max-width:calc(100vw - 92px); object-fit:contain; border-radius:14px; box-shadow:0 12px 40px rgba(0,0,0,.65)}
/* (7 Nov 2026, user) Pearl Treasures stand out: a slow soft pearl glow */
.apearl{position:relative; color:#fff6ec !important; border-color:#efe3ff !important; background:linear-gradient(135deg,#6a4f7a,#3c5f86 55%,#8a6a8c) !important; animation:pearlGlow 2.8s ease-in-out infinite}
@keyframes pearlGlow{0%,100%{box-shadow:0 0 6px 1px rgba(236,226,255,.5), 0 0 14px 3px rgba(190,220,255,.28)} 50%{box-shadow:0 0 12px 3px rgba(255,246,236,.95), 0 0 28px 9px rgba(200,225,255,.55)}}
.pearlrow section{animation:pearlSoft 3.4s ease-in-out infinite; border-color:rgba(236,226,255,.5)}
@keyframes pearlSoft{0%,100%{box-shadow:0 0 8px rgba(220,225,255,.15)} 50%{box-shadow:0 0 20px rgba(226,232,255,.42)}}
@media (prefers-reduced-motion:reduce){ .apearl,.pearlrow section{animation:none; box-shadow:0 0 12px 2px rgba(236,226,255,.6)} }
.tst.pending{font-style:normal; font-size:11px; padding:1px 7px; border-radius:9px; color:#2a180a; background:#ecc48f}
/* (4 Nov 2026) golden cards (Pearl Challenge) and the Pearl treasures window */
.acard.gold{box-shadow:0 0 0 2px #f3c76b, 0 0 14px rgba(243,199,107,.65) !important}
.acard.gold .apic{position:relative; overflow:hidden}
.acard.gold .apic::after{content:''; position:absolute; inset:0; background:linear-gradient(115deg,transparent 30%,rgba(255,236,170,.55) 48%,transparent 62%); background-size:250% 100%; animation:agoldsh 3.2s ease-in-out infinite; pointer-events:none}
@keyframes agoldsh{0%{background-position:120% 0}60%,100%{background-position:-120% 0}}
@media (prefers-reduced-motion:reduce){ .acard.gold .apic::after{animation:none} }
.agold{position:absolute; left:50%; bottom:4px; transform:translateX(-50%); font-style:normal; font-size:9px; font-weight:900; letter-spacing:.08em; text-transform:uppercase; color:#1b1207; background:linear-gradient(180deg,#f3c76b,#d39a5e); padding:1px 7px; border-radius:999px}
.apearl{white-space:nowrap}
#pearlOv>.panel.pearlp{max-width:min(760px,100%); width:100%; padding:14px 16px 16px !important}
.pearlrow{display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:8px}
.pearlrow section{display:grid; gap:6px; align-content:start; padding:12px; border-radius:16px; border:1px solid rgba(240,192,138,.25); background:rgba(0,0,0,.28)}
.pearlrow h3{margin:0; color:#f0c08a} .pearlrow p{margin:0; font-size:13px; line-height:1.45; color:var(--muted)} .pearlrow p b{color:var(--cream)}
.pearlbtns{display:flex; gap:8px} .pearlbtns .btn{flex:1}
.pearlrow .btn{width:100%; padding:9px 8px}
@media (max-height:380px){ .pearlrow p{font-size:12px} .pearlrow section{padding:9px} }
.albzoom figure.acard{height:min(76vh,560px) !important; width:auto !important; max-width:90vw !important; aspect-ratio:5/7; flex:none}
/* (Step 17) card name + rarity written over the frame's empty top bar and bottom plaque (one SVG per card, see albumTxt in album.js) */
.atxt3{position:absolute; inset:0; width:100%; height:100%; pointer-events:none; z-index:1; overflow:visible}
.atxt3 text{text-anchor:middle; font-family:var(--f-display,"Cinzel",Georgia,serif); font-weight:700; paint-order:stroke; stroke-linejoin:round}
.atxt3 .tn{fill:#20242a; stroke:rgba(255,255,255,.35); stroke-width:5}
.atxt3 .tr{letter-spacing:7px; font-weight:800}
/* ink to match each frame: dark on the light frames, light on the dark ones */
.atxt3.r-C text{fill:#1d2126; stroke:rgba(255,255,255,.4)}
.atxt3.r-U text{fill:#f3e7b4; stroke:rgba(10,30,14,.7)}
.atxt3.r-R text{fill:#0e2650; stroke:rgba(255,255,255,.55)}
.atxt3.r-E text{fill:#f1e1ff; stroke:rgba(30,8,50,.75)}
.atxt3.r-L text{fill:#3a2205; stroke:rgba(255,240,190,.55)}
.atxt3.r-M text{fill:#3b1d62; stroke:rgba(255,255,255,.6)}
.albzoom figure.albfull .albbox{position:relative; display:inline-block; line-height:0}
.albzoom figure.albfull .albbox .atxt3{border-radius:0}
.albzoom figure.albfull .albbox img{display:block}
.atxt3 .tc{letter-spacing:1px; font-weight:800}
/* the number is written in the frame's gem now, and the "New" mark moves to the bottom-left corner of the plaque so neither covers the name */
.acard.have .ano{display:none}
.acard.have .anew{top:auto; bottom:5.2%; right:auto; left:5%}

/* (15 Nov 2026, user) the two buttons top right (Pearl, Trade) lose their boxes: only the icons stay (still tappable) */
html body #albumOv :is(#albumPearl,#albumTrade):not(#_):not(#_):not(#_){background:none !important; border:0 !important; box-shadow:none !important; min-width:0 !important; padding:2px !important}
html body #albumOv :is(#albumPearl,#albumTrade):not(#_):not(#_):not(#_)::before,html body #albumOv :is(#albumPearl,#albumTrade):not(#_):not(#_):not(#_)::after{display:none !important}
