:root {
  --bg: #07080f; --bg2: #0d0f1a; --panel: #121524; --panel2: #181c2e; --line: rgba(255,255,255,.08); --line2: rgba(255,255,255,.14);
  --text: #eef1fb; --muted: #8b93ad; --dim: #5d6580; --gold: #f6c453; --violet: #8b5cf6; --accent: #f6c453; --good: #34d399; --bad: #f87171;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: 'Inter', system-ui, sans-serif; font-size: 15px; }
body { min-height: 100vh; background: radial-gradient(1200px 600px at 70% -10%, rgba(139,92,246,.16), transparent 60%), radial-gradient(900px 500px at 0% 0%, rgba(246,196,83,.08), transparent 60%), var(--bg); background-attachment: fixed; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--text); background: var(--bg2); border: 1px solid var(--line2); border-radius: 8px; padding: 8px 10px; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(246,196,83,.5); outline-offset: 0; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.muted { color: var(--muted); }
h1, h2, h3 { margin: 0; }
.display { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; }

/* header */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px; padding: 12px 24px; background: rgba(7,8,15,.78); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 10px; font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 26px; letter-spacing: .14em; }
.logo svg { width: 28px; fill: var(--gold); filter: drop-shadow(0 0 8px rgba(246,196,83,.6)); }
nav { display: flex; gap: 4px; flex: 1; }
nav a { padding: 8px 14px; border-radius: 999px; color: var(--muted); font-weight: 600; transition: .15s; }
nav a:hover { color: var(--text); background: rgba(255,255,255,.05); }
nav a.on { color: #111; background: var(--gold); }
.me { display: flex; align-items: center; gap: 10px; }
.coins { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: rgba(246,196,83,.1); border: 1px solid rgba(246,196,83,.3); color: var(--gold); }
.coins i { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff3c4, #f6c453 50%, #a87200); display: inline-block; box-shadow: 0 0 6px rgba(246,196,83,.6); }
.freepk { font-size: 12px; color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--line2); background: var(--panel2); font-weight: 700; transition: .15s; white-space: nowrap; }
.btn:hover { border-color: rgba(255,255,255,.3); transform: translateY(-1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.gold { background: linear-gradient(180deg, #ffd978, #e0a526); color: #2a1a00; border-color: #ffe39a; box-shadow: 0 6px 20px -6px rgba(246,196,83,.7); }
.btn.violet { background: linear-gradient(180deg, #a78bfa, #7c3aed); border-color: #c4b5fd; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn.danger { color: var(--bad); }
main { padding: 28px 24px 80px; max-width: 1400px; margin: 0 auto; }
.section-title { display: flex; align-items: baseline; gap: 14px; margin: 0 0 18px; }
.section-title h2 { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 34px; text-transform: uppercase; letter-spacing: .03em; }

/* pills */
.pill { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .06em; border: 1px solid var(--line2); white-space: nowrap; }
.pill.wear { color: var(--pc); border-color: color-mix(in srgb, var(--pc) 50%, transparent); background: color-mix(in srgb, var(--pc) 12%, transparent); }
.pill.fin { color: #cdd3e6; }
.fin-reverse { color: #9ad8ff !important; } .fin-holo { color: #c4b5fd !important; background: linear-gradient(90deg, rgba(255,77,109,.15), rgba(77,216,255,.15)); }
.fin-galaxy { color: #a5b4fc !important; background: rgba(79,70,229,.2); } .fin-prismatic { color: #fff !important; background: linear-gradient(90deg, #ff4d6d55, #ffcf4d55, #5dff8a55, #4dd8ff55, #8e6bff55); }
.fin-gold { color: #2a1a00 !important; background: linear-gradient(90deg, #ffe48a, #e0a526); border-color: #ffe39a !important; }
.fin-obsidian { color: #fff !important; background: #000; border-color: #888 !important; }
.pill.new { background: var(--good); color: #032; border: 0; }
.pill.prime { background: linear-gradient(90deg, #fff1b8, #f59e0b); color: #3b1d00; border: 0; }
.rar { font-weight: 800; }

/* pack shop */
.shop { display: grid; grid-template-columns: 1fr 340px; gap: 28px; }
.packs { display: flex; flex-wrap: wrap; gap: 36px; }
.packcard { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 26px 26px 22px; border-radius: 22px; background: linear-gradient(180deg, var(--panel), var(--bg2)); border: 1px solid var(--line); min-width: 280px; }
.packcard h3 { font-family: 'Barlow Condensed', sans-serif; font-size: 26px; text-transform: uppercase; letter-spacing: .04em; }
.packcard .tag { color: var(--muted); font-size: 13px; text-align: center; }
.packcard .row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.oddslink { font-size: 12px; color: var(--muted); text-decoration: underline; background: none; border: 0; }

.pack { --pw: 220px; --c1: #1d4ed8; --c2: #7c3aed; width: var(--pw); aspect-ratio: 5 / 8.4; position: relative; flex: none; perspective: 900px; }
.pack-inner { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateY(calc(var(--tx, 0) * 22deg)) rotateX(calc(var(--ty, 0) * -15deg)); transition: transform .08s; }
.pack-wrap { position: absolute; inset: 0; border-radius: 6px; overflow: hidden;
  --z: calc(var(--pw) * .045);
  -webkit-mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / calc(var(--z) * 2) 51% repeat-x, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(var(--z) * 2) 51% repeat-x;
  mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / calc(var(--z) * 2) 51% repeat-x, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(var(--z) * 2) 51% repeat-x;
  background: linear-gradient(var(--pang, 160deg), var(--c1), var(--c2) 60%, var(--c3, #05060f)); box-shadow: 0 20px 40px rgba(0,0,0,.6); }
.pack-crimp { position: absolute; left: 0; right: 0; height: 9%; background: repeating-linear-gradient(90deg, rgba(0,0,0,.25) 0 3px, rgba(255,255,255,.12) 3px 6px), var(--pcrimp, transparent); }
.pack-crimp.t { top: 0; } .pack-crimp.b { bottom: 0; }
.pack-tearline { position: absolute; left: 4%; right: 4%; top: 13%; border-top: 2px dashed rgba(255,255,255,.35); }
.pack-art { position: absolute; left: 10%; right: 10%; top: 18%; height: 52%; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 2px rgba(255,255,255,.35), 0 10px 30px rgba(0,0,0,.5); }
.pack-artimg { position: absolute; inset: 0; background-size: cover; background-position: center; background-repeat: no-repeat; }
.pack-art .glyph { position: absolute; left: 50%; top: 50%; width: 70%; transform: translate(-50%, -50%); filter: drop-shadow(0 0 14px var(--c1)); }
.pack-name { position: absolute; left: 0; right: 0; bottom: 14%; text-align: center; color: var(--ptext, #fff); font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: calc(var(--pw) * .13 * var(--pname, 1)); line-height: .9; text-transform: uppercase; text-shadow: 0 3px 12px rgba(0,0,0,.6); }
.pack-name small { display: block; font-size: .32em; letter-spacing: .3em; opacity: .8; margin-top: .4em; }
.pack-logo { position: absolute; top: 3.5%; left: 0; right: 0; text-align: center; font-family: 'Barlow Condensed', sans-serif; font-weight: 800; letter-spacing: .3em; font-size: calc(var(--pw) * .055); color: var(--ptext, #fff); opacity: .85; }
.pack-foil { position: absolute; inset: 0; mix-blend-mode: color-dodge; opacity: var(--pfoil, .5); pointer-events: none;
  background-image: var(--tex-sparkle), linear-gradient(115deg, transparent 20%, rgba(255,255,255,.6) 45%, transparent 60%), linear-gradient(115deg, #ff6b8b33, #ffcf6b33 20%, #8dffb033 40%, #6be0ff33 60%, #a58bff33 80%, #ff8be333);
  background-size: 150% auto, 300% 300%, 400% 400%; background-repeat: no-repeat; background-position: 0 0, var(--mx, 50%) var(--my, 50%), var(--mx, 50%) var(--my, 50%); }
.pack.float { animation: pack-float 4s ease-in-out infinite; }
@keyframes pack-float { 50% { transform: translateY(-8px); } }

.feed { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 18px; align-self: start; position: sticky; top: 84px; }
.feed h3 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; display: flex; justify-content: space-between; }
.feed-row { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 10px; cursor: pointer; }
.feed-row:hover { background: rgba(255,255,255,.04); }
.feed-row .txt { min-width: 0; font-size: 13px; }
.feed-row .txt b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-strip { display: flex; gap: 16px; align-items: center; margin-bottom: 26px; padding: 18px 22px; border-radius: 18px; background: linear-gradient(90deg, rgba(246,196,83,.12), rgba(139,92,246,.12)); border: 1px solid var(--line); flex-wrap: wrap; }
.hero-strip .big { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 30px; text-transform: uppercase; }

/* opening overlay */
#overlay { position: fixed; inset: 0; z-index: 50; background: radial-gradient(circle at 50% 45%, #1a1f3d 0%, #05060c 70%); display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; }
#overlay[hidden] { display: none; }
.ov-close { position: absolute; top: 16px; right: 16px; z-index: 5; }
.ov-hint { position: absolute; bottom: 7%; left: 0; right: 0; text-align: center; color: var(--muted); font-weight: 600; letter-spacing: .08em; pointer-events: none; animation: hint 1.6s ease-in-out infinite; }
@keyframes hint { 50% { opacity: .45; } }
.tear-zone { position: absolute; left: -10%; right: -10%; top: -4%; height: 24%; cursor: ew-resize; z-index: 4; }
.tear-cut { position: absolute; left: 0; top: 13%; height: 4px; width: 0; border-radius: 4px; background: linear-gradient(90deg, #fff, #ffe39a); box-shadow: 0 0 14px #fff, 0 0 30px #f6c453; z-index: 3; pointer-events: none; }
.tear-guide { position: absolute; top: calc(13% - 18px); left: 0; font-size: 24px; animation: guide 1.6s ease-in-out infinite; pointer-events: none; z-index: 3; }
@keyframes guide { 0% { left: 0; opacity: 0; } 20% { opacity: 1; } 80% { opacity: 1; } 100% { left: 90%; opacity: 0; } }
.piece-top { position: absolute; inset: 0; transition: transform 1s cubic-bezier(.2,.7,.3,1), opacity 1s; }
.piece-top.off { transform: translate(60%, -140%) rotate(28deg); opacity: 0; }
.piece-body { position: absolute; inset: 0; transition: transform .7s cubic-bezier(.5,0,.7,.4), opacity .5s .2s; }
.piece-body.off { transform: translateY(120%); opacity: 0; }
.reveal { position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.stack { position: relative; width: var(--cw); aspect-ratio: 25 / 35; }
.stack > .slot { position: absolute; inset: 0; transition: transform .55s cubic-bezier(.3,.8,.3,1), opacity .5s; }
.stack > .slot.gone-l { transform: translate(-130vw, -10vh) rotate(-35deg) !important; opacity: 0; }
.stack > .slot.gone-r { transform: translate(130vw, -10vh) rotate(35deg) !important; opacity: 0; }
.stack > .slot.emerge { animation: emerge .8s cubic-bezier(.2,.9,.3,1.1) both; }
@keyframes emerge { from { transform: translateY(70%) scale(.6); opacity: 0; } }
.rv-info { text-align: center; min-height: 82px; }
.rv-info .nm { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 30px; text-transform: uppercase; }
.rv-info .tags { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 6px; }
.rv-count { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); color: var(--muted); font-weight: 700; letter-spacing: .2em; font-size: 13px; }
.rays { position: absolute; left: 50%; top: 42%; width: 160vmax; height: 160vmax; transform: translate(-50%, -50%); pointer-events: none; opacity: 0; transition: opacity .6s;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--rc, #fff) 40%, transparent) 0 6deg, transparent 6deg 18deg); -webkit-mask: radial-gradient(circle, #000 0, transparent 45%); mask: radial-gradient(circle, #000 0, transparent 45%); animation: spin 30s linear infinite; }
.rays.on { opacity: 1; }
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.flash.go { animation: flash .7s ease-out; }
@keyframes flash { 0% { opacity: .85; } 100% { opacity: 0; } }
.spark { position: absolute; width: 8px; height: 8px; border-radius: 2px; pointer-events: none; animation: spark 1.6s cubic-bezier(.1,.6,.3,1) forwards; }
@keyframes spark { to { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; } }
.shake { animation: shake .45s; }
@keyframes shake { 20% { transform: translate(-6px, 3px); } 40% { transform: translate(5px, -4px); } 60% { transform: translate(-3px, 2px); } 80% { transform: translate(2px, -1px); } }
.summary { width: min(1100px, 94vw); max-height: 92vh; overflow: auto; text-align: center; padding: 20px; }
.summary .grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; margin: 22px 0; }
.summary .cell { display: flex; flex-direction: column; align-items: center; gap: 6px; animation: emerge .6s both; }
.god-banner { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 54px; background: linear-gradient(90deg, #ff4d6d, #ffcf4d, #5dff8a, #4dd8ff, #8e6bff); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* grids */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.toolbar .grow { flex: 1; }
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 26px 18px; }
.ctile { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; }
.ctile .cap { width: 100%; max-width: 176px; display: flex; justify-content: space-between; align-items: center; gap: 4px; font-size: 12px; }
.ctile .cap .mono { color: var(--muted); font-size: 11px; }
.ctile:hover .pcard, .ctile:hover .slab { transform: translateY(-4px); }
.ctile .pcard, .ctile .slab { transition: transform .2s; }
.empty { text-align: center; padding: 70px 20px; color: var(--muted); }
.empty .btn { margin-top: 16px; }

/* modal */
#modal { position: fixed; inset: 0; z-index: 60; background: rgba(3,4,8,.78); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; padding: 20px; }
#modal[hidden] { display: none; }
.mbox { background: linear-gradient(180deg, var(--panel), var(--bg2)); border: 1px solid var(--line2); border-radius: 22px; max-width: 1060px; width: 100%; max-height: 94vh; overflow: auto; position: relative; }
.mbox.sm { max-width: 420px; padding: 28px; }
.mclose { position: absolute; top: 12px; right: 12px; z-index: 3; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.06); border: 1px solid var(--line2); font-size: 18px; }
.detail { display: grid; grid-template-columns: 1fr 1fr; }
.detail .stage { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 40px 20px; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--rc, #888) 22%, transparent), transparent 65%); min-height: 600px; }
.detail .info { padding: 34px 32px; display: flex; flex-direction: column; gap: 18px; border-left: 1px solid var(--line); }
.detail h2 { font-family: 'Barlow Condensed', sans-serif; font-size: 40px; text-transform: uppercase; line-height: .95; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kv > div { background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.kv span { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.kv b { font-size: 16px; }
.floatbar { position: relative; padding-top: 4px; }
.floatbar .segs { display: flex; height: 10px; border-radius: 5px; overflow: hidden; }
.floatbar .segs i { display: block; height: 100%; }
.floatbar .mark { position: absolute; top: -4px; width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 10px solid #fff; transform: translateX(-7px); filter: drop-shadow(0 0 4px #fff); }
.floatbar .val { font-family: 'JetBrains Mono', monospace; font-size: 20px; font-weight: 700; margin-top: 10px; }
.floatbar .labels { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); margin-top: 6px; letter-spacing: .05em; }
.subg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.subg > div { text-align: center; background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 10px; padding: 8px 4px; }
.subg span { font-size: 10px; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.subg b { display: block; font-size: 20px; font-family: 'Barlow Condensed', sans-serif; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.formrow { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.formrow label { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .05em; }
.tabs2 { display: flex; gap: 6px; margin-bottom: 18px; }
.tabs2 button { flex: 1; padding: 10px; border-radius: 10px; background: transparent; border: 1px solid var(--line2); font-weight: 700; }
.tabs2 button.on { background: var(--gold); color: #2a1a00; border-color: var(--gold); }
.err { color: var(--bad); font-size: 13px; min-height: 18px; }
.grading { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 40px; }
.grading .spinner { width: 54px; height: 54px; border-radius: 50%; border: 4px solid rgba(255,255,255,.1); border-top-color: var(--gold); animation: spin2 .8s linear infinite; }
@keyframes spin2 { to { transform: rotate(360deg); } }
.slab-pop { animation: slabpop .8s cubic-bezier(.2,1.4,.4,1); }
@keyframes slabpop { from { transform: scale(.4) rotate(-8deg); opacity: 0; } }

/* tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 10px 8px; border-bottom: 1px solid var(--line2); position: sticky; top: 64px; background: var(--bg); }
.tbl td { padding: 9px 8px; border-bottom: 1px solid var(--line); }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: rgba(255,255,255,.03); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.statgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-bottom: 30px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.stat span { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.stat b { display: block; font-family: 'Barlow Condensed', sans-serif; font-size: 34px; font-weight: 800; }
.twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 30px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.panel h3 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.lrow { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; cursor: pointer; }
.lrow:hover { background: rgba(255,255,255,.04); }
.lrow .grow { flex: 1; min-width: 0; }
.lrow .grow b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--panel2); border: 1px solid var(--line2); padding: 10px 18px; border-radius: 12px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.5); animation: emerge .3s both; }
.toast.bad { border-color: var(--bad); color: #fecaca; }

@media (max-width: 1000px) {
  .shop { grid-template-columns: 1fr; }
  .feed { position: static; }
  .detail { grid-template-columns: 1fr; }
  .detail .stage { min-height: 0; }
  .detail .info { border-left: 0; border-top: 1px solid var(--line); }
  .twocol { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  html, body { font-size: 14px; }
  .top { flex-wrap: wrap; gap: 10px; padding: 10px 16px; }
  nav { order: 3; width: 100%; overflow-x: auto; }
  main { padding: 18px 16px 80px; }
  .cgrid { grid-template-columns: repeat(2, 1fr); gap: 20px 12px; }
  .packcard { min-width: 0; width: 100%; }
}

/* anticipation charge between tear and reveal */
.charging { animation: rumble .09s linear infinite; }
.lv0.charging { animation: none; }
.lv1 { --amp: 1px; } .lv2 { --amp: 2px; } .lv3 { --amp: 3.5px; } .lv4 { --amp: 5px; }
@keyframes rumble { 0% { translate: 0 0; } 25% { translate: calc(var(--amp) * -1) calc(var(--amp) * .5); } 50% { translate: var(--amp) calc(var(--amp) * -.5); } 75% { translate: calc(var(--amp) * -.5) var(--amp); } }
/* aura sits behind both halves (a filter on the clipped halves would be clipped too) */
.charge-aura { position: absolute; inset: 13.5% 1% 1%; z-index: -1; border-radius: 8px; pointer-events: none; opacity: 0;
  box-shadow: 0 0 40px 6px var(--cc), 0 0 110px 20px color-mix(in srgb, var(--cc) 55%, transparent);
  animation: aura var(--dur) ease-in forwards, aurapulse .45s ease-in-out infinite alternate; }
@keyframes aura { 15% { opacity: .35; } 100% { opacity: 1; } }
@keyframes aurapulse { to { scale: 1.03; } }
.lv0 .charge-aura { box-shadow: 0 0 30px 2px var(--cc); }
.charging .piece-body .pack-wrap { animation: packbright var(--dur) ease-in forwards; }
@keyframes packbright { to { filter: brightness(1.35) saturate(1.2); } }
.charge-slit { position: absolute; left: 3%; right: 3%; top: 13%; height: 2px; z-index: 6; pointer-events: none; border-radius: 50%;
  background: #fff; box-shadow: 0 0 10px 3px var(--cc), 0 0 30px 8px var(--cc); animation: slit var(--dur) ease-in forwards; }
@keyframes slit { 0% { height: 2px; opacity: .6; } 100% { height: 9px; opacity: 1; transform: translateY(-3px); } }
.charge-glow { position: absolute; left: 50%; top: 13%; width: 170%; height: 75%; z-index: 5; pointer-events: none; opacity: 0; mix-blend-mode: screen;
  transform: translate(-50%, -50%) scale(.15);
  background: radial-gradient(ellipse at center, #fff 0%, var(--cc) 12%, color-mix(in srgb, var(--cc) 35%, transparent) 30%, transparent 62%);
  animation: cglow var(--dur) ease-in forwards; }
@keyframes cglow { 0% { transform: translate(-50%, -50%) scale(.2); opacity: 0; } 25% { transform: translate(-50%, -50%) scale(.6); opacity: .6; } 100% { transform: translate(-50%, -50%) scale(1.35); opacity: 1; } }
.lv4 .charge-glow { background: conic-gradient(#ff4d6d, #ffcf4d, #5dff8a, #4dd8ff, #8e6bff, #ff4dd8, #ff4d6d);
  -webkit-mask: radial-gradient(ellipse at center, #000 0, #000 10%, transparent 62%); mask: radial-gradient(ellipse at center, #000 0, #000 10%, transparent 62%);
  animation: cglow var(--dur) ease-in forwards, huespin .8s linear infinite; }
@keyframes huespin { to { filter: hue-rotate(360deg); } }
.cbeam { position: absolute; bottom: 87%; height: 0; z-index: 6; pointer-events: none; transform-origin: bottom center; border-radius: 50% 50% 0 0;
  background: linear-gradient(to top, var(--cc), color-mix(in srgb, var(--cc) 40%, transparent) 60%, transparent); mix-blend-mode: screen; filter: blur(1.5px);
  animation: beam var(--dur) cubic-bezier(.6, 0, .9, .6) forwards; }
.lv4 .cbeam { animation: beam var(--dur) cubic-bezier(.6, 0, .9, .6) forwards, huespin .8s linear infinite; }
@keyframes beam { to { height: 130%; } }
.cpart { position: absolute; top: 13%; width: 5px; height: 5px; border-radius: 50%; z-index: 7; pointer-events: none; animation: rise 1s ease-out forwards; }
@keyframes rise { 0% { opacity: 0; transform: scale(.4); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.2); } }
.spark { position: fixed; }

/* create page */
.create { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.cform { display: flex; flex-direction: column; gap: 14px; }
.cform .panel h3 { margin-bottom: 10px; }
.crow { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 10px; }
.crow > label:not(.btn), .cform label.full { flex: 1; min-width: 140px; display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); font-weight: 600; }
.cform label.full { margin-bottom: 10px; }
.cform input:not([type=range]):not([type=file]), .cform select, .cform textarea { width: 100%; }
.cform input[type=range] { padding: 0; }
.cprev { position: sticky; top: 84px; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 24px 0; border-radius: 18px; background: radial-gradient(circle at 50% 35%, rgba(139,92,246,.18), transparent 65%); }
.cprev .seg { display: flex; width: 100%; border: 1px solid var(--line2); border-radius: 10px; overflow: hidden; }
.cprev .seg button { flex: 1; padding: 8px; background: none; border: 0; font-size: 12px; font-weight: 700; color: var(--muted); }
.cprev .seg button.on { background: rgba(246,196,83,.18); color: var(--gold); }
/* guide page */
.gh { font-family: 'Barlow Condensed', sans-serif; font-size: 28px; text-transform: uppercase; margin: 34px 0 4px; }
.grow-row { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 14px; }
.gcell { width: 170px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 13px; }
.gcell p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.guide-grade { display: flex; gap: 28px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.guide-grade .slabs { display: flex; gap: 18px; flex-wrap: wrap; }
@media (max-width: 900px) { .create { grid-template-columns: 1fr; } .cprev { position: static; order: -1; } .gcell { width: calc(50% - 9px); } }

/* pack designer options */
.pack-bgimg { position: absolute; inset: 0; background-repeat: no-repeat; }
.pack-pattern { position: absolute; inset: 0; pointer-events: none; }
.pat-stripes .pack-pattern { background: repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 2px, transparent 2px 7px); }
.pat-dots .pack-pattern { background: radial-gradient(rgba(255,255,255,.14) 1.2px, transparent 1.6px) 0 0 / 10px 10px; }
.pat-diamonds .pack-pattern { background: linear-gradient(45deg, rgba(255,255,255,.06) 25%, transparent 25% 75%, rgba(255,255,255,.06) 75%) 0 0 / 16px 16px, linear-gradient(-45deg, rgba(255,255,255,.06) 25%, transparent 25% 75%, rgba(255,255,255,.06) 75%) 8px 8px / 16px 16px; }
.pat-rays .pack-pattern { background: repeating-conic-gradient(from 0deg at 50% 44%, rgba(255,255,255,.07) 0 6deg, transparent 6deg 14deg); }
.pat-waves .pack-pattern { background: repeating-radial-gradient(circle at 50% 120%, rgba(255,255,255,.06) 0 3px, transparent 3px 14px); }
.foil-none .pack-foil { display: none; }
.foil-gold .pack-foil { background-image: var(--tex-sparkle), linear-gradient(115deg, transparent 20%, rgba(255,230,150,.85) 45%, #fff 50%, rgba(255,200,90,.8) 55%, transparent 70%);
  background-size: 150% auto, 300% 300%; background-repeat: no-repeat; background-position: var(--mx, 50%) var(--my, 50%), var(--mx, 50%) var(--my, 50%); }
.foil-silver .pack-foil { background-image: var(--tex-sparkle), linear-gradient(115deg, transparent 20%, rgba(220,230,255,.8) 45%, #fff 50%, rgba(200,210,230,.7) 55%, transparent 70%);
  background-size: 150% auto, 300% 300%; background-repeat: no-repeat; background-position: var(--mx, 50%) var(--my, 50%), var(--mx, 50%) var(--my, 50%); }
.foil-galaxy .pack-foil { background-image: var(--tex-cosmos); background-size: 170% auto; background-repeat: no-repeat;
  background-position: calc(50% + var(--tx, 0) * 15%) calc(50% + var(--ty, 0) * 15%); }
.shape-circle .pack-art { left: 14%; right: 14%; top: 19%; height: auto; aspect-ratio: 1; border-radius: 50%; }
.shape-arch .pack-art { border-radius: 999px 999px 12px 12px; }
.shape-full .pack-art { left: 0; right: 0; top: 0; height: 100%; border-radius: 0; box-shadow: none; }
.shape-full .pack-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35), transparent 25%, transparent 55%, rgba(0,0,0,.75)); }
.pack-setlogo { position: absolute; left: 50%; top: 66%; width: 30%; transform: translate(-50%, -50%); filter: drop-shadow(0 4px 10px rgba(0,0,0,.6)); }

/* shop stock */
.stockbar { width: 100%; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); text-align: center; }
.stockbar .bar { margin: 0; }
.nbadge { background: var(--bad); color: #fff; border-radius: 999px; padding: 1px 7px; font-size: 11px; font-weight: 800; margin-left: 2px; }
nav a.on .nbadge { background: #111; color: var(--gold); }
/* trophy case */
.trophy { border-radius: 22px; padding: 22px; background: linear-gradient(180deg, #0f1222, #070810); border: 1px solid var(--line2); position: relative; overflow: hidden; }
.trophy::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(500px 220px at 25% -40px, rgba(255,240,200,.12), transparent 70%), radial-gradient(500px 220px at 75% -40px, rgba(200,180,255,.1), transparent 70%); }
.trophy-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; position: relative; }
.trophy-head h3 { font-family: 'Barlow Condensed', sans-serif; font-size: 26px; text-transform: uppercase; }
.shelf { display: flex; gap: 30px; flex-wrap: wrap; justify-content: center; padding: 26px 10px 0; position: relative; }
.shelf::after { content: ''; position: absolute; left: 0; right: 0; bottom: 34px; height: 16px; border-radius: 4px; background: linear-gradient(180deg, #2a2f48, #151827); box-shadow: 0 10px 30px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.12); z-index: 0; }
.stand { display: flex; flex-direction: column; align-items: center; gap: 22px; cursor: pointer; position: relative; z-index: 1; }
.stand .pcard, .stand .slab { filter: drop-shadow(0 18px 18px rgba(0,0,0,.55)); }
.plaque { position: relative; z-index: 2; text-align: center; font-weight: 800; font-size: 13px; padding: 5px 12px; border-radius: 6px; background: linear-gradient(180deg, #e9d18a, #a77d22); color: #2a1a00; box-shadow: 0 3px 8px rgba(0,0,0,.5); }
.plaque span { display: block; font-size: 10px; font-weight: 600; opacity: .8; }
/* trades */
.tb { display: grid; grid-template-columns: 1fr 40px 1fr; gap: 12px; margin-top: 16px; }
.tside { background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tside h3 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.tray { display: flex; gap: 6px; flex-wrap: wrap; min-height: 76px; align-items: center; padding: 6px; border-radius: 10px; border: 1px dashed var(--line2); }
.tcoins { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.tcoins .coins { padding: 4px 8px; }
.tcoins input { width: 110px; }
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; max-height: 46vh; overflow: auto; padding: 4px; }
.tpick { display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; border-radius: 10px; padding: 3px; font-size: 10px; color: var(--muted); }
.tpick.sel { background: rgba(246,196,83,.18); box-shadow: 0 0 0 2px var(--gold); }
.tswap { align-self: center; text-align: center; font-size: 26px; color: var(--gold); }
.tfoot { display: flex; gap: 10px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.tfoot .msg { flex: 1; min-width: 200px; }
.tlist { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.trow { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.thead { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.tsides { display: grid; grid-template-columns: 1fr 40px 1fr; gap: 10px; }
.tsides .lbl { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.titems { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.tmini { cursor: pointer; }
.tact { display: flex; gap: 8px; }
@media (max-width: 760px) { .tb, .tsides { grid-template-columns: 1fr; } .tswap { transform: rotate(90deg); } }

/* cards rise out of the pack as it drops away */
.reveal.rise .stack { animation: rv-rise .8s cubic-bezier(.2,.9,.3,1.12) .05s both; }
.reveal.rise .rv-info { animation: fadein .4s .5s both; }
@keyframes rv-rise { 0% { transform: translateY(26%) scale(.74); opacity: 0; filter: brightness(2.2); } 45% { opacity: 1; } 100% { filter: brightness(1); } }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } }
.summary { animation: fadein .35s both; }

/* a page turning past the screen edge must not create sideways scroll */
main { overflow-x: clip; }



/* header: wrap the nav onto its own row before the account area runs off screen */
.freepk { white-space: nowrap; }
@media (max-width: 1240px) { .top { flex-wrap: wrap; row-gap: 8px; } .top nav { order: 3; flex: 1 1 100%; overflow-x: auto; } .top .me { margin-left: auto; } }

/* ================= binders ================= */
.bar { height: 6px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), #ff9f43); border-radius: 6px; }
.bk-shelf { display: flex; gap: 18px; overflow-x: auto; padding: 6px 4px 22px; margin-bottom: 8px; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.bk-book { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; flex: none; width: 104px; text-align: center; font-size: 12px; transition: transform .2s; }
.bk-book b { font-size: 13px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-book span { color: var(--muted); font-size: 11px; }
.bk-book:hover { transform: translateY(-4px); }
.bk-book.on .bk-cover { box-shadow: 0 0 0 2px var(--gold), 0 14px 30px rgba(0,0,0,.6); }
.bk-add .bk-addc { width: 92px; aspect-ratio: 3/4; border-radius: 6px 10px 10px 6px; border: 2px dashed var(--line2); display: flex; align-items: center; justify-content: center; font-size: 34px; color: var(--muted); }
.bk-add:hover .bk-addc { border-color: var(--gold); color: var(--gold); }

/* covers + materials (also used as the open binder's frame) */
.bk-cover { --cw: 92px; width: var(--cw); aspect-ratio: 3/4; border-radius: 4px 10px 10px 4px; position: relative; overflow: hidden; background-color: var(--cc);
  box-shadow: 0 10px 24px rgba(0,0,0,.55), inset -2px 0 0 rgba(255,255,255,.08); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6%; }
.bk-cover::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 12%; background: linear-gradient(90deg, rgba(0,0,0,.45), rgba(0,0,0,.15)); box-shadow: 1px 0 0 rgba(255,255,255,.12); }
.bk-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255,255,255,.18), transparent 35%, transparent 70%, rgba(0,0,0,.25)); pointer-events: none; }
.bk-cover-title { position: relative; z-index: 1; font-family: 'Barlow Condensed', sans-serif; font-weight: 800; text-transform: uppercase; font-size: calc(var(--cw) * .14); line-height: .95; padding: 0 12% 0 18%; text-align: center; color: rgba(255,255,255,.92); text-shadow: 0 1px 2px rgba(0,0,0,.6); max-height: 40%; overflow: hidden; }
.bk-emblem { position: relative; z-index: 1; padding-left: 8%; display: flex; }
.bk-icon { display: block; filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); }
.bk-icon path { fill: rgba(255,255,255,.88); }
.bk-icon path.det { fill: none; stroke: rgba(0,0,0,.35); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.bk-emblem .pcard { box-shadow: 0 4px 10px rgba(0,0,0,.5); }
.m-leather { background-image: radial-gradient(rgba(0,0,0,.16) 1px, transparent 1.4px), radial-gradient(rgba(255,255,255,.05) 1px, transparent 1.4px), linear-gradient(160deg, rgba(255,255,255,.08), rgba(0,0,0,.25)); background-size: 4px 4px, 5px 5px, 100% 100%; background-position: 0 0, 2px 3px, 0 0; }
.m-canvas { background-image: repeating-linear-gradient(0deg, rgba(0,0,0,.12) 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 1px, transparent 1px 3px), linear-gradient(160deg, rgba(255,255,255,.06), rgba(0,0,0,.2)); }
.m-carbon { background-image: repeating-linear-gradient(45deg, rgba(0,0,0,.35) 0 3px, rgba(255,255,255,.06) 3px 6px), repeating-linear-gradient(-45deg, rgba(0,0,0,.25) 0 3px, transparent 3px 6px), linear-gradient(160deg, rgba(255,255,255,.1), rgba(0,0,0,.35)); }
.m-metal { background-image: repeating-linear-gradient(90deg, rgba(255,255,255,.07) 0 1px, transparent 1px 3px), linear-gradient(135deg, rgba(255,255,255,.35), rgba(255,255,255,0) 40%, rgba(0,0,0,.3) 70%, rgba(255,255,255,.15)); }
.m-holo { background-image: var(--tex-sparkle), linear-gradient(115deg, rgba(255,77,109,.45), rgba(255,207,77,.4), rgba(93,255,138,.35), rgba(77,216,255,.4), rgba(142,107,255,.45)); background-size: 160% auto, 300% 300%; background-repeat: no-repeat; animation: bkholo 8s ease-in-out infinite alternate; }
@keyframes bkholo { from { background-position: 0% 0%, 0% 50%; } to { background-position: 100% 100%, 100% 50%; } }

/* header */
.bk-head { display: flex; align-items: center; gap: 14px; margin: 18px 0 14px; flex-wrap: wrap; }
.bk-ht { flex: 1; min-width: 180px; }
.bk-ht h3 { font-family: 'Barlow Condensed', sans-serif; font-size: 30px; text-transform: uppercase; line-height: 1; }
.bk-hact { display: flex; gap: 8px; flex-wrap: wrap; }

/* open binder */
.bk-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.bk-main.with-panel { grid-template-columns: minmax(0, 1fr) 320px; }
.bk-stage { display: flex; justify-content: center; min-width: 0; }
.bk-open { position: relative; padding: 14px; border-radius: 20px; background-color: var(--cc); max-width: 100%;
  box-shadow: 0 24px 60px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.12), inset 0 0 30px rgba(0,0,0,.45); }
.bk-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 10px; max-width: 100%; overscroll-behavior-x: contain; }
.bk-track::-webkit-scrollbar { display: none; }
.bk-track.dragging { scroll-snap-type: none; cursor: grabbing; }
.bk-track.dragging * { pointer-events: none; }
.bk-page { flex: none; display: grid; align-content: start; justify-content: center; position: relative; }
.bk-page.snap { scroll-snap-align: start; }
.bk-track.two .bk-page.even { box-shadow: inset -26px 0 26px -22px rgba(0,0,0,.75); }
.bk-track.two .bk-page.odd { box-shadow: inset 26px 0 26px -22px rgba(0,0,0,.75); }
.bk-track.one .bk-page { box-shadow: inset 22px 0 22px -20px rgba(0,0,0,.6); }
.bk-spine { position: absolute; top: 14px; bottom: 14px; left: 50%; width: 22px; transform: translateX(-50%); pointer-events: none;
  background: repeating-linear-gradient(180deg, transparent 0 22px, rgba(200,205,220,.9) 22px 30px, transparent 30px 60px); -webkit-mask: linear-gradient(90deg, transparent 6px, #000 6px 16px, transparent 16px); mask: linear-gradient(90deg, transparent 6px, #000 6px 16px, transparent 16px); filter: drop-shadow(0 2px 2px rgba(0,0,0,.6)); }
@supports (animation-timeline: view()) {
  .bk-track.two .bk-page { animation: bk-page linear both; animation-timeline: view(inline); animation-range: cover; }
  @keyframes bk-page { 0% { opacity: .3; } 33% { opacity: 1; } 67% { opacity: 1; } 100% { opacity: .3; } } /* opacity only: a transform would move the snap target */
}
/* page themes */
.pg-midnight { background: linear-gradient(180deg, #181c2e, #0f111c); }
.pg-felt { background: radial-gradient(rgba(255,255,255,.04) 1px, transparent 1.4px) 0 0 / 5px 5px, radial-gradient(circle at 50% 30%, #1f6b40, #0d3a22); }
.pg-velvet { background: radial-gradient(rgba(255,255,255,.03) 1px, transparent 1.4px) 0 0 / 4px 4px, radial-gradient(circle at 50% 30%, #6b1428, #2a0610); }
.pg-carbon { background: repeating-linear-gradient(45deg, rgba(255,255,255,.035) 0 3px, transparent 3px 6px), repeating-linear-gradient(-45deg, rgba(0,0,0,.25) 0 3px, transparent 3px 6px), #15171d; }
.pg-paper { background: radial-gradient(rgba(120,90,40,.06) 1px, transparent 1.4px) 0 0 / 4px 4px, linear-gradient(180deg, #f1e9d8, #e3d7bf); }
.pg-holo { background: linear-gradient(135deg, rgba(255,77,109,.12), rgba(77,216,255,.12), rgba(142,107,255,.14)), #121426; }
/* pockets / sleeves */
.bk-pocket { aspect-ratio: 25 / 35; position: relative; display: flex; align-items: center; justify-content: center; border-radius: 8px; cursor: pointer; }
.bk-pocket .pcard, .bk-pocket .slab { transition: transform .2s; }
.bk-pocket:hover .pcard, .bk-pocket:hover .slab { transform: translateY(-3px); }
.ps-sleeve { background: rgba(255,255,255,.035); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.ps-sleeve::after { content: ''; position: absolute; inset: 0; border-radius: 8px; pointer-events: none; background: linear-gradient(125deg, rgba(255,255,255,.13), transparent 30%, transparent 72%, rgba(255,255,255,.06)); z-index: 2; }
.ps-toploader { background: rgba(255,255,255,.07); border: 2px solid rgba(255,255,255,.32); border-radius: 6px; box-shadow: 0 4px 10px rgba(0,0,0,.35); }
.ps-toploader::before { content: ''; position: absolute; left: 22%; right: 22%; top: -2px; height: 5%; border-radius: 0 0 6px 6px; background: rgba(0,0,0,.35); z-index: 3; }
.ps-toploader::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(120deg, rgba(255,255,255,.22), transparent 28%, transparent 75%, rgba(255,255,255,.08)); z-index: 2; }
.ps-magnetic { background: radial-gradient(circle at 50% 40%, #1b1b1f, #050506); border-radius: 14px; box-shadow: 0 0 0 3px #2a2a30, 0 0 0 4px #444, 0 6px 14px rgba(0,0,0,.5); }
.ps-magnetic::after { content: ''; position: absolute; inset: 0; border-radius: 14px; pointer-events: none; background: linear-gradient(140deg, rgba(255,255,255,.25), transparent 30%, transparent 70%, rgba(255,255,255,.08)); z-index: 2; }
.ps-bare { background: transparent; }
.pg-paper .ps-sleeve { background: rgba(0,0,0,.04); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.bk-empty { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--dim); text-align: center; }
.bk-empty b { font-family: 'Barlow Condensed', sans-serif; font-size: 24px; color: rgba(255,255,255,.16); }
.pg-paper .bk-empty b { color: rgba(0,0,0,.18); }
.bk-pocket.drop { outline: 2px dashed rgba(246,196,83,.35); outline-offset: -6px; }
.bk-pocket.over { outline: 2px solid var(--gold); outline-offset: -4px; background: rgba(246,196,83,.12); }
.bk-cnt { position: absolute; top: -7px; right: -7px; z-index: 4; background: var(--gold); color: #2a1a00; font-weight: 800; font-size: 11px; border-radius: 999px; padding: 2px 7px; }
.bk-x { position: absolute; top: -8px; left: -8px; z-index: 4; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--bad); color: #fff; font-size: 12px; font-weight: 800; opacity: 0; transition: opacity .15s; }
.bk-pocket:hover .bk-x { opacity: 1; }
.bk-nav { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 14px; color: var(--muted); font-size: 14px; }
.bk-nav .btn { min-width: 44px; font-size: 18px; padding: 4px 12px; }
/* side panel */
.bk-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 14px; position: sticky; top: 84px; max-height: calc(100vh - 110px); overflow: auto; }
.bk-panel:empty { display: none; }
.bk-ptabs { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.bk-ptabs b { font-family: 'Barlow Condensed', sans-serif; font-size: 22px; text-transform: uppercase; }
.bk-f { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 600; }
.bk-f input:not([type=color]), .bk-f select { width: 100%; }
.bk-seg { display: flex; flex-wrap: wrap; gap: 4px; }
.bk-seg button { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line2); background: none; font-size: 12px; font-weight: 700; color: var(--muted); }
.bk-seg button.on { background: rgba(246,196,83,.16); border-color: var(--gold); color: var(--gold); }
.bk-swatches { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.bk-swatches .sw { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255,255,255,.15); }
.bk-swatches .sw.on { border-color: #fff; box-shadow: 0 0 0 2px var(--gold); }
.bk-swatches input[type=color] { width: 34px; height: 30px; padding: 2px; }
.bk-tray { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 8px; max-height: 52vh; overflow: auto; padding: 2px; }
.bk-tc { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; color: var(--muted); cursor: grab; border-radius: 8px; padding: 3px; }
.bk-tcv { width: 70px; aspect-ratio: 25/35; }
.bk-tc.picked { background: rgba(246,196,83,.18); box-shadow: 0 0 0 2px var(--gold); }
.bk-pagebtns { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 1000px) { .bk-main.with-panel { grid-template-columns: 1fr; } .bk-panel { position: static; max-height: none; } }
@media (max-width: 760px) { .top .me { flex-wrap: wrap; justify-content: flex-end; gap: 6px; } .top .me .freepk { width: 100%; text-align: right; } }

.bk-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; }
.bk-ic { height: 40px; border-radius: 9px; border: 1px solid var(--line2); background: var(--bg2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.bk-ic small { font-size: 9px; color: var(--muted); }
.bk-ic.on { border-color: var(--gold); background: rgba(246,196,83,.14); }
.bk-ic .bk-icon path { fill: #e8ecf8; }

/* ================= opening v2 ================= */
#overlay.ov-in { animation: ovin .28s ease-out both; }
#overlay.ov-out { animation: ovout .22s ease-in both; }
@keyframes ovin { from { opacity: 0; } }
@keyframes ovout { to { opacity: 0; } }
.ov-bar { position: absolute; top: 14px; left: 16px; right: 16px; display: flex; justify-content: space-between; align-items: center; z-index: 30; pointer-events: none; }
.ov-bar > * { pointer-events: auto; }
.ov-count { color: var(--muted); font-weight: 700; letter-spacing: .18em; font-size: 12px; text-transform: uppercase; }
.pk-holder { position: relative; aspect-ratio: 5 / 8.4; }
.pk-holder.pk-enter { animation: pkenter .8s cubic-bezier(.2,1.25,.35,1) both; }
@keyframes pkenter { from { transform: translateY(65vh) rotate(-12deg) scale(.55); opacity: 0; } 60% { opacity: 1; } }
.pk-bob { position: absolute; inset: 0; animation: pkbob 3.2s ease-in-out infinite; }
.pk-bob.still { animation: none; }
@keyframes pkbob { 50% { transform: translateY(-9px) rotate(.6deg); } }
.shred { position: fixed; width: 7px; height: 4px; background: #e9ecf5; border-radius: 1px; pointer-events: none; z-index: 40; animation: shred 1s cubic-bezier(.2,.6,.4,1) forwards; }
@keyframes shred { to { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; } }
.stack { touch-action: none; cursor: grab; }
.stack:active { cursor: grabbing; }
.stack .pcard { pointer-events: none; }
.rv-info.fade { animation: fadein .35s both; }
.rv-val { display: flex; gap: 12px; justify-content: center; align-items: center; margin-top: 8px; font-size: 12px; color: var(--muted); }
#overlay > .god-banner { position: absolute; top: 52px; left: 0; right: 0; text-align: center; z-index: 5; animation: fadein .5s both; }
.coins.sm { padding: 2px 8px; font-size: 12px; gap: 4px; }
.coins.sm i { width: 11px; height: 11px; }
.sum-tags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; max-width: 200px; }
.sum-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.summary .cell { cursor: pointer; }

/* ten packs */
.mp-grid { display: grid; gap: 18px 16px; justify-content: center; touch-action: none; user-select: none; }
.mp-cell { position: relative; aspect-ratio: 5 / 8.4; animation: mpin .7s cubic-bezier(.2,1.2,.35,1) both; cursor: pointer; }
@keyframes mpin { from { transform: translateY(70vh) rotate(-14deg) scale(.5); opacity: 0; } 60% { opacity: 1; } }
.mp-cell.torn .pk-bob { animation: none; }
.mp-cell::before { content: ''; position: absolute; inset: 13.5% 2% 2%; border-radius: 8px; z-index: -1; opacity: 0; transition: opacity .4s; box-shadow: 0 0 26px 4px var(--cc), 0 0 70px 12px color-mix(in srgb, var(--cc) 50%, transparent); }
.mp-cell.glow::before { opacity: 1; animation: aurapulse .5s ease-in-out infinite alternate; }
.mp-cell.glow.lv0::before { box-shadow: 0 0 14px 1px var(--cc); opacity: .6; }
.mp-cell::after { content: ''; position: absolute; left: 50%; top: 13%; width: 70%; height: 30%; transform: translate(-50%, -50%) scale(.2); z-index: 2; pointer-events: none; opacity: 0; mix-blend-mode: screen;
  background: radial-gradient(ellipse at center, #fff, var(--cc) 25%, transparent 65%); transition: opacity .4s, transform .5s; }
.mp-cell.glow::after { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.mp-cell.glow.lv0::after { opacity: .45; transform: translate(-50%, -50%) scale(.6); }
.mp-cell.glow.lv3 .pk-bob, .mp-cell.glow.lv4 .pk-bob { animation: rumble .09s linear infinite; --amp: 2px; }
.mp-cell.glow.lv4::after { background: conic-gradient(#ff4d6d, #ffcf4d, #5dff8a, #4dd8ff, #8e6bff, #ff4dd8, #ff4d6d); -webkit-mask: radial-gradient(ellipse at center, #000, transparent 65%); mask: radial-gradient(ellipse at center, #000, transparent 65%); animation: huespin .8s linear infinite; }
.mp-cell.burst { animation: mpburst .45s cubic-bezier(.3,0,.6,1) forwards; }
@keyframes mpburst { 40% { transform: scale(1.12); filter: brightness(2.2); } 100% { transform: scale(.3); opacity: 0; filter: brightness(3); } }
.mp-boardwrap { width: min(1400px, 96vw); max-height: 100vh; overflow: auto; padding: 56px 10px 24px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.mp-head { display: flex; align-items: center; gap: 12px; width: 100%; flex-wrap: wrap; }
.mp-title { font-family: 'Barlow Condensed', sans-serif; font-size: 24px; text-transform: uppercase; letter-spacing: .03em; }
.mp-board { display: grid; gap: 10px; justify-content: center; }
.mp-c { position: relative; aspect-ratio: 25 / 35; cursor: pointer; }
.mp-c.special { animation: specialbob 1.6s ease-in-out infinite; }
@keyframes specialbob { 50% { transform: translateY(-4px); } }
.mp-new { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); z-index: 3; background: var(--good); color: #032; font-size: 9px; font-weight: 800; padding: 1px 6px; border-radius: 999px; animation: fadein .3s both; }
.mp-focus { position: absolute; inset: 0; z-index: 20; background: rgba(3,4,10,.78); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; animation: ovin .25s both; cursor: pointer; }
.mp-focus.leaving { background: transparent; transition: background .3s; }
.mp-fhint { font-size: 12px; letter-spacing: .1em; animation: hint 1.6s ease-in-out infinite; }
.summary.multi .grid { align-items: flex-end; }
.mp-stats { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 16px 0 10px; }
.mp-stats .stat { min-width: 120px; padding: 10px 14px; }
.mp-stats .stat b { font-size: 26px; }
.mp-rarities { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.mp-sub { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 18px; }
.mp-coll { display: block; margin-top: 14px; font-size: 13px; text-decoration: underline; }

/* hover info card */
#tip { position: fixed; z-index: 95; width: 240px; padding: 12px 14px; border-radius: 14px; pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s;
  background: rgba(14,16,28,.97); border: 1px solid var(--line2); box-shadow: 0 16px 40px rgba(0,0,0,.6); font-size: 12px; }
#tip.on { opacity: 1; transform: none; }
.tip-name { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 20px; text-transform: uppercase; line-height: 1; }
.tip-sub { color: var(--muted); margin: 3px 0 8px; }
.tip-val { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.tip-val .coins { font-size: 15px; }
.tip-grid { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; }
.tip-grid span { color: var(--muted); }
.tip-grid b { text-align: right; font-weight: 600; }

/* richer captions under cards */
.cap2 { width: 100%; max-width: 176px; display: flex; flex-direction: column; gap: 4px; }
.cap2 > div { display: flex; justify-content: space-between; align-items: center; gap: 4px; }
.cap2 .mono { color: var(--muted); font-size: 11px; }

/* copies view */
.mbox.copies { max-width: 1120px; padding: 0; overflow: auto; }
.cp-head { display: flex; gap: 28px; padding: 28px 30px; align-items: center; flex-wrap: wrap;
  background: radial-gradient(600px 260px at 15% 50%, color-mix(in srgb, var(--rc) 28%, transparent), transparent 70%), linear-gradient(180deg, rgba(255,255,255,.03), transparent); border-bottom: 1px solid var(--line); }
.cp-info { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.cp-info h2 { font-family: 'Barlow Condensed', sans-serif; font-size: 44px; text-transform: uppercase; line-height: .95; }
.cp-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; width: 100%; margin-top: 10px; }
.cp-stats > div { background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.cp-stats span { display: block; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.cp-stats b { font-size: 20px; font-family: 'Barlow Condensed', sans-serif; }
.cp-fins { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; margin-top: 4px; }
.cp-bar { display: flex; gap: 10px; align-items: center; padding: 14px 30px 0; font-size: 13px; }
.cp-seg { display: flex; gap: 4px; }
.cp-seg button { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line2); background: none; font-size: 12px; font-weight: 700; color: var(--muted); }
.cp-seg button.on { background: rgba(246,196,83,.16); border-color: var(--gold); color: var(--gold); }
.cp-grid { padding: 18px 30px 30px; }
.cp-badges { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; max-width: 176px; }
.cp-badges .pill { color: var(--gold); border-color: rgba(246,196,83,.4); font-size: 10px; }
@media (max-width: 700px) { .cp-stats { grid-template-columns: repeat(2, 1fr); } .cp-head, .cp-grid, .cp-bar { padding-left: 16px; padding-right: 16px; } }

/* the hidden attribute must win over component display rules (.btn is inline-flex) */
[hidden] { display: none !important; }

/* ===== 3D pouch ===== */
.pack { --pd: calc(var(--pw) * .07); }
/* side walls between the crimped seals; they swing into view as the pack turns */
.pack-side { position: absolute; top: 8.5%; bottom: 8.5%; width: var(--pd); border-radius: 40%;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c1) 55%, #000), color-mix(in srgb, var(--c2) 45%, #000) 60%, color-mix(in srgb, var(--c3, #000) 70%, #000)); }
.pack-side::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, rgba(255,255,255,.25), transparent 40%, rgba(0,0,0,.4)); }
.pack-side.l { left: 0; transform-origin: left center; transform: rotateY(90deg); }
.pack-side.r { right: 0; transform-origin: right center; transform: rotateY(-90deg); }
/* the face bulges: dark rolled edges, lit centre, shaded seals */
.pack-shade { position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.18) 5%, rgba(0,0,0,0) 16%, rgba(255,255,255,.07) 46%, rgba(255,255,255,.07) 54%, rgba(0,0,0,0) 84%, rgba(0,0,0,.18) 95%, rgba(0,0,0,.55) 100%),
    linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(255,255,255,.12) 9.2%, rgba(0,0,0,.3) 10.5%, transparent 18%, transparent 82%, rgba(0,0,0,.3) 89.5%, rgba(255,255,255,.1) 90.8%, rgba(0,0,0,.3) 100%); }
.pack-crinkle { position: absolute; inset: 0; pointer-events: none; background: var(--tex-crinkle) no-repeat center / 100% 100%; mix-blend-mode: overlay; opacity: .75; }
/* specular streak + broad sheen that follow the light */
.pack-spec { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: overlay;
  background:
    linear-gradient(100deg, transparent calc(var(--mx, 50%) - 16%), rgba(255,255,255,.55) var(--mx, 50%), transparent calc(var(--mx, 50%) + 16%)),
    radial-gradient(ellipse 55% 75% at var(--mx, 50%) var(--my, 40%), rgba(255,255,255,.28), transparent 70%); }
/* parallax: art sits deeper than the name, so they slide apart as it turns */
.pack-art { transform: translate(calc(var(--tx, 0) * var(--pw) * -.018), calc(var(--ty, 0) * var(--pw) * -.018)); }
.pack-name, .pack-setlogo { translate: calc(var(--tx, 0) * var(--pw) * .025) calc(var(--ty, 0) * var(--pw) * .025); }
.pack-art { box-shadow: 0 0 0 2px rgba(255,255,255,.35), 0 10px 30px rgba(0,0,0,.5), inset 0 0 18px rgba(0,0,0,.45); }
.pack-name { text-shadow: 0 2px 0 rgba(0,0,0,.35), 0 6px 16px rgba(0,0,0,.6); }
/* contact shadow that slides opposite the tilt */
.pack-shadow { position: absolute; left: 12%; right: 12%; bottom: -7%; height: 9%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(0,0,0,.6), transparent 70%); filter: blur(4px);
  transform: translateX(calc(var(--tx, 0) * -10%)) scaleX(calc(1 - var(--hyp, 0) * .15)); }
.pack.float .pack-shadow { animation: shadowbob 4s ease-in-out infinite; }
@keyframes shadowbob { 50% { opacity: .55; transform: scaleX(.85); } }
.pk-bob .pack-shadow, .mp-cell .pack-shadow { display: none; }
/* the half of the pouch turning away from the viewer falls into shadow */
.pack-wrap::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 5;
  background: linear-gradient(90deg, rgba(0,0,0,calc(max(0, var(--tx, 0) * -1) * .5)) 0%, transparent 45%, transparent 55%, rgba(0,0,0,calc(max(0, var(--tx, 0)) * .5)) 100%),
    linear-gradient(180deg, rgba(0,0,0,calc(max(0, var(--ty, 0) * -1) * .35)) 0%, transparent 40%, transparent 60%, rgba(0,0,0,calc(max(0, var(--ty, 0)) * .35)) 100%); }

/* ===== torn pack halves =====
   The two halves are trimmed on the pack face itself (inside the 3D transform)
   so they turn with the pack instead of being sliced by a flat box. Both use
   the same jagged tear line (set per opening in open.js) so they fit exactly. */
.piece-top .pack-wrap { clip-path: var(--tear-top, inset(0 0 86.5% 0)); }
.piece-body .pack-wrap { clip-path: var(--tear-body, inset(13.5% 0 0 0)); }
.piece-top .pack-side, .piece-top .pack-shadow, .piece-body .pack-shadow { display: none; }
.piece-body .pack-side { top: 14%; }
/* inside of the pouch showing through the opening once torn */
.piece-body .pack-wrap::before { content: ''; position: absolute; left: 0; right: 0; top: 12.5%; height: 9%; z-index: 4; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(ellipse 60% 100% at 50% 0%, rgba(0,0,0,.85), rgba(0,0,0,.35) 45%, transparent 75%), linear-gradient(180deg, rgba(255,255,255,.25), transparent 18%); }
.opened .piece-body .pack-wrap::before, .mp-cell.torn .piece-body .pack-wrap::before { opacity: 1; }

/* side walls are made of the same foil as the front, just turned away from the light */
.pack-side { border-radius: 45% / 6%; width: calc(var(--pw) * .045);
  background: linear-gradient(var(--pang, 160deg), var(--c1), var(--c2) 60%, var(--c3, #05060f)); }
.pack-side::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: var(--tex-crinkle) center / 900% 100%; mix-blend-mode: overlay; opacity: .7; }
.pack-side::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, rgba(255,255,255,.22), rgba(0,0,0,.15) 45%, rgba(0,0,0,.45)); }
.pack-inner > .charge-aura { transform: translateZ(-2px); }
.pack-inner > .charge-slit { transform: translateZ(2px); top: 12.8%; }
/* side walls taper to nothing at the sealed ends: a pouch is only thick in the middle */
.pack-side { top: 9%; bottom: 9%; border-radius: 0; }
.pack-side.l, .pack-side.l::before, .pack-side.l::after { clip-path: ellipse(100% 50% at 0% 50%); }
.pack-side.r, .pack-side.r::before, .pack-side.r::after { clip-path: ellipse(100% 50% at 100% 50%); }
.piece-body .pack-side { top: 13.5%; }

/* Charge glow = a solid blurred light just inside the pack outline, not a hollow
   outline: gaps in the silhouette (crimp teeth, torn edge) now show light, never a dark hole. */
.charge-aura { inset: 15% 7% 9% 7%; border-radius: 14px; background: var(--cc); box-shadow: 0 0 calc(var(--pw, 280px) * .14) calc(var(--pw, 280px) * .06) var(--cc);
  filter: blur(calc(var(--pw, 280px) * .05)); animation: aura var(--dur) ease-in forwards, auraglow .55s ease-in-out infinite alternate; }
@keyframes auraglow { to { filter: blur(calc(var(--pw, 280px) * .05)) brightness(1.35); } }
.lv0 .charge-aura { box-shadow: 0 0 calc(var(--pw, 280px) * .08) 0 var(--cc); }
.mp-cell::before { inset: 16% 8% 10% 8%; border-radius: 12px; background: var(--cc); filter: blur(calc(var(--pw, 150px) * .06));
  box-shadow: 0 0 calc(var(--pw, 150px) * .16) calc(var(--pw, 150px) * .05) var(--cc); }
.mp-cell.glow::before { animation: auraglow2 .55s ease-in-out infinite alternate; }
@keyframes auraglow2 { to { filter: blur(calc(var(--pw, 150px) * .06)) brightness(1.35); } }
.mp-cell.glow.lv0::before { box-shadow: 0 0 calc(var(--pw, 150px) * .08) 0 var(--cc); opacity: .55; }

/* ===== 10 packs: stacked deck (TCGP style) ===== */
.ms-stack { position: relative; aspect-ratio: 5 / 8.4; }
.ms-pack { position: absolute; inset: 0; transform-origin: 50% 100%;
  transform: translate(calc(var(--dir) * 2px), calc(var(--i) * -14px)) scale(calc(1 - var(--i) * .018)) rotate(calc(var(--dir) * .6deg));
  animation: msin .55s cubic-bezier(.2,1.15,.35,1) both; }
@keyframes msin { from { transform: translateY(65vh) rotate(calc(var(--dir) * 14deg)) scale(.6); opacity: 0; } }
.ms-pack:not(.ms-front) .pack-wrap { filter: brightness(calc(1 - var(--i) * .055)); }
.ms-pack:not(.ms-front) .pack-shadow { display: none; }
.ms-front { aspect-ratio: auto; }
.ms-glow .ms-pack:not(.ms-front)::before { content: ''; position: absolute; inset: 16% 8% 10% 8%; border-radius: 12px; z-index: -1; background: var(--cc); filter: blur(14px); opacity: .55; }
.ms-burst { animation: msburst .38s cubic-bezier(.3,0,.6,1) forwards !important; }
@keyframes msburst { 35% { filter: brightness(2); } 100% { transform: translateY(-20px) scale(1.15); opacity: 0; filter: brightness(3); } }
.mp-board { position: relative; }
.mp-sweep { position: absolute; top: -20px; bottom: -20px; left: 0; width: 26%; z-index: 4; pointer-events: none; transform: translateX(-120%) skewX(-14deg); opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.06) 30%, rgba(255,255,255,.28) 50%, rgba(255,255,255,.06) 70%, transparent); mix-blend-mode: screen; }
@keyframes mpsweep { 0% { transform: translateX(-120%) skewX(-14deg); opacity: 1; } 90% { opacity: 1; } 100% { transform: translateX(420%) skewX(-14deg); opacity: 0; } }
.mp-boardwrap { overflow-x: hidden; }

/* FX lab */
.fxlab { display: flex; flex-direction: column; gap: 28px; }
.fxrow h3 { font-family: 'Barlow Condensed', sans-serif; font-size: 22px; text-transform: uppercase; margin-bottom: 10px; }
.fxcells { display: flex; gap: 18px; flex-wrap: wrap; }
.fxcell { width: 210px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.fxcell b { font-size: 14px; margin-top: 6px; }

/* ===== reduced motion (OS setting or the in-game toggle) ===== */
html.reduce-motion .pcard.idle, html.reduce-motion .pack.float, html.reduce-motion .pk-bob, html.reduce-motion .mp-c.special,
html.reduce-motion .rays, html.reduce-motion .m-holo, html.reduce-motion .charging, html.reduce-motion .pack.float .pack-shadow,
html.reduce-motion .back-only .pc-back, html.reduce-motion .pcard.hype.flipped .pc-back, html.reduce-motion .ov-hint { animation: none !important; }
html.reduce-motion .cbeam, html.reduce-motion .cpart, html.reduce-motion .shred, html.reduce-motion .mp-sweep { display: none !important; }
html.reduce-motion .pc-tilt, html.reduce-motion .pack-inner { transform: none !important; }
html.reduce-motion #overlay.shake { animation: none !important; }

/* ===== settings menu ===== */
.setpop { position: fixed; z-index: 70; width: 280px; padding: 16px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line2); box-shadow: 0 20px 50px rgba(0,0,0,.6); display: flex; flex-direction: column; gap: 14px; }
.setpop h4 { margin: 0; font-family: 'Barlow Condensed', sans-serif; font-size: 20px; text-transform: uppercase; }
.setpop label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 600; }
.setpop .row2 { flex-direction: row; justify-content: space-between; align-items: center; color: var(--text); font-size: 13px; }
.setpop input[type=range] { width: 100%; padding: 0; }
.setpop .seg3 { display: flex; gap: 4px; }
.setpop .seg3 button { flex: 1; padding: 6px; border-radius: 8px; border: 1px solid var(--line2); background: none; font-size: 12px; font-weight: 700; color: var(--muted); }
.setpop .seg3 button.on { background: rgba(246,196,83,.16); border-color: var(--gold); color: var(--gold); }

/* ===== side column on the packs page ===== */
.side { display: flex; flex-direction: column; gap: 16px; align-self: start; position: sticky; top: 84px; }
.side .feed { position: static; }
.daily { padding: 16px 18px; }
.daily h3 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; display: flex; justify-content: space-between; gap: 8px; }
.daily h3 .muted { font-size: 10px; }
.streak { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 12px; background: linear-gradient(90deg, rgba(249,115,22,.16), rgba(246,196,83,.08)); border: 1px solid rgba(249,115,22,.3); margin-bottom: 10px; }
.streak b { display: block; font-size: 16px; }
.streak span { font-size: 11px; }
.mission { padding: 8px 0; border-top: 1px solid var(--line); }
.mtop { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }
.mtop .muted { font-size: 11px; }
.mission .bar { margin-top: 6px; }
@media (max-width: 1000px) { .side { position: static; } }

/* ===== notifications ===== */
.bell { position: relative; }
.bell .nbadge { position: absolute; top: -4px; right: -4px; margin: 0; }
.notepop { width: 340px; max-height: 70vh; overflow: auto; }
.notes { display: flex; flex-direction: column; gap: 4px; }
.note { display: flex; gap: 10px; padding: 8px; border-radius: 10px; font-size: 13px; line-height: 1.35; }
.note:hover { background: rgba(255,255,255,.04); }
.note.unread { background: rgba(246,196,83,.08); }
.note .ni { width: 22px; text-align: center; flex: none; }
.note small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }

/* ===== bulk select ===== */
.cgrid.selecting .ctile { position: relative; }
.cgrid.selecting .ctile .cv::after { content: ''; position: absolute; top: 6px; left: 6px; width: 22px; height: 22px; border-radius: 6px; z-index: 20; border: 2px solid rgba(255,255,255,.8); background: rgba(0,0,0,.45); }
.cgrid.selecting .ctile .cv { position: relative; }
.cgrid.selecting .ctile.picked .cv::after { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 0 3px rgba(246,196,83,.35); }
.cgrid.selecting .ctile.picked .cv::before { content: '✓'; position: absolute; top: 6px; left: 6px; width: 22px; height: 22px; z-index: 21; display: flex; align-items: center; justify-content: center; color: #2a1a00; font-weight: 900; font-size: 14px; }
.cgrid.selecting .ctile.picked .pcard, .cgrid.selecting .ctile.picked .slab { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 12px; }
#bulkbar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 40; width: min(980px, 94vw); display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 12px 16px; border-radius: 16px; background: rgba(18,21,36,.97); border: 1px solid var(--line2); box-shadow: 0 18px 50px rgba(0,0,0,.6); animation: fadein .25s both; }
.chips { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.preview { margin: 6px 0 12px; font-size: 14px; }

/* ===== missing card / wishlist ===== */
.miss { display: flex; gap: 28px; padding: 28px; flex-wrap: wrap; }
.miss-art { flex: none; }
.miss-info { flex: 1; min-width: 260px; }
.missing-card { filter: grayscale(.85) brightness(.75); }
.miss-list { display: flex; flex-direction: column; gap: 4px; }

/* ===== price history ===== */
.hist { background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.spark { width: 100%; height: 64px; display: block; }
.spark-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11px; color: var(--muted); margin-top: 6px; }
.spark-stats b { color: var(--text); }

/* ===== buy orders ===== */
.orders { margin-bottom: 20px; }
.olist { display: flex; flex-direction: column; gap: 2px; }
.orow .th { flex: none; }

/* ===== profile badges ===== */
.badges { display: flex; gap: 8px; flex-wrap: wrap; margin: -6px 0 18px; }
.badge-set { padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; color: #2a1a00; background: linear-gradient(90deg, #ffe48a, #e0a526); box-shadow: 0 4px 14px rgba(246,196,83,.35); }

/* ===== first-time tour ===== */
.tour-dim { position: fixed; inset: 0; z-index: 80; pointer-events: none;
  background: radial-gradient(ellipse calc(var(--w, 0px) * .75) calc(var(--h, 0px) * .75) at calc(var(--x, 0px) + var(--w, 0px) / 2) calc(var(--y, 0px) + var(--h, 0px) / 2), transparent 95%, rgba(3,4,10,.72) 100%); transition: background .3s; }
.tour-tip { position: fixed; z-index: 81; width: 300px; padding: 14px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--gold); box-shadow: 0 16px 40px rgba(0,0,0,.6); display: flex; flex-direction: column; gap: 6px; animation: fadein .25s both; }
.tour-tip b { font-family: 'Barlow Condensed', sans-serif; font-size: 20px; text-transform: uppercase; }
.tour-tip p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.tour-tip div { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

/* ===== opening lab ===== */
.ol-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin-top: 18px; }
.ol-card { position: relative; background: linear-gradient(180deg, var(--panel), var(--bg2)); border: 1px solid var(--line2); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.ol-card h3 { font-family: 'Barlow Condensed', sans-serif; font-size: 30px; text-transform: uppercase; }
.ol-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; flex: 1; }
.ol-num { position: absolute; top: 16px; right: 18px; font-family: 'Barlow Condensed', sans-serif; font-size: 40px; font-weight: 800; color: rgba(255,255,255,.08); }
.ol-stage { position: fixed; inset: 0; z-index: 100; overflow: hidden; background: radial-gradient(circle at 50% 42%, #1c2245 0%, #0a0c1c 55%, #030409 100%); animation: ovin .3s both; touch-action: none; user-select: none; }
.ol-stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.6)); }
.ol-cam { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; transform-origin: 50% 46%; }
.ol-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 6; }
.ol-top { position: absolute; top: 14px; left: 16px; right: 16px; display: flex; justify-content: space-between; align-items: center; z-index: 10; color: var(--muted); font-weight: 800; letter-spacing: .2em; text-transform: uppercase; font-size: 12px; }
.ol-hint { position: absolute; bottom: 8%; left: 0; right: 0; text-align: center; color: var(--muted); font-weight: 600; letter-spacing: .06em; opacity: 0; transition: opacity .3s; z-index: 10; pointer-events: none; }
.ol-hint.on { opacity: 1; animation: hint 1.8s ease-in-out infinite; }
.ol-done { position: absolute; bottom: 6%; left: 0; right: 0; display: flex; gap: 10px; justify-content: center; z-index: 10; animation: fadein .4s both; }
.ol-pack { position: relative; aspect-ratio: 5 / 8.4; cursor: pointer; }
.ol-pack.ol-in { animation: pkenter .8s cubic-bezier(.2,1.25,.35,1) both; }
.ol-pack.ol-float > .pack { animation: pkbob 3s ease-in-out infinite; }
.ol-crack { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; mix-blend-mode: screen; }
.ol-shard { position: absolute; aspect-ratio: 5 / 8.4; pointer-events: none; z-index: 4; will-change: transform; }
.ol-row { position: absolute; left: 50%; top: 46%; z-index: 3; }
.ol-slot { position: absolute; left: 0; top: 0; transform: translate(var(--x), var(--y)) rotate(var(--r)); transition: transform .45s cubic-bezier(.2,1.2,.3,1); cursor: pointer; }
.ol-slot.ol-lift { transform: translate(var(--x), calc(var(--y) - 28px)) rotate(0deg) scale(1.1); z-index: 50 !important; }
.ol-slot.ol-zoom { transform: translate(0, -10px) scale(1.7); z-index: 60 !important; }
.ol-peel { perspective: 900px; }
.ol-peel .ol-body, .ol-peel .ol-flap { position: absolute; inset: 0; }
.ol-peel .ol-body { clip-path: inset(22% 0 0 0); }
.ol-peel .ol-flap { clip-path: inset(0 0 78% 0); transform-origin: 50% 22%; transform-style: preserve-3d; z-index: 3; }
.ol-peel .ol-glow { position: absolute; left: 4%; right: 4%; top: 15%; height: 16%; z-index: 2; opacity: 0; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(ellipse at 50% 50%, #fff, rgba(255,230,160,.8) 25%, rgba(246,196,83,.25) 55%, transparent 75%); filter: blur(4px); }
html.reduce-motion .ol-pack.ol-float > .pack { animation: none; }

/* opening lab layering: background glow < shards < cards < blade < UI */
.ol-stage::after { z-index: 1; }
.ol-fx.back { z-index: 1; }
.ol-shard { z-index: 2; }
.ol-cam { z-index: 3; }
.ol-fx.front { z-index: 8; }

/* ===== slash opening ===== */
.slash-half { position: absolute; pointer-events: none; will-change: transform; }
.frozen .pack-inner { transform: none !important; }
#overlay > .ol-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#overlay > .ol-fx.back { z-index: 0; }
#overlay > .ol-fx.front { z-index: 25; }
#overlay > .reveal, #overlay > .mp-boardwrap, #overlay > .summary { position: relative; z-index: 30; }

.ov-bar { gap: 8px; }
.ov-bar .ov-skip { margin-left: auto; }

/* ===== collection: grouped by set, one tile per card ===== */
.coll { display: flex; flex-direction: column; gap: 34px; }
.cset-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.cset-logo { height: 34px; max-width: 120px; object-fit: contain; }
.cset-dot { width: 14px; height: 14px; border-radius: 4px; transform: rotate(45deg); box-shadow: 0 0 10px currentColor; }
.cset-t h3 { font-family: 'Barlow Condensed', sans-serif; font-size: 26px; text-transform: uppercase; letter-spacing: .03em; line-height: 1; }
.cset-t .muted { font-size: 12.5px; }
/* small progress bar right under the "N / M collected" line */
.cset-bar { width: 180px; max-width: 100%; height: 4px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 6px; }
.cset-bar.done i { background: linear-gradient(90deg, var(--good), #a7f3d0); }
.cset-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold), #ffe39a); }
.gtile { position: relative; }
.gtile .cv { position: relative; }
/* a hint of more copies behind the top one */
.gtile.stacked .cv::before, .gtile.stacked .cv::after { content: ''; position: absolute; inset: 0; border-radius: calc(var(--tw, 176px) * .046); background: linear-gradient(160deg, color-mix(in srgb, var(--rc) 55%, #1a1d2c), #10121c); border: 1px solid rgba(255,255,255,.12); z-index: -1; }
.gtile.stacked .cv::before { transform: translate(5px, 5px) rotate(1.6deg); }
.gtile.stacked .cv::after { transform: translate(9px, 9px) rotate(3deg); opacity: .6; z-index: -2; }
.gcount { position: absolute; top: -8px; right: -6px; z-index: 3; min-width: 30px; padding: 3px 8px; border-radius: 999px; background: var(--gold); color: #241600; font-weight: 800; font-size: 13px; text-align: center; box-shadow: 0 4px 12px rgba(0,0,0,.5); }
.gcap { width: 100%; max-width: 176px; display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.gcap b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcap > div { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 12px; }
.gfins { display: inline-flex; gap: 3px; }
.fd { width: 10px; height: 10px; border-radius: 50%; display: inline-block; border: 1px solid rgba(255,255,255,.25); }
.fd-standard { background: #6b7280; } .fd-reverse { background: #7dd3fc; } .fd-holo { background: linear-gradient(135deg, #ff6b8b, #6be0ff); }
.fd-galaxy { background: radial-gradient(circle at 35% 35%, #a5b4fc, #312e81); } .fd-prismatic { background: conic-gradient(#ff4d6d, #ffcf4d, #5dff8a, #4dd8ff, #8e6bff, #ff4d6d); }
.fd-gold { background: linear-gradient(135deg, #ffe48a, #b07d10); } .fd-obsidian { background: #000; border-color: #888; }
.gtile.missing .cv { filter: grayscale(1) brightness(.35); opacity: .7; }
.gtile.missing .gcap b { color: var(--muted); }
label.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; cursor: pointer; }
.cp-fin { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px 3px 3px; border-radius: 999px; border: 1px solid transparent; background: none; font-size: 12px; }
.cp-fin.on { border-color: var(--gold); background: rgba(246,196,83,.1); }
.cp-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 12px 30px 0; padding: 10px 12px; border-radius: 12px; background: rgba(139,92,246,.12); border: 1px solid rgba(139,92,246,.35); }
.cp-grid.selecting .ctile { opacity: .55; } .cp-grid.selecting .ctile.picked { opacity: 1; }
.cp-grid .ctile.picked .cv { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 10px; }
@media (max-width: 700px) { .cp-acts { margin: 12px 16px 0; } }
.pill.var { color: #fff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.4); }
.pill.var-signed { color: #ffe39a; background: linear-gradient(90deg, #2a1d05, #4a3608); border-color: #f5c84c; }
.pill.var-alt { color: #e9d5ff; background: rgba(168,85,247,.18); border-color: #c084fc; }

/* ===== crop dialog (Studio + Create page) ===== */
.crop-wrap { position: fixed; inset: 0; z-index: 120; background: rgba(3,4,8,.86); display: flex; align-items: center; justify-content: center; padding: 20px; }
.crop-box { width: min(900px, 100%); max-height: 100%; display: flex; flex-direction: column; gap: 12px; background: var(--panel); border: 1px solid var(--line2); border-radius: 18px; padding: 16px; }
.crop-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.crop-asp { display: flex; gap: 4px; flex-wrap: wrap; }
.crop-asp button { padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line2); background: none; color: var(--muted); font-size: 12px; font-weight: 700; }
.crop-asp button.on { color: var(--gold); border-color: var(--gold); background: rgba(246,196,83,.12); }
.crop-stage { position: relative; align-self: center; line-height: 0; max-height: 65vh; touch-action: none; user-select: none; }
.crop-stage img { max-width: 100%; max-height: 65vh; display: block; border-radius: 6px; }
.crop-rect { position: absolute; cursor: move; box-shadow: 0 0 0 9999px rgba(0,0,0,.55); outline: 2px solid var(--gold); }
.crop-rect::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent calc(33.3% - 1px), rgba(255,255,255,.3) 0 33.4%, transparent 0 calc(66.6% - 1px), rgba(255,255,255,.3) 0 66.7%, transparent 0),
              linear-gradient(180deg, transparent calc(33.3% - 1px), rgba(255,255,255,.3) 0 33.4%, transparent 0 calc(66.6% - 1px), rgba(255,255,255,.3) 0 66.7%, transparent 0); }
.crop-rect .ch { position: absolute; width: 18px; height: 18px; background: var(--gold); border-radius: 4px; z-index: 1; }
.ch.tl { left: -9px; top: -9px; cursor: nwse-resize; } .ch.tr { right: -9px; top: -9px; cursor: nesw-resize; } .ch.bl { left: -9px; bottom: -9px; cursor: nesw-resize; } .ch.br { right: -9px; bottom: -9px; cursor: nwse-resize; }
.crop-note { font-size: 12.5px; color: var(--muted); }
.crop-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.crop-size { font-size: 12px; color: var(--muted); font-family: 'JetBrains Mono', monospace; }

/* Create page: traits + drag-to-place preview */
.ctraits { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.trait { padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line2); background: none; color: var(--muted); font-size: 12px; font-weight: 700; }
.trait.on { color: var(--gold); border-color: var(--gold); background: rgba(246,196,83,.12); }
.cstage { outline: none; border-radius: 16px; padding: 8px; }
.cstage.pos { touch-action: none; cursor: move; box-shadow: inset 0 0 0 2px rgba(246,196,83,.35); background: rgba(246,196,83,.04); }

/* detail view: the card is clickable to inspect */
.detail .holder { cursor: zoom-in; }
/* ===== full-screen card inspector ===== */
.insp { position: fixed; inset: 0; z-index: 75; background: radial-gradient(circle at 50% 45%, #1a1d33, #05060b 75%); animation: fadein .18s both; touch-action: none; }
.insp.out { opacity: 0; transition: opacity .18s; }
.insp-stage { position: absolute; inset: 0 0 60px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.insp-stage.zoomed { cursor: grab; } .insp-stage.zoomed:active { cursor: grabbing; }
.insp-pan { will-change: transform; }
.insp-top { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); left: 16px; right: 16px; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.insp-top > * { pointer-events: auto; }
.insp-hint { font-size: 12px; color: var(--muted); }
.insp-x { margin-left: auto; width: 40px; height: 40px; padding: 0; border-radius: 50%; font-size: 18px; background: rgba(12,14,24,.8) !important; }
.insp-bar { position: absolute; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: flex; gap: 6px; align-items: center; padding: 6px 8px; border-radius: 14px; background: rgba(12,14,24,.85); border: 1px solid var(--line2); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.insp-bar .btn { min-width: 38px; }
.insp-z { min-width: 50px; text-align: center; font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--muted); }
@media (hover: none) { .insp-hint { display: none; } }
.alcell { display: flex; flex-direction: column; align-items: center; gap: 8px; }

/* ===== "Make it yours" preview page (#/ideas) ===== */
.il { margin-bottom: 46px; }
.il-h { font-family: 'Barlow Condensed', sans-serif; font-size: 28px; text-transform: uppercase; letter-spacing: .03em; }
.il > p { margin: 4px 0 18px; max-width: 760px; }
.il-row { display: flex; flex-wrap: wrap; gap: 26px; align-items: flex-start; }
/* seals */
.sealed { position: relative; }
.seal-on { position: absolute; width: 74px; filter: drop-shadow(0 3px 4px rgba(0,0,0,.55)); }
.seal-on.s1 { right: -14px; bottom: 70px; transform: rotate(-12deg); }
.seal-on.s2 { right: 42px; bottom: 52px; width: 58px; transform: rotate(9deg); }
.seal { display: block; width: 100%; }
.seal-grid { display: grid; grid-template-columns: repeat(3, 150px); gap: 18px; }
.seal-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; font-size: 12.5px; }
.seal-cell .seal { width: 96px; filter: drop-shadow(0 4px 6px rgba(0,0,0,.5)); }
/* legacy */
.legacy { flex: 1; min-width: 300px; max-width: 560px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; }
.leg-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.leg-head b { font-family: 'Barlow Condensed', sans-serif; font-size: 24px; text-transform: uppercase; }
.leg-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.leg-tl { list-style: none; margin: 0; padding: 0 0 0 6px; position: relative; }
.leg-tl::before { content: ''; position: absolute; left: 13px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--gold), var(--violet)); opacity: .5; }
.leg-tl li { display: flex; gap: 14px; align-items: flex-start; padding: 7px 0; position: relative; }
.leg-tl li i { width: 16px; height: 16px; border-radius: 50%; flex: none; margin-top: 2px; background: var(--bg2); border: 3px solid var(--gold); z-index: 1; }
.leg-tl li div { display: flex; flex-direction: column; font-size: 13.5px; }
.leg-tl li span { color: var(--muted); font-size: 12px; }
.leg-tl .t-trade i { border-color: #60a5fa; } .leg-tl .t-grade i { border-color: #22d3ee; } .leg-tl .t-sale i { border-color: #34d399; } .leg-tl .t-now i { border-color: var(--violet); background: var(--violet); }
/* labels */
.lab-cell { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; }
.engrave { flex-basis: 100%; order: 9; margin-top: .3em; padding-top: .3em; border-top: 1px dashed rgba(0,0,0,.18); font-family: 'Mr Dafoe', cursive; font-size: 1.55em; text-align: center; color: #3a3122; text-shadow: 0 1px 0 rgba(255,255,255,.7), 0 -1px 0 rgba(0,0,0,.25); }
.slab-label:has(.engrave) { flex-wrap: wrap; }
.ed-gold .slab-label { background: linear-gradient(115deg, #fff3c4, #e6b84a 35%, #fff0b8 50%, #c8921f 70%, #ffe7a0); border-color: #a87b16; }
.ed-gold .sl-brand, .ed-gold .sl-gname { color: #6a4706; }
.ed-gold .engrave { color: #5a3b05; }
.ed-holo .slab-label { background: linear-gradient(115deg, #ffd6f2, #c5b8ff 25%, #a8f2ff 50%, #fff3b0 75%, #ffd6f2); border-color: #8f7ad8; }
.ed-holo .sl-brand { color: #5b3fc4; }
.ed-event .slab-label { background: linear-gradient(180deg, #1e2a55, #0d1430); color: #f3e3b0; border-color: #d4af5a; }
.ed-event .sl-brand { color: #d4af5a; } .ed-event .sl-line, .ed-event .sl-cert { color: #b9a578; }
.ed-event .slab-label::after { content: 'MYTH LAUNCH 2026'; position: absolute; right: 8%; bottom: -.9em; font-size: .62em; font-weight: 800; letter-spacing: .25em; color: #d4af5a; background: #0d1430; padding: .1em .6em; border: 1px solid #d4af5a; border-radius: 1em; }
.ed-event .slab-label { position: relative; }
.ed-black .engrave { color: #f1d38a; text-shadow: none; border-top-color: rgba(241,211,138,.3); }
/* frames */
.fr-cell { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.fr-cap { display: flex; flex-direction: column; align-items: center; font-size: 13px; }
.frame { position: relative; padding: 18px; border-radius: 6px; box-shadow: 0 14px 30px rgba(0,0,0,.6); }
.fr-mat { padding: 14px; background: #ece7dc; box-shadow: inset 0 2px 6px rgba(0,0,0,.35); }
.fr-wood { background: linear-gradient(90deg, rgba(0,0,0,.25), transparent 8%, transparent 92%, rgba(0,0,0,.25)), repeating-linear-gradient(88deg, #5a3416 0 7px, #6e4220 7px 11px, #4d2b12 11px 16px); box-shadow: inset 0 0 0 3px #3a210c, inset 0 0 0 6px #7b4c26, 0 14px 30px rgba(0,0,0,.6); }
.fr-baroque { padding: 22px; background: linear-gradient(135deg, #fff1b8, #c8921f 25%, #fff6cf 45%, #9a6a00 65%, #ffe39a 85%, #b07d10);
  box-shadow: inset 0 0 0 3px #8a5a0c, inset 0 0 0 7px #f6d27a, inset 0 0 0 9px #7a4e08, 0 14px 30px rgba(0,0,0,.6); }
.fr-baroque::before, .fr-baroque::after { content: '❦'; position: absolute; font-size: 26px; color: #fff3c4; text-shadow: 0 1px 2px #6a4706; }
.fr-baroque::before { left: 4px; top: -2px; } .fr-baroque::after { right: 4px; bottom: -4px; transform: rotate(180deg); }
.fr-baroque .fr-mat { background: #4a1420; }
.fr-obsidian { background: linear-gradient(135deg, #2c2f38, #07070a 40%, #23262e 55%, #000); box-shadow: inset 0 0 0 1px #4b4f5a, 0 14px 30px rgba(0,0,0,.7); }
.fr-obsidian .fr-mat { background: #0b0b10; }
.fr-neon { background: #07080f; border: 3px solid #ff3fb5; box-shadow: 0 0 12px #ff3fb5, 0 0 30px rgba(255,63,181,.5), inset 0 0 14px rgba(255,63,181,.5); }
.fr-neon .fr-mat { background: #0c0d18; box-shadow: 0 0 0 2px #3fd7ff, 0 0 14px #3fd7ff; }
.fr-museum { padding: 0 0 60px; box-shadow: none; }
.fr-museum .fr-mat { background: none; box-shadow: none; padding: 0 0 6px; filter: drop-shadow(0 18px 18px rgba(0,0,0,.55)); }
.fr-museum::after { content: ''; position: absolute; left: -10px; right: -10px; bottom: 30px; height: 22px; border-radius: 4px; background: linear-gradient(180deg, #e9e5dd, #a9a49a); box-shadow: 0 10px 16px rgba(0,0,0,.5); }
.fr-plaque { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 150px; padding: 4px 8px; text-align: center; background: linear-gradient(180deg, #e8c46a, #a87b16); color: #2a1a00; border-radius: 3px; font-size: 11px; display: flex; flex-direction: column; box-shadow: 0 3px 6px rgba(0,0,0,.4); }
.fr-plaque span { font-size: 9px; opacity: .8; }
/* ascension */
.asc { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.asc-card { border-radius: 12px; }
.asc-1 .asc-card { box-shadow: 0 0 14px rgba(246,196,83,.25); }
.asc-3 .asc-card { box-shadow: 0 0 22px 2px rgba(246,196,83,.5), 0 0 0 2px rgba(246,196,83,.5); }
.asc-card { position: relative; isolation: isolate; }
.asc-5 .asc-card { box-shadow: 0 0 34px 6px rgba(255,210,120,.65); }
.asc-5 .asc-card::before { content: ''; position: absolute; inset: -6px; border-radius: 14px; z-index: -1; background: conic-gradient(from var(--a, 0deg), #ff6b8b, #ffcf6b, #8dffb0, #6be0ff, #a58bff, #ff6b8b); animation: asc-spin 6s linear infinite; }
@property --a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes asc-spin { to { --a: 360deg; } }
.asc-stars { font-size: 22px; color: #f6c453; letter-spacing: 2px; text-shadow: 0 0 8px rgba(246,196,83,.7); }
.asc-stars span { color: rgba(255,255,255,.15); text-shadow: none; }
.asc-cap { font-size: 13px; font-weight: 700; color: var(--muted); }
.asc-5 .asc-cap { color: #ffd27a; letter-spacing: .2em; text-transform: uppercase; }
/* ideas round 2 */
.sl-eng { font-weight: 700; letter-spacing: .02em; }
.pc-ed1 { position: absolute; left: 1.1em; top: 17.6em; width: 2.6em; z-index: 7; filter: drop-shadow(0 .05em .1em rgba(0,0,0,.6)); }
.l-fullart .pc-ed1 { top: auto; bottom: 7.4em; }
.ed1 { display: block; width: 100%; }
.mis-wrap { position: relative; }
.mis-wrap.cut { overflow: hidden; border-radius: 10px; }
.mis-wrap.cut .pcard:not(.mis-next) { transform: translateY(16%); }
.mis-next { position: absolute; left: 0; top: -84%; }
.mis-d { font-size: 12px; text-align: center; max-width: 190px; }
.mis-inkspot { position: absolute; left: -10%; top: 16%; width: 120%; height: 3.2em; z-index: 6; transform: rotate(-14deg); pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(16,20,46,.85) 12%, rgba(30,40,90,.92) 40%, rgba(16,20,46,.7) 70%, transparent);
  -webkit-mask: radial-gradient(ellipse 60% 45% at 40% 50%, #000 40%, transparent 72%), linear-gradient(90deg, #000, #000); mask: radial-gradient(ellipse 60% 45% at 40% 50%, #000 40%, transparent 72%); filter: blur(.6px); }
.mis-ghost { position: absolute; left: .32em; top: .26em; opacity: .7; color: #ff8a96; pointer-events: none; }
.np-aurora .pc-holo { filter: hue-rotate(-70deg) saturate(2.2) brightness(.8) contrast(1.5) !important; opacity: calc(.6 + var(--act) * .4) !important; }
.np-aurora .pc-frame { box-shadow: inset 0 0 1.2em rgba(80,255,200,.55); }
.np-eclipse .pc-holo { filter: grayscale(1) contrast(1.8) brightness(.55) !important; opacity: .9 !important; }
.np-ring { position: absolute; left: 50%; top: 46%; width: 9em; height: 9em; margin: -4.5em 0 0 -4.5em; border-radius: 50%; z-index: 3; pointer-events: none;
  background: radial-gradient(circle, transparent 0 55%, rgba(255,214,140,.95) 58%, rgba(255,150,60,.5) 63%, transparent 72%); mix-blend-mode: screen; }
.np-blaze .pc-holo { filter: hue-rotate(160deg) saturate(2.4) brightness(.85) contrast(1.6) !important; opacity: calc(.65 + var(--act) * .35) !important; }
.gift-card { flex: none; }
.gift-side, .pop-side { display: flex; flex-direction: column; gap: 14px; max-width: 420px; }
.gift-note { position: relative; padding: 18px 20px 14px; background: linear-gradient(180deg, #fbf6e8, #efe5cc); color: #3a3122; border-radius: 4px; transform: rotate(-1.5deg); box-shadow: 0 10px 24px rgba(0,0,0,.45); font-family: Georgia, serif; }
.gift-note::before { content: ''; position: absolute; left: 50%; top: -10px; width: 70px; height: 20px; margin-left: -35px; background: rgba(214,40,58,.85); transform: rotate(2deg); border-radius: 2px; }
.gn-from { font-family: 'Inter', sans-serif; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #7a6a4a; }
.gift-note p { margin: 8px 0; font-size: 17px; line-height: 1.4; font-style: italic; }
.gn-date { font-size: 12px; color: #7a6a4a; text-align: right; }
.gift-tl { display: flex; gap: 10px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: 13px; }
.gift-tl .dot { width: 14px; height: 14px; border-radius: 50%; background: #d6283a; box-shadow: 0 0 0 3px rgba(214,40,58,.25); flex: none; }
.gift-tl div { display: flex; flex-direction: column; } .gift-tl span { color: var(--muted); font-size: 12px; }
.pop-title { font-family: 'Barlow Condensed', sans-serif; font-size: 24px; text-transform: uppercase; }
.pop-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.popb { display: flex; flex-direction: column; padding: 8px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line2); font-size: 12px; color: var(--muted); }
.popb b { font-family: 'Barlow Condensed', sans-serif; font-size: 22px; color: var(--text); line-height: 1; }
.popb.gold { border-color: rgba(246,196,83,.6); } .popb.gold b { color: var(--gold); }
.popb.cyan b { color: #22d3ee; } .popb.violet b { color: #c4b5fd; }

/* card page: why this copy is special + its history */
.story { display: flex; flex-direction: column; gap: 14px; }
.st-label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.st-hist .leg-tl li a { text-decoration: underline; }
.eng-prev { display: flex; justify-content: center; margin: 4px 0 14px; }
.legacy, .leg-tags, .leg-tl { }
.leg-tl .t-engrave i { border-color: #f1d38a; } .leg-tl .t-pull i { border-color: var(--gold); }

/* ---------- holo preview (#/holo) ---------- */
/* no CSS filters on any of these: the grading is baked into each sheet copy */
.hx { --hx-px: calc(var(--hx-x) + var(--tx, 0) * 1.2%); --hx-py: calc(var(--hx-y) + var(--ty, 0) * 1.2%); }
.hx .hx-tint, .hx .hx-sheen { position: absolute; inset: 0; pointer-events: none; }
/* reverse: the original reverse foil, its rainbow swapped for this copy's window on the Fade sheet */
.pcard.hx-reverse .pc-rshine { filter: none; background-image: var(--tex-glitter), var(--hx-foil); background-size: 150% auto, 400% auto;
  background-position: var(--fx) var(--fy), var(--hx-px) var(--hx-py); }
/* prismatic: the original layers and strengths, finer facets, rainbow swapped for the gem sheet */
.pcard.hx-prism .pc-foil { filter: none; background-image: var(--hx-crystal), var(--hx-foil); background-size: 130% auto, 400% auto;
  background-position: var(--fx) var(--fy), var(--hx-px) var(--hx-py); }
.pcard.hx-prism .pc-holo { filter: none; background-image: var(--tex-glitter), var(--hx-foil); background-size: 160% auto, 400% auto;
  background-position: var(--fx) var(--fy), var(--hx-px) var(--hx-py); }
/* holo art: soft-light keeps the painting's own light and colour, just leans it toward the sheet's hue */
.hx .hx-tint { z-index: 2; mix-blend-mode: soft-light; background: var(--hx-tex) no-repeat; background-size: 400% auto; background-position: var(--hx-x) var(--hx-y);
  opacity: calc((.14 + var(--act) * .12) * var(--hw, 1)); }
/* sparkle only where the light is */
.hx .hx-sheen { z-index: 2; mix-blend-mode: color-dodge; opacity: calc((.15 + var(--act) * .6) * var(--hw, 1));
  background-image: var(--tex-glitter), var(--hx-foil); background-repeat: no-repeat; background-size: 150% auto, 400% auto; background-position: var(--mx) var(--my), var(--hx-px) var(--hx-py);
  -webkit-mask-image: radial-gradient(circle at var(--mx) var(--my), #000 0%, rgba(0,0,0,.5) 22%, transparent 48%);
  mask-image: radial-gradient(circle at var(--mx) var(--my), #000 0%, rgba(0,0,0,.5) 22%, transparent 48%); }
.hx-holo .pc-inner { background: #0d1018; }

.hx-cmp { display: flex; flex-direction: column; gap: 6px; }
.hx-cmp-row { display: flex; gap: 14px; flex-wrap: wrap; }
.hx-art { flex-direction: column; gap: 26px; }
.hx-sheet-blk { margin: 18px 0 26px; }
.hx-sheet-blk h4 { margin: 0 0 10px; font-size: 15px; }
.hx-sheet-row { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.hx-sheet { position: relative; width: 280px; height: 280px; flex: none; border-radius: 10px; background-size: cover; box-shadow: 0 6px 20px rgba(0,0,0,.5); }
.hx-win { position: absolute; border: 2px solid rgba(255,255,255,.9); border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.6); }
.hx-win span { position: absolute; top: 2px; left: 4px; font: 700 12px/1 system-ui; color: #fff; text-shadow: 0 1px 2px #000; }
.hx-win.rare { border-color: #ffd34d; box-shadow: 0 0 0 1px #000, 0 0 12px #ffd34d; }
.hx-sheet-cards { display: flex; gap: 14px; flex-wrap: wrap; }
.hx-rare { color: #ffd34d !important; font-weight: 700; }
/* prismatic, art kept clear: the facet foil stays full strength on the panel and text but drops to a
   faint trace over the art window (a fixed mask, so it costs nothing per frame), and the art's rainbow
   only shows where the light hits, like the new Holo */
.pcard.hx-prism .pc-foil { -webkit-mask-image: linear-gradient(to bottom, #000 3.5em, rgba(0,0,0,.18) 3.5em, rgba(0,0,0,.18) 20.9em, #000 20.9em);
  mask-image: linear-gradient(to bottom, #000 3.5em, rgba(0,0,0,.18) 3.5em, rgba(0,0,0,.18) 20.9em, #000 20.9em); }
.pcard.hx-prism .pc-holo { opacity: calc((.12 + var(--act) * .55) * var(--hw)); background-position: var(--mx) var(--my), var(--hx-px) var(--hx-py);
  -webkit-mask-image: radial-gradient(circle at var(--mx) var(--my), #000 0%, rgba(0,0,0,.45) 25%, transparent 52%);
  mask-image: radial-gradient(circle at var(--mx) var(--my), #000 0%, rgba(0,0,0,.45) 25%, transparent 52%); }
.hx-prism .hx-tint { opacity: calc((.1 + var(--act) * .08) * var(--hw, 1)); }
.hx-letter { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 8px; border-radius: 6px; background: var(--accent, #8b5cf6); color: #fff; font-weight: 800; font-size: 13px; }
.hx-opts .hx-sheet { width: 220px; height: 220px; }

.hx-facet-sw { background-size: 100% auto; background-color: #777; }

/* ---------- stats preview (#/statslab) ---------- */
.sl-sec { margin-bottom: 30px; }
.sl-sub { margin: -4px 0 12px; font-size: 13px; }
.sl-two { margin-bottom: 0; }
.sl-two > .sl-sec { margin-bottom: 30px; min-width: 0; }
.sl-grid { margin-bottom: 18px; }
.sl-delta { display: block; font-style: normal; font-size: 12px; color: var(--muted); margin-top: 4px; }
.sl-empty { padding: 14px 4px; font-size: 13px; }
.sl-foot { font-size: 12px; margin-top: 10px; }
.sl-tip { position: fixed; z-index: 9999; pointer-events: none; display: none; background: var(--panel2); border: 1px solid var(--line2); border-radius: 8px; padding: 7px 10px; font-size: 12px; line-height: 1.45; color: var(--text); box-shadow: 0 6px 20px rgba(0,0,0,.45); max-width: 260px; }
.sl-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.sl-tabs button { background: transparent; border: 1px solid var(--line2); color: var(--muted); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.sl-tabs button.on { background: var(--panel2); color: var(--text); border-color: var(--violet); }
/* columns: thin bars, 2px gaps, rounded data ends on the baseline */
.sl-cols-plot { position: relative; height: var(--h); display: flex; align-items: flex-end; gap: 2px; border-bottom: 1px solid var(--line2); padding-top: 16px; }
.sl-ymax { position: absolute; top: 0; left: 0; font-size: 11px; color: var(--dim); }
.sl-col { flex: 1; height: 100%; display: flex; align-items: flex-end; cursor: default; }
.sl-col i { display: block; width: 100%; background: var(--violet); border-radius: 4px 4px 0 0; min-height: 0; }
.sl-col:hover i { background: #a78bfa; }
.sl-cols-x { display: flex; gap: 2px; margin-top: 4px; }
.sl-cols-x span { flex: 1; font-size: 10px; color: var(--dim); white-space: nowrap; overflow: visible; }
/* odds vs reality: bar = actual, tick = promised */
.sl-orow { display: grid; grid-template-columns: 110px 1fr 190px 100px; gap: 12px; align-items: center; padding: 7px 4px; border-radius: 8px; }
.sl-orow:hover { background: var(--panel2); }
.sl-oname { font-weight: 700; font-size: 14px; }
.sl-obar { position: relative; height: 12px; background: rgba(255,255,255,.04); border-radius: 4px; }
.sl-obar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--violet); border-radius: 0 4px 4px 0; min-width: 2px; }
.sl-obar b { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text); margin-left: -1px; }
.sl-oval { font-size: 13px; }
.sl-odiff { font-size: 13px; color: var(--muted); text-align: right; }
.sl-odiff.up { color: var(--good); } .sl-odiff.down { color: var(--bad); }
.sl-wears { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; font-size: 12px; color: var(--muted); }
.sl-wears span b { display: block; color: var(--text); font-size: 18px; font-family: 'Barlow Condensed', sans-serif; }
.sl-wears.big { margin-top: 0; gap: 14px 28px; } .sl-wears.big span b { font-size: 28px; }
.sl-hunt-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.sl-prog { height: 10px; background: rgba(255,255,255,.06); border-radius: 999px; overflow: hidden; }
.sl-prog.sm { height: 6px; width: 120px; flex: none; }
.sl-prog i { display: block; height: 100%; background: var(--violet); border-radius: 999px; }
.sl-sets { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.sl-setrow { display: flex; align-items: center; gap: 10px; padding: 6px 2px; font-size: 13px; }
.sl-setrow a { flex: 1; text-decoration: underline; }
.sl-rank { width: 26px; color: var(--muted); }
.sl-pop th[data-sort]:not([data-sort=""])::after { content: ' ' attr(data-sort); color: var(--violet); }
@media (max-width: 700px) {
  .sl-orow { grid-template-columns: 90px 1fr; } .sl-oval, .sl-odiff { grid-column: span 1; text-align: left; }
  .sl-prog.sm { width: 70px; }
}
.sl-packrow { display: grid; grid-template-columns: minmax(0, 1.3fr) 1fr 48px; }
.sl-packrow .mono { text-align: right; }
.sl-popwrap { overflow: auto; max-height: 620px; }
.sl-pop th { top: 0; background: var(--panel); z-index: 1; }

/* ---------- stats page ---------- */
.sp-lb { margin-bottom: 24px; }
.sp-sub { font-size: 12px; margin: -4px 0 10px; }
.sp-hidden { color: var(--muted); font-style: italic; font-weight: 600; }
.sp-pop .sp-row { cursor: pointer; }
.sp-pop .sp-row:hover td, .sp-pop .sp-row.open td { background: var(--panel2); }
.sp-detail td { background: var(--panel2); padding-top: 0; }
.sp-chips { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12px; color: var(--muted); padding: 4px 0 8px; }
.sp-chips b { color: var(--text); margin-right: 5px; font-size: 14px; }

/* ---------- market (Steam style) ---------- */
.mk-stats { margin-bottom: 18px; }
.mk-search { position: relative; max-width: 560px; margin-bottom: 16px; }
.mk-q { width: 100%; font-size: 16px; padding: 12px 16px; border-radius: 12px; }
.mk-sugg { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--panel2); border: 1px solid var(--line2); border-radius: 12px; overflow: hidden; box-shadow: 0 12px 30px rgba(0,0,0,.5); }
.mk-srow { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; padding: 10px 14px; font-size: 14px; align-items: center; }
.mk-srow:hover { background: rgba(255,255,255,.05); }
.mk-srow span { font-size: 12px; }
.mk-list { padding: 6px; }
.mk-head, .mk-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) 80px 120px 100px; gap: 12px; align-items: center; padding: 6px 10px; }
.mk-head { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.mk-row { border-radius: 10px; }
.mk-row:hover { background: var(--panel2); }
.mk-row > div:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.mk-head .num, .mk-row .num, .mk-lhead .num, .mk-lrow .num { text-align: right; }
.coins.sm { padding: 2px 8px; font-size: 13px; }
.mk-sale { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto 70px; gap: 12px; align-items: center; padding: 8px; border-radius: 8px; font-size: 13px; }
.mk-sale:hover { background: var(--panel2); }
.mk-back { display: inline-block; margin-bottom: 12px; }
.mk-top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: start; margin-bottom: 18px; }
.mk-sum { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-bottom: 14px; }
.mk-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.mk-chart-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; margin-bottom: 10px; }
.mk-chart-h h3 { margin: 0; }
.mk-chart-h .sl-tabs { margin: 0; }
.mk-chart { position: relative; }
.mk-svg { display: block; max-width: 100%; }
.mk-grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.mk-ax { fill: var(--dim); font-size: 11px; }
.mk-line { fill: none; stroke: var(--gold); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.mk-pt { fill: var(--gold); stroke: var(--panel); stroke-width: 2; vector-effect: non-scaling-stroke; }
.mk-cross { stroke: var(--line2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.mk-hot { fill: var(--gold); stroke: var(--text); stroke-width: 2; vector-effect: non-scaling-stroke; }
.mk-tip { position: absolute; }
.mk-empty { padding: 40px 10px; text-align: center; color: var(--muted); font-size: 14px; }
.mk-lhead, .mk-lrow { display: grid; grid-template-columns: 48px minmax(0, 1.4fr) 100px 88px minmax(0, 1fr) 100px 64px; gap: 12px; align-items: center; padding: 6px 8px; }
.mk-lhead { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.mk-lrow { border-radius: 10px; cursor: pointer; font-size: 13px; }
.mk-lrow:hover { background: var(--panel2); }
.mk-lrow > div:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.mk-orow { display: flex; gap: 12px; align-items: center; padding: 7px 4px; font-size: 13px; border-bottom: 1px solid var(--line); }
.mk-orow:last-child { border-bottom: 0; }
@media (max-width: 760px) {
  .mk-top { grid-template-columns: 1fr; justify-items: center; } .mk-info { width: 100%; }
  .mk-head, .mk-row { grid-template-columns: 44px minmax(0, 1fr) 90px; } .mk-head span:nth-child(3), .mk-row > span:nth-child(3), .mk-head span:nth-child(5), .mk-row > span:nth-child(5) { display: none; }
  .mk-lhead { display: none; } .mk-lrow { grid-template-columns: 44px minmax(0, 1fr) auto; } .mk-lrow > span:nth-child(3), .mk-lrow > span:nth-child(4), .mk-lrow > span:nth-child(5) { display: none; }
  .mk-sale { grid-template-columns: minmax(0, 1fr) auto; } .mk-sale span:nth-child(2), .mk-sale span:nth-child(4) { display: none; }
}

/* ---------- coin shop ---------- */
a.coins { text-decoration: none; color: inherit; }
.coins-plus { margin-left: 6px; width: 16px; height: 16px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--gold); color: #2a1a00; font-size: 12px; line-height: 1; }
.shop-test { margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; background: rgba(139,92,246,.14); border: 1px solid rgba(139,92,246,.4); font-size: 13px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.shop-b { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px 16px 16px; border-radius: 18px; background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line2); text-align: center; }
.shop-coins { display: flex; align-items: center; gap: 8px; }
.shop-coins b { font: 800 30px 'Barlow Condensed', sans-serif; }
.shop-coins .cn { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff1b8, #f6c453 55%, #b7861f); box-shadow: 0 0 10px rgba(246,196,83,.5); }
.shop-label { font-size: 13px; color: var(--muted); }
.shop-bonus { color: var(--good); font-weight: 700; }
.shop-b .btn { width: 100%; }
.shop-fine { font-size: 12px; max-width: 720px; }
.shop-fine a { text-decoration: underline; }
@media (max-width: 760px) { .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .shop-b { padding: 12px 10px; gap: 6px; } .shop-coins b { font-size: 22px; } .coins-plus { width: 14px; height: 14px; font-size: 11px; } }
