/* Collection page and pack opening */
.cwrap { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 0 16px 60px; }
.chero { padding: 36px 0 8px; text-align: center; }
.chero h1 { font-size: clamp(34px, 6.5vw, 64px); line-height: 1.04; margin: 10px 0 12px; }
.chero h1 em { font-style: normal; color: var(--cyan); text-shadow: 0 0 30px rgba(24,191,255,.55); }
.chero .lede { color: var(--dim); max-width: 60ch; margin: 0 auto; font-size: 16.5px; }
.found { margin-top: 10px; font: 600 14px var(--mono); color: var(--soft); }

/* pack */
.packzone { min-height: 520px; display: grid; place-items: center; padding: 24px 0; }
.stage { width: 100%; display: grid; place-items: center; }
.pack { position: relative; width: 230px; aspect-ratio: 5 / 7.6; border: 0; padding: 0; border-radius: 18px; cursor: pointer; color: var(--text); font: inherit; overflow: hidden;
  background: radial-gradient(80% 60% at 50% 34%, #164766, #0a1118 70%); box-shadow: 0 40px 80px -30px #000, inset 0 0 0 1px rgba(114,220,255,.4), 0 0 60px -20px var(--cyan);
  animation: hover 3.4s ease-in-out infinite; }
@keyframes hover { 50% { transform: translateY(-10px) rotate(-1deg); } }
.pack::before { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(114,220,255,.35) 45%, rgba(224,190,114,.3) 50%, transparent 62%); background-size: 260% 100%; animation: sheen 3.6s ease-in-out infinite; mix-blend-mode: color-dodge; }
.pack .crimp { position: absolute; left: 0; right: 0; height: 18px; background: repeating-linear-gradient(90deg, #2c4656 0 6px, #9fe6ff 6px 8px); opacity: .7; }
.pack .crimp.t { top: 0; } .pack .crimp.b { bottom: 0; }
.pack .emb { position: absolute; left: 50%; top: 40%; width: 52%; transform: translate(-50%, -50%); filter: drop-shadow(0 0 14px var(--cyan)); }
.pack .lab { position: absolute; left: 0; right: 0; bottom: 34px; text-align: center; }
.pack .lab b { display: block; font: 600 22px var(--serif); }
.pack.rip { animation: rip .7s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes rip { 30% { transform: scale(1.08) rotate(2deg); filter: brightness(1.8); } 100% { transform: scale(.4) translateY(-80px); opacity: 0; filter: brightness(3); } }
.hand5 { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; width: 100%; perspective: 1400px; }
.pslot { width: min(200px, calc(20% - 13px)); position: relative; opacity: 0; transform: translateY(40px) scale(.9); animation: deal .55s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes deal { to { opacity: 1; transform: none; } }
.flipper { position: relative; width: 100%; aspect-ratio: 63 / 88; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.2,.7,.2,1); cursor: pointer; }
.pslot.open .flipper { transform: rotateY(180deg); }
.flipper .face, .flipper .bk { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flipper .face { transform: rotateY(180deg); }
.flipper .bk { border-radius: 4.6% / 3.3%; background: radial-gradient(70% 55% at 50% 45%, #10314a, #060a10 75%); border: 1px solid #1d3242; display: grid; place-items: center; overflow: hidden; }
.flipper .bk::before { content: ""; position: absolute; width: 58%; aspect-ratio: 1; border-radius: 50%; box-shadow: 0 0 0 1px rgba(114,220,255,.5), 0 0 24px rgba(24,191,255,.5), inset 0 0 30px rgba(24,191,255,.3); animation: breathe 2.6s ease-in-out infinite; }
.flipper .bk svg { width: 40%; position: relative; filter: drop-shadow(0 0 10px var(--cyan)); }
.pslot.tell-sigil .bk { box-shadow: 0 0 30px -4px var(--soft); }
.pslot.tell-prime .bk { box-shadow: 0 0 40px 0 var(--cyan); animation: tell 1.1s ease-in-out infinite alternate; }
.pslot.tell-sable .bk { box-shadow: 0 0 50px 4px #e8f2f8, 0 0 90px -6px var(--gold); animation: tell .7s ease-in-out infinite alternate; }
@keyframes tell { to { filter: brightness(1.5); } }
.pslot .raysbox { opacity: 0; transition: opacity .6s; }
.pslot.open .raysbox { opacity: .85; }
.flash { position: fixed; inset: 0; z-index: 55; pointer-events: none; background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.85), rgba(114,220,255,.4) 30%, transparent 70%); }
.pnote { margin-top: 18px; color: var(--dim); text-align: center; font-size: 14px; }
.pnote .btn { margin-left: 8px; padding: 7px 14px; }

/* gallery */
.gallery-sec { padding-top: 30px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; align-items: center; }
.chip { border: 1px solid var(--line); background: rgba(10,17,24,.8); color: var(--text); border-radius: 99px; padding: 6px 12px; font: 500 13px var(--sans); cursor: pointer; }
.chip[aria-pressed="true"] { border-color: var(--cyan); background: rgba(24,191,255,.16); }
.filters input { flex: 1 1 180px; min-width: 0; background: rgba(10,17,24,.85); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 8px 12px; font: 14px var(--sans); }
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.cgrid .holo.unfound { filter: grayscale(.85) brightness(.55); }
.cgrid .cell { position: relative; }
.cgrid .new { position: absolute; z-index: 5; top: -6px; right: -6px; font: 700 10px var(--mono); background: var(--cyan); color: var(--void); padding: 2px 6px; border-radius: 6px; }

/* inspect */
.insp { position: fixed; inset: 0; z-index: 50; background: rgba(3,5,8,.9); backdrop-filter: blur(8px); display: flex; justify-content: center; align-items: flex-start; padding: 72px 16px 24px; overflow-y: auto; }
/* Close lives outside .insp: backdrop-filter makes .insp the containing block of fixed children, so a fixed
   Close inside it scrolled away with the closeup on phones */
.close.inspx { position: fixed; top: calc(14px + env(safe-area-inset-top, 0px)); right: 14px; z-index: 51; background: var(--ink); min-height: 40px; }
.insp[hidden] + .inspx { display: none; }
.ibox { display: grid; grid-template-columns: minmax(260px, 400px) minmax(0, 420px); gap: 40px; align-items: center; max-width: 900px; width: 100%; margin: auto 0; }
.icard { position: relative; }
.iinfo h2 { font-size: 34px; margin: 6px 0 10px; }
.iinfo .meta { font: 500 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--fc, var(--dim)); }
.iinfo p { color: #d6e3ea; font-size: 16px; }
.iinfo p b { color: var(--soft); }
.iinfo .means { margin: 16px 0; border-left: 3px solid var(--fc, var(--cyan)); padding: 6px 0 6px 14px; color: var(--text); font-size: 17px; }
.iinfo .means small { display: block; font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin-bottom: 4px; }
.iinfo .hash { font: 12px var(--mono); color: var(--dimtext); word-break: break-all; margin-top: 16px; }
.iinfo .anim { font: 600 12px var(--mono); color: var(--gold); }
@media (max-width: 760px) {
  .ibox { grid-template-columns: 1fr; gap: 20px; justify-items: center; }
  .icard { width: min(320px, 82vw); }
  .pslot { width: calc(50% - 8px); max-width: 190px; }
  .cgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}

/* ---------- more life: pack tilt and tear, flip shockwaves, gallery auras ---------- */
.pack { transform: perspective(700px) rotateY(calc(var(--tx, 0) * 22deg)) rotateX(calc(var(--ty, 0) * -18deg)); transition: transform .15s; }
.pack:hover { animation: none; box-shadow: 0 40px 80px -30px #000, inset 0 0 0 1px rgba(114,220,255,.7), 0 0 90px -10px var(--cyan); }
.pack:hover::before { animation-duration: 1.2s; }
.pack .tear { position: absolute; left: -10%; right: -10%; top: 15%; height: 3px; z-index: 3; background: linear-gradient(90deg, transparent, #fff, #72DCFF, #fff, transparent);
  box-shadow: 0 0 18px 4px #72DCFF; transform-origin: left; animation: tear .25s ease-out both; }
@keyframes tear { from { transform: scaleX(0); } }
.flipper .bk:hover { filter: brightness(1.25); }
.pslot.tell-prime .flipper .bk:hover, .pslot.tell-sable .flipper .bk:hover { animation: tell .25s ease-in-out infinite alternate, quake .12s linear infinite; }
@keyframes quake { 25% { translate: -1px 1px; } 75% { translate: 1px -1px; } }
.pslot .wave { position: absolute; left: 50%; top: 50%; width: 100%; aspect-ratio: 1; border-radius: 50%; pointer-events: none; z-index: 4;
  border: 2px solid var(--wc); box-shadow: 0 0 30px var(--wc), inset 0 0 30px var(--wc); transform: translate(-50%, -50%) scale(.2); animation: wave .8s cubic-bezier(.2,.7,.2,1) .25s both; }
.pslot .wave.t-signal, .pslot .wave.t-relay { border-width: 1px; box-shadow: 0 0 12px var(--wc); }
.pslot .wave.t-sable { animation-duration: 1.4s; border-width: 3px; }
@keyframes wave { to { transform: translate(-50%, -50%) scale(2.2); opacity: 0; } }
.pslot .new { position: absolute; z-index: 6; top: -8px; right: -8px; font: 700 11px var(--mono); background: var(--cyan); color: var(--void); padding: 3px 8px; letter-spacing: .1em;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); box-shadow: 0 0 16px var(--cyan); animation: newIn .5s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes newIn { from { transform: scale(2.4) rotate(-12deg); opacity: 0; } }

/* gallery: cards lift on hover; each rarity has its own idle aura */
.cgrid .cell { transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.cgrid .cell:hover { transform: translateY(-8px) scale(1.04); z-index: 3; }
.cgrid .cell::before { content: ""; position: absolute; inset: -6px; border-radius: 6%; pointer-events: none; opacity: 0; transition: opacity .4s; }
.cgrid .cell:hover::before { opacity: 1; }
.cgrid .cell.r-signal::before, .cgrid .cell.r-relay::before { box-shadow: 0 0 22px -6px rgba(114,220,255,.6); }
.cgrid .cell.r-sigil::before { opacity: .5; box-shadow: 0 0 26px -6px #E0BE72; animation: aura 3.2s ease-in-out infinite; }
.cgrid .cell.r-prime::before { opacity: .7; box-shadow: 0 0 32px -4px #f3c7a0, 0 0 60px -20px #c9a2ff; animation: aura 2.4s ease-in-out infinite; }
.cgrid .cell.r-sable::before { opacity: 1; box-shadow: 0 0 36px -2px #72DCFF, 0 0 70px -10px #E0BE72; animation: aura 1.8s ease-in-out infinite;
  background: radial-gradient(circle, rgba(255,255,255,.9) 0 1px, transparent 1.5px) 0 0 / 23px 29px, radial-gradient(circle, rgba(224,190,114,.9) 0 1px, transparent 1.5px) 11px 13px / 31px 37px; }
@keyframes aura { 50% { filter: brightness(1.6); transform: scale(1.015); } }
.cgrid .cell:has(.unfound)::before { display: none; }
.insp .iinfo #ihol { margin-top: 14px; }
@media (prefers-reduced-motion: reduce) { .cgrid .cell::before { animation: none !important; } .pack { transform: none; } }

/* ---------- accounts: an empty pack, the Vault ---------- */
.pack.empty { cursor: default; filter: grayscale(.7) brightness(.5); animation: none; }
.pack.empty::before { display: none; }
.vault-sec { position: relative; margin-top: 30px; padding: 26px 28px 28px; background: linear-gradient(180deg, rgba(3,7,11,.9), rgba(6,14,20,.86));
  border: 1px solid rgba(114,220,255,.35); backdrop-filter: blur(6px); box-shadow: inset 0 0 60px -20px rgba(24,191,255,.45);
  clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px); }
.vault-sec h2 { font-size: clamp(28px, 4.5vw, 42px); margin: 4px 0 6px; }
.vault-sec .lede { color: #c9d8e1; margin: 0 0 6px; }
.vxp { font: 600 14px var(--hud, system-ui); letter-spacing: .12em; text-transform: uppercase; color: #8fa3b0; margin-bottom: 18px; }
.vxp b { color: #E0BE72; font-size: 22px; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px; }
.vcell { display: grid; gap: 10px; align-content: start; }
.vcell:not(.owned) .holo { filter: grayscale(.75) brightness(.5); transition: filter .4s; }
.vcell:not(.owned):hover .holo { filter: grayscale(.3) brightness(.8); }
.vcell:not(.owned) .holo::after { content: "LOCKED"; position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); z-index: 9; padding: 4px 10px;
  font: 700 12px var(--hud, system-ui); letter-spacing: .3em; color: #72DCFF; background: rgba(3,7,11,.85); border: 1px solid rgba(114,220,255,.5); pointer-events: none; }
.vcell.owned .holo { filter: drop-shadow(0 0 16px rgba(24,191,255,.5)); }
.vinfo { display: grid; gap: 6px; }
.vinfo b { font: 700 15px/1.15 var(--hud, system-ui); text-transform: uppercase; letter-spacing: .03em; }
.vprice { font: 700 13px var(--mono, monospace); color: #E0BE72; }
.vbar { height: 6px; background: linear-gradient(90deg, #E0BE72 var(--p), #1d3242 var(--p)); }
.vown { font: 600 12px var(--hud, system-ui); letter-spacing: .14em; text-transform: uppercase; color: #8FD0B8; }
.vinfo .btn { padding: 8px 10px !important; font-size: 12px !important; }
@media (max-width: 760px) { .vault-sec { padding: 20px 16px; } .vgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
/* the SABLE Emblem showcase above the Vault grid */
.emb-show { display: grid; grid-template-columns: minmax(150px, 230px) 1fr; gap: 24px; align-items: center; margin: 0 0 26px; padding: 18px; border: 1px solid rgba(31,139,255,.4);
  background: radial-gradient(80% 120% at 0% 50%, rgba(31,139,255,.16), transparent 70%); box-shadow: inset 0 0 40px -16px #1f8bff; }
.emb-show:empty { display: none; }
.emb-show:not(.owned) .holo { filter: grayscale(.5) brightness(.6); }
.emb-show:not(.owned) .holo::after { content: "LOCKED"; position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); z-index: 9; padding: 4px 10px; font: 700 12px var(--hud, system-ui); letter-spacing: .3em; color: #9fd8ff; background: rgba(0,0,0,.85); border: 1px solid rgba(31,139,255,.6); pointer-events: none; }
.emb-info { display: grid; gap: 8px; }
.emb-info small { font: 700 12px var(--hud, system-ui); letter-spacing: .34em; text-transform: uppercase; color: #1f8bff; }
.emb-info b { font: 700 clamp(24px, 3.4vw, 34px)/1 var(--hud, system-ui); text-transform: uppercase; color: #fff; text-shadow: 0 0 18px rgba(31,139,255,.6); }
.emb-info p { margin: 0; color: #c9d8e1; max-width: 52ch; }
.emb-info .vbar { background: linear-gradient(90deg, #1f8bff var(--p), #1d3242 var(--p)); height: 8px; box-shadow: 0 0 10px -2px #1f8bff; }
.emb-days { font: 600 13px var(--hud, system-ui); letter-spacing: .16em; text-transform: uppercase; color: #9fd8ff; }
@media (max-width: 600px) { .emb-show { grid-template-columns: 1fr; justify-items: center; text-align: center; } .emb-show .holo { width: 200px; } }

/* the Workshop: Scrap and Craft */
.workshop { position: relative; margin-top: 26px; padding: 20px 24px; background: rgba(3,7,11,.88); border: 1px solid rgba(114,220,255,.3); backdrop-filter: blur(6px);
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px); display: grid; gap: 12px; }
.wtop { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.wtop small { display: block; font: 700 12px var(--hud, system-ui); letter-spacing: .3em; text-transform: uppercase; color: #72DCFF; }
.wtop b { font: 700 30px/1 var(--hud, system-ui); color: #9fe6ff; text-shadow: 0 0 16px rgba(24,191,255,.5); }
.wtop p { margin: 0; color: #c9d8e1; flex: 1 1 280px; }
.wrow { display: flex; flex-wrap: wrap; gap: 10px; }
.wmsg { margin: 0; min-height: 1.2em; font-size: 14px; }
.wmsg.ok { color: #8FD0B8; } .wmsg.bad { color: #FF7A59; }
.wshop { display: grid; gap: 6px; margin-top: 14px; justify-items: start; }
.wshop small { color: #8fa3b0; font-size: 13px; }
.cgrid .dup { position: absolute; z-index: 5; bottom: -6px; right: -6px; font: 700 12px var(--mono, monospace); background: #0b2433; color: #9fe6ff; border: 1px solid rgba(114,220,255,.6); padding: 2px 6px; }
