/* PACKOMAT — restrained, product-style UI. Cards and machines carry the visual weight; chrome stays quiet. */
@property --mx { syntax: '<percentage>'; inherits: true; initial-value: 50%; }
@property --my { syntax: '<percentage>'; inherits: true; initial-value: 50%; }
@property --rx { syntax: '<angle>'; inherits: true; initial-value: 0deg; }
@property --ry { syntax: '<angle>'; inherits: true; initial-value: 0deg; }
@property --o { syntax: '<number>'; inherits: true; initial-value: 0; }

:root {
  --bg: #0e0e10; --bg2: #121215; --s1: #17171b; --s2: #1d1d22; --s3: #25252b;
  --line: #26262c; --line2: #33333a; --text: #ececef; --muted: #8e8e97; --dim: #5f5f68;
  --accent: #ffcf3f; --green: #3ccf7e; --red: #ff5a4f; --blue: #6aa8ff;
  --r: 10px;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body.lock { overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select { font: inherit; color: inherit; }
a { color: inherit; }
.hidden { display: none !important; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.up { color: var(--green); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
svg.i { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--line2); background: var(--s2); font-weight: 600; font-size: 14px; white-space: nowrap; transition: background .15s, border-color .15s, transform .08s; }
.btn:hover { background: var(--s3); border-color: #44444c; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.primary { background: var(--text); color: #0e0e10; border-color: var(--text); }
.btn.primary:hover { background: #fff; }
.btn.go { background: var(--green); border-color: var(--green); color: #04190d; }
.btn.go:hover { background: #4fe08f; }
.btn.ghost { background: transparent; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 7px; }
.btn.block { width: 100%; }
.link { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; font-size: 13px; }
.link:hover { color: var(--text); }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 40; height: 60px; display: flex; align-items: center; gap: 28px; padding: 0 24px; background: rgba(14, 14, 16, .88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: -.02em; font-size: 17px; }
.logo-mark { width: 22px; height: 28px; border-radius: 3px; border: 2px solid var(--text); position: relative; transform: rotate(-8deg); }
.logo-mark::after { content: ''; position: absolute; inset: 3px; border-radius: 1px; background: var(--accent); }
.tabs { display: flex; gap: 4px; }
.tabs button { background: none; border: 0; height: 60px; padding: 0 12px; color: var(--muted); font-weight: 500; position: relative; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--text); }
.tabs button.on::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--text); }
.top-r { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.chip { display: flex; align-items: center; gap: 10px; white-space: nowrap; height: 38px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg2); font-size: 13px; }
.chip small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.chip b { font-family: var(--mono); font-weight: 700; font-size: 14px; }
.chip .sub { font-family: var(--mono); color: var(--muted); font-size: 12px; }
button.chip:hover { border-color: var(--line2); }
.tok { width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3c4, #e8b730 45%, #a77a12); box-shadow: inset 0 0 0 1.5px #8a6410, inset 0 0 0 3px #f3cf5a; flex: none; }
.daily { border-color: #5a4a14; background: #1d1a0e; color: var(--accent); }
.daily:hover { border-color: #7a641b; }
.acct { width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg2); display: grid; place-items: center; font-weight: 700; }
.acct:hover { border-color: var(--line2); }

/* ---------- price ticker ---------- */
.ticker { height: 34px; border-bottom: 1px solid var(--line); overflow: hidden; background: var(--bg); position: relative; }
.ticker::before, .ticker::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40px; z-index: 1; }
.ticker::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.ticker::after { right: 0; background: linear-gradient(-90deg, var(--bg), transparent); }
.ticker-track { display: flex; width: max-content; height: 100%; animation: tick 60s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.tk { display: flex; align-items: center; gap: 8px; padding: 0 22px; font-size: 12px; border-right: 1px solid var(--line); white-space: nowrap; }
.tk b { font-weight: 600; }
.tk span { font-family: var(--mono); color: var(--muted); }
.tk .coinb { width: 18px; height: 18px; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- layout ---------- */
main { max-width: 1280px; margin: 0 auto; padding: 0 24px 80px; }
.view { animation: vin .25s ease; }
@keyframes vin { from { transform: translateY(4px); } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 36px 0 22px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -.025em; line-height: 1.15; }
.page-head p { margin: 6px 0 0; color: var(--muted); max-width: 560px; }
.stats { display: flex; gap: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.stat { padding: 10px 18px; border-right: 1px solid var(--line); min-width: 110px; }
.stat:last-child { border-right: 0; }
.stat small { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.stat b { font-family: var(--mono); font-size: 17px; font-weight: 700; }
.panel { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-h h3 { margin: 0; font-size: 14px; font-weight: 600; }
.panel-b { padding: 18px; }
h2.sec { font-size: 18px; font-weight: 650; letter-spacing: -.015em; margin: 48px 0 16px; }

/* ---------- the vending room ---------- */
.room { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--line);
  background:
    radial-gradient(ellipse 22% 55% at 18% 0%, rgba(255, 244, 220, .10), transparent 70%),
    radial-gradient(ellipse 22% 55% at 50% 0%, rgba(255, 244, 220, .12), transparent 70%),
    radial-gradient(ellipse 22% 55% at 82% 0%, rgba(255, 244, 220, .10), transparent 70%),
    linear-gradient(180deg, #1a1a1d 0%, #141416 64%, #0d0d0f 64.2%, #111113 100%); }
.room::before { /* wall panel seams */ content: ''; position: absolute; inset: 0 0 36% 0; background: repeating-linear-gradient(90deg, transparent 0 239px, rgba(0, 0, 0, .35) 239px 240px, rgba(255, 255, 255, .025) 240px 241px); pointer-events: none; }
.room::after { /* floor sheen */ content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 36%; background: linear-gradient(180deg, rgba(255, 255, 255, .035), transparent 40%); pointer-events: none; }
.floor { position: relative; z-index: 1; display: flex; justify-content: center; gap: 44px; padding: 44px 24px 34px; }

.vm { width: 300px; flex: none; position: relative; user-select: none; -webkit-user-select: none; }
.vm::after { content: ''; position: absolute; left: 4%; right: 4%; bottom: -14px; height: 26px; background: radial-gradient(ellipse at center, rgba(0, 0, 0, .75), transparent 70%); z-index: -1; }
.vm-cab { position: relative; border-radius: 9px 9px 4px 4px; padding: 10px 10px 0;
  background: linear-gradient(90deg, #070708 0%, #1c1c20 3.5%, #151518 10%, #131316 50%, #18181b 90%, #1f1f23 96.5%, #070708 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09), inset 0 0 0 1px rgba(255, 255, 255, .03), 0 40px 60px -20px rgba(0, 0, 0, .8); }
.vm-wrap { height: 58px; border-radius: 4px; overflow: hidden; position: relative; margin-bottom: 10px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .5); }
.vm-wrap::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 255, 255, .14), transparent 45%, rgba(0, 0, 0, .12)); }
.vm-grid { display: grid; grid-template-columns: 1fr 70px; gap: 8px; }
.vm-frame { padding: 5px; border-radius: 5px; background: linear-gradient(135deg, #8d9299, #d6dade 22%, #7d828a 48%, #c4c8cd 74%, #6f747b); box-shadow: 0 1px 0 rgba(255, 255, 255, .08), 0 0 0 1px #000; }
.vm-window { position: relative; border-radius: 2px; overflow: hidden; padding: 10px 7px 0; background: linear-gradient(180deg, #f6f7f8 0%, #e7e9ec 60%, #d7dade 100%); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .35), inset 0 18px 24px -18px rgba(0, 0, 0, .35); }
.vm-window::before { /* LED strip */ content: ''; position: absolute; left: 6px; right: 6px; top: 3px; height: 3px; border-radius: 2px; background: #fff; box-shadow: 0 0 8px 2px rgba(255, 255, 255, .9), 0 6px 26px rgba(255, 255, 255, .7); }
.vm-glass { position: absolute; inset: 0; pointer-events: none; z-index: 5;
  background:
    linear-gradient(112deg, transparent 0 18%, rgba(255, 255, 255, .28) 19%, rgba(255, 255, 255, .06) 27%, transparent 28% 64%, rgba(255, 255, 255, .12) 65%, transparent 70%),
    linear-gradient(180deg, rgba(160, 185, 205, .05), rgba(30, 40, 50, .14)); }
.vm-row { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 0 2px 0; }
.vm-slot { position: relative; height: 98px; display: flex; align-items: flex-end; justify-content: center; }
.vm-slot img.pk { width: 88%; display: block; position: relative; z-index: 1; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .3)); transform-origin: 50% 100%; transition: transform .3s; }
.vm-slot img.pk.back2 { position: absolute; bottom: 9px; left: 50%; width: 80%; transform: translateX(-44%); z-index: 0; filter: brightness(.82) drop-shadow(0 2px 2px rgba(0, 0, 0, .2)); }
.coil { position: absolute; left: 4%; right: 4%; bottom: -2px; height: 16px; z-index: 2; overflow: hidden; }
.coil svg { position: absolute; left: 0; top: 0; height: 16px; width: 200%; }
.vm-slot.spin .coil svg { animation: coil .45s linear 3; }
@keyframes coil { to { transform: translateX(-12.5%); } }
.vm-shelf { position: relative; height: 22px; margin: 0 -7px 8px; background: linear-gradient(180deg, #b9bdc3, #e9ebee 30%, #9ea3aa 100%); box-shadow: 0 3px 4px rgba(0, 0, 0, .25); display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 3px 9px; }
.vm-shelf span { background: #fff; border-radius: 1px; font: 700 8.5px/16px var(--mono); color: #1a1a1a; text-align: center; letter-spacing: .02em; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); white-space: nowrap; overflow: hidden; }
.vm-shelf span b { color: #b3261e; }
.vm-row:last-of-type .vm-shelf { margin-bottom: 0; }

.vm-side { border-radius: 4px; padding: 8px 7px; display: flex; flex-direction: column; gap: 9px; background: linear-gradient(90deg, #101012, #19191c 50%, #121214); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04); }
.vm-lcd { height: 46px; border-radius: 3px; padding: 5px 6px; background: #0b130d; box-shadow: inset 0 0 0 2px #000, inset 0 0 0 3px #2b2f2c; font: 700 8.5px/1.45 var(--mono); color: #7dffb0; white-space: nowrap; text-shadow: 0 0 4px rgba(125, 255, 176, .5); overflow: hidden; letter-spacing: .02em;
  background-image: repeating-linear-gradient(0deg, rgba(0, 0, 0, .25) 0 1px, transparent 1px 2px); }
.vm-lcd .l2 { color: #c8ffdb; }
.vm-lcd.blink .l1 { animation: blink .5s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.vm-keys { display: flex; flex-direction: column; gap: 6px; }
.key { position: relative; height: 50px; border: 0; border-radius: 4px; padding: 3px 4px 0; text-align: center; color: #1b1b1d;
  background: linear-gradient(180deg, #f2f3f5, #c8ccd1); box-shadow: inset 0 1px 0 #fff, inset 0 -2px 0 rgba(0, 0, 0, .18), 0 2px 0 #4d5056, 0 3px 4px rgba(0, 0, 0, .5); transition: transform .06s, box-shadow .06s; }
.key b { display: block; font: 800 15px/1 var(--sans); }
.key span { display: block; font: 700 7.5px/1.4 var(--sans); letter-spacing: .06em; color: #45474d; }
.key i { display: block; font-style: normal; font: 700 8px/1.3 var(--mono); color: #b3261e; }
.key:hover { background: linear-gradient(180deg, #fff, #d6d9dd); }
.key:active, .key.press { transform: translateY(2px); box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 rgba(0, 0, 0, .18), 0 0 0 #4d5056, 0 1px 2px rgba(0, 0, 0, .5); }
.key:disabled { opacity: .55; cursor: not-allowed; }
.key.k-grail { background: linear-gradient(180deg, #ffe08a, #c99a2e); box-shadow: inset 0 1px 0 #fff4c9, inset 0 -2px 0 rgba(0, 0, 0, .2), 0 2px 0 #6b5114, 0 3px 4px rgba(0, 0, 0, .5); }
.key.k-grail span { color: #5b4310; }
.vm-coin { margin-top: auto; height: 46px; border-radius: 3px; background: linear-gradient(180deg, #bfc3c8, #8a8f96); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 0 0 1px #000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.vm-coin i { width: 5px; height: 20px; border-radius: 3px; background: #0b0b0c; box-shadow: inset 0 0 0 1px #000, 0 1px 0 rgba(255, 255, 255, .5); }
.vm-coin span { font: 700 6.5px var(--sans); letter-spacing: .08em; color: #222; }
.vm-odds { background: none; border: 0; padding: 0; font: 600 9px var(--sans); color: #9a9aa3; text-decoration: underline; text-underline-offset: 2px; }
.vm-odds:hover { color: #fff; }
.vm-bottom { display: grid; grid-template-columns: 1fr 70px; gap: 8px; padding: 10px 0 12px; }
.vm-door { position: relative; height: 66px; border-radius: 4px; background: #050506; box-shadow: inset 0 0 0 1px #000, inset 0 10px 18px rgba(0, 0, 0, .9); padding: 6px; }
.vm-flap { height: 100%; border-radius: 2px; background: linear-gradient(180deg, #3a3c41, #24262a 40%, #2c2e33); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 -1px 0 rgba(0, 0, 0, .5); display: grid; place-items: center; font: 800 11px var(--sans); letter-spacing: .3em; color: rgba(255, 255, 255, .22); transform-origin: 50% 0; transition: transform .2s; }
.vm-flap.thud { animation: thud .5s ease; }
@keyframes thud { 20% { transform: perspective(200px) rotateX(-22deg); } 60% { transform: perspective(200px) rotateX(6deg); } }
.vm-plate { border-radius: 4px; background: linear-gradient(90deg, #101012, #19191c 50%, #121214); display: flex; align-items: center; justify-content: center; }
.vm-plate span { font: 700 7px var(--sans); letter-spacing: .1em; color: #55555c; writing-mode: vertical-rl; transform: rotate(180deg); }
.vm-base { height: 12px; margin: 0 8px; background: linear-gradient(180deg, #0a0a0b, #000); border-radius: 0 0 3px 3px; }
.vm-cap { text-align: center; margin-top: 26px; }
.vm-cap b { display: block; font-size: 15px; font-weight: 650; }
.vm-cap span { color: var(--muted); font-size: 13px; }
.vm.busy .key { pointer-events: none; }

/* printed wraps above the window */
.vm-wrap .wa { position: absolute; top: 0; bottom: 0; right: 0; display: flex; align-items: flex-end; }
.vm-wrap .wa img { height: 52px; margin-left: -12px; margin-bottom: -10px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .3)); }
.vm-wrap .wt { position: relative; z-index: 1; }
.wrap-monsters { background: linear-gradient(100deg, #c8102e 0 58%, #ffd23f 58% 61%, #a50d26 61% 100%); display: flex; align-items: center; padding: 0 12px; }
.wrap-monsters b { display: block; font: 800 italic 21px/1 'Barlow', sans-serif; color: #ffd23f; letter-spacing: -.01em; -webkit-text-stroke: 1px #6e0816; paint-order: stroke; text-shadow: 0 2px 0 #6e0816; }
.wrap-monsters small { display: block; font: 600 7.5px 'Barlow', sans-serif; letter-spacing: .22em; color: #ffe6ea; margin-bottom: 4px; }
.wrap-pirates { background: radial-gradient(ellipse at 30% 40%, #f3e3bd, #d9bd85 75%, #b8955a); display: flex; align-items: center; padding: 0 12px; border-top: 3px solid #3a2410; border-bottom: 3px solid #3a2410; }
.wrap-pirates b { display: block; font: 900 19px/1 'Playfair Display', serif; color: #3a2410; letter-spacing: .12em; }
.wrap-pirates small { display: block; font: 700 7px 'Playfair Display', serif; color: #5b3a1a; letter-spacing: .26em; margin-top: 4px; }
.wrap-allstars { background: linear-gradient(180deg, #0f1f3d 0 74%, #c8102e 74% 82%, #fff 82% 88%, #c8102e 88% 100%); display: flex; align-items: center; padding: 0 12px 8px; }
.wrap-allstars b { display: block; font: 700 19px/1 'Oswald', sans-serif; color: #fff; letter-spacing: .03em; text-transform: uppercase; }
.wrap-allstars small { display: block; font: 600 7px 'Oswald', sans-serif; color: #9fb4da; letter-spacing: .22em; margin-top: 4px; }

/* flying pack (vend animation) */
.flypack { position: fixed; z-index: 90; pointer-events: none; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .4)); }

/* ---------- how it works ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.step { padding: 22px 22px 24px; border-right: 1px solid var(--line); background: var(--bg2); }
.step:last-child { border-right: 0; }
.step small { font: 600 12px var(--mono); color: var(--dim); }
.step h4 { margin: 8px 0 6px; font-size: 15px; font-weight: 650; }
.step p { margin: 0; color: var(--muted); font-size: 13.5px; }

/* recent pulls strip */
.pulls { display: grid; grid-auto-flow: column; grid-auto-columns: 132px; gap: 14px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.pull { font-size: 12px; }
.pull .card { width: 132px; }
.pull b { display: block; margin-top: 8px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pull span { color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- coins ---------- */
.coinb { display: inline-grid; place-items: center; width: 1.25em; height: 1.25em; border-radius: 50%; background: var(--cc); overflow: hidden; flex: none; box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .35); vertical-align: middle; }
.coinb img { width: 118%; height: 118%; margin-top: 12%; display: block; }

/* =====================================================================
   CARDS  (sizes in cqw so a card looks the same at any width)
   ===================================================================== */
.card { --mx: 50%; --my: 50%; --rx: 0deg; --ry: 0deg; --o: 0;
  position: relative; width: 100%; aspect-ratio: 63 / 88; container-type: inline-size; border-radius: 4.6% / 3.3%; isolation: isolate; overflow: hidden;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .5s cubic-bezier(.2, .8, .2, 1), --o .4s, box-shadow .3s;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .35), 0 6px 14px rgba(0, 0, 0, .35); background: #ddd; }
.card.live { transition: transform .08s linear, --o .3s; --o: 1; }
.card.sway { --o: .85; animation: sway 7s ease-in-out infinite; transition: none; }
@keyframes sway { 0%, 100% { --mx: 30%; --my: 35%; --rx: 3deg; --ry: -6deg; } 50% { --mx: 70%; --my: 65%; --rx: -3deg; --ry: 6deg; } }
.cface { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; }
.card img.art { position: absolute; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.card .foil, .card .sparkle, .card .glare, .card .foil-art { position: absolute; pointer-events: none; }
.card .foil, .card .sparkle, .card .glare { inset: 0; border-radius: inherit; z-index: 10; }
.card .foil { opacity: 0; mix-blend-mode: color-dodge;
  background-image: repeating-linear-gradient(118deg, #ff6f6f 0%, #ffd65e 4%, #9cff6a 8%, #6af2ff 12%, #7b8bff 16%, #ff7af0 20%, #ff6f6f 24%);
  background-size: 360% 360%; background-position: var(--mx) var(--my); filter: brightness(.55) contrast(1.5) saturate(1.1); }
.card .sparkle { opacity: 0; mix-blend-mode: color-dodge; background-image: radial-gradient(circle at 23% 31%, #fff 0 .5px, transparent 1px), radial-gradient(circle at 71% 64%, #fff 0 .4px, transparent .9px), radial-gradient(circle at 44% 88%, #fff 0 .45px, transparent .9px); background-size: 17px 19px, 23px 13px, 11px 29px; background-position: var(--mx) var(--my), calc(100% - var(--mx)) var(--my), var(--my) var(--mx); }
.card .glare { opacity: calc(var(--o) * .9); mix-blend-mode: soft-light; background: radial-gradient(farthest-corner circle at var(--mx) var(--my), rgba(255, 255, 255, .85) 0%, rgba(255, 255, 255, .15) 28%, rgba(0, 0, 0, .35) 95%); }
.card .foil-art { opacity: 0; mix-blend-mode: color-dodge; z-index: 3;
  background-image: repeating-linear-gradient(118deg, #ff6f6f 0%, #ffd65e 5%, #9cff6a 10%, #6af2ff 15%, #7b8bff 20%, #ff7af0 25%, #ff6f6f 30%);
  background-size: 300% 300%; background-position: var(--mx) var(--my); filter: brightness(.6) contrast(1.35); }
.card:hover:not(.static) { --o: 1; }
.card.rar-2 .foil-art { opacity: calc(.3 + var(--o) * .4); }
.card.rar-3 .foil { opacity: calc(.1 + var(--o) * .4); }
.card.rar-3 .sparkle { opacity: calc(var(--o) * .35); }
.card.rar-4 .foil { opacity: calc(.14 + var(--o) * .42); }
.card.rar-4 .sparkle { opacity: calc(.08 + var(--o) * .35); }
.card.rar-5 .foil { opacity: calc(.16 + var(--o) * .38); background-image: repeating-linear-gradient(118deg, #7a5a12 0%, #ffe9a6 5%, #c9962a 10%, #fff6d4 15%, #7a5a12 20%); filter: brightness(.7) contrast(1.4); }
.card.rar-5 .sparkle { opacity: calc(.1 + var(--o) * .4); }
.card.rar-6 .foil { opacity: calc(.2 + var(--o) * .4); filter: brightness(.75) contrast(1.6) saturate(1.4); }
.card.rar-6 .sparkle { opacity: calc(.12 + var(--o) * .4); }

/* ---- card back ---- */
.card.back { background: #0d1b2e; }
.cback { position: absolute; inset: 0; border-radius: inherit; border: 3.4cqw solid #0a1424;
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .035) 0 1.4cqw, transparent 1.4cqw 2.8cqw), radial-gradient(ellipse at 50% 45%, #1f4a7a, #0d1b2e 72%);
  display: grid; place-items: center; box-shadow: inset 0 0 0 .7cqw #c9a646; }
.cb-ring { width: 74cqw; aspect-ratio: 1; border-radius: 50%; display: grid; place-content: center; text-align: center;
  background: radial-gradient(circle, #f4f1e8 0 55%, #c9a646 55.5% 58%, #0d1b2e 58.5% 62%, #c9a646 62.5% 64%, transparent 64.5%); }
.cb-logo { font: 800 11.5cqw/1 'Barlow', sans-serif; letter-spacing: -.02em; color: #0d1b2e; font-style: italic; }
.cb-logo b { color: #c8102e; font-weight: 800; }
.cb-sub { font: 700 2.4cqw 'Barlow', sans-serif; letter-spacing: .18em; color: #0d1b2e; margin-top: 1.6cqw; }
.card.back .foil { opacity: calc(.08 + var(--o) * .15); }

/* ---- Meme Monsters ---- */
.card.monsters { background: #b9bfc6; }
.monsters .cface { background: linear-gradient(145deg, #e6e9ed, #aab1ba 30%, #e9ecef 55%, #9aa2ac 80%, #d5d9de); }
.m-panel { position: absolute; inset: 3.4cqw; border-radius: 2.4cqw; background: linear-gradient(172deg, var(--t1) 0%, var(--t2) 58%, var(--t3) 100%); box-shadow: inset 0 0 0 .35cqw rgba(0, 0, 0, .25); }
.m-panel::after { content: ''; position: absolute; inset: 0; border-radius: inherit; opacity: .25; background: repeating-linear-gradient(60deg, rgba(255, 255, 255, .25) 0 .3cqw, transparent .3cqw 1.6cqw); }
.m-top { position: absolute; top: 5.4cqw; left: 6.5cqw; right: 6cqw; display: flex; align-items: center; gap: 1.8cqw; color: #141414; font-family: 'Barlow', sans-serif; z-index: 2; }
.m-stage { font: 700 2.3cqw 'Barlow', sans-serif; letter-spacing: .06em; padding: .4cqw 1.4cqw; border-radius: 1cqw; background: linear-gradient(180deg, #f2f2f2, #b9b9b9); box-shadow: inset 0 0 0 .25cqw rgba(0, 0, 0, .35); }
.m-name { font-weight: 800; font-size: 7.4cqw; letter-spacing: -.02em; line-height: 1; white-space: nowrap; }
.m-name i { font-style: italic; font-weight: 800; color: #c8102e; margin-left: 1cqw; -webkit-text-stroke: .15cqw #fff; }
.m-hp { margin-left: auto; font: 800 6.6cqw/1 'Barlow Condensed', sans-serif; color: #b01020; white-space: nowrap; }
.m-hp small { font-size: 2.8cqw; margin-right: .4cqw; color: #141414; }
.ticon { width: 6.4cqw; height: 6.4cqw; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, var(--t1), var(--t2)); box-shadow: inset 0 0 0 .3cqw rgba(0, 0, 0, .3), 0 .2cqw .4cqw rgba(0, 0, 0, .3); flex: none; }
.ticon svg { width: 72%; height: 72%; }
.m-art { position: absolute; top: 14cqw; left: 7cqw; right: 7cqw; height: 52cqw; overflow: hidden; box-shadow: 0 0 0 .7cqw #c9ced5, 0 0 0 1cqw rgba(0, 0, 0, .35), inset 0 0 2cqw rgba(0, 0, 0, .25); z-index: 1; }
.m-bg { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 92%, rgba(255, 255, 255, .55), transparent 55%), repeating-conic-gradient(from 0deg at 50% 88%, rgba(255, 255, 255, .13) 0 5deg, transparent 5deg 10deg), linear-gradient(180deg, var(--t1), var(--t2) 70%, var(--t3)); }
.m-art img.art { left: 50%; bottom: -1%; height: 100%; transform: translateX(-50%); filter: drop-shadow(0 1.2cqw 1cqw rgba(0, 0, 0, .25)); }
.m-art .foil-art { inset: 0; }
.m-strip { position: absolute; top: 67.6cqw; left: 10cqw; right: 10cqw; height: 4.2cqw; display: grid; place-items: center; font: italic 600 2.6cqw 'Barlow', sans-serif; color: #2a2a2a; background: linear-gradient(90deg, #b9bec5, #eef0f2 50%, #b9bec5); clip-path: polygon(2% 0, 98% 0, 100% 100%, 0 100%); z-index: 2; }
.m-atk { position: absolute; top: 75cqw; left: 7.5cqw; right: 7.5cqw; display: flex; flex-direction: column; gap: 2.4cqw; z-index: 2; color: #141414; font-family: 'Barlow', sans-serif; }
.atk { display: flex; align-items: flex-start; gap: 2cqw; min-height: 7cqw; }
.atk + .atk { border-top: .25cqw solid rgba(0, 0, 0, .18); padding-top: 2.2cqw; }
.cost { display: flex; gap: .7cqw; width: 14cqw; flex: none; padding-top: .4cqw; }
.cost i { width: 4.2cqw; height: 4.2cqw; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--t1), var(--t3)); box-shadow: inset 0 0 0 .3cqw rgba(0, 0, 0, .3); }
.an { flex: 1; min-width: 0; }
.an b { font-weight: 800; font-size: 4.8cqw; line-height: 1.1; display: block; }
.an p { margin: .5cqw 0 0; font-size: 2.6cqw; line-height: 1.25; font-weight: 500; }
.atk em { font: 800 6.4cqw/1 'Barlow Condensed', sans-serif; font-style: normal; }
.valuebar { position: absolute; bottom: 10cqw; left: 6.5cqw; right: 6.5cqw; height: 8.4cqw; border-radius: 1.4cqw; display: flex; align-items: center; gap: 1.6cqw; padding: 0 2.4cqw; background: rgba(12, 12, 14, .82); color: #fff; z-index: 2; }
.valuebar small { font: 700 2.2cqw 'Barlow', sans-serif; letter-spacing: .14em; color: #b9b9c2; margin-right: auto; }
.valuebar .coinb { width: 5.4cqw; height: 5.4cqw; }
.valuebar b { font: 700 4.4cqw var(--mono); }
.valuebar span { font: 700 2.6cqw 'Barlow', sans-serif; color: #c9c9d1; }
.m-foot { position: absolute; bottom: 4.8cqw; left: 6.5cqw; right: 6.5cqw; display: flex; justify-content: space-between; font: 600 2.3cqw 'Barlow', sans-serif; color: #1a1a1a; z-index: 2; }
.m-foot b { color: #000; }
/* full art EX and above */
.monsters.rar-4 .m-panel, .monsters.rar-5 .m-panel, .monsters.rar-6 .m-panel { display: none; }
.monsters.rar-4 .m-art, .monsters.rar-5 .m-art, .monsters.rar-6 .m-art { inset: 3.4cqw; height: auto; border-radius: 2.4cqw; box-shadow: inset 0 0 0 .35cqw rgba(0, 0, 0, .3); }
.monsters.rar-4 .m-art img.art, .monsters.rar-5 .m-art img.art, .monsters.rar-6 .m-art img.art { height: 46%; bottom: 49%; }
.monsters.rar-4 .m-top, .monsters.rar-5 .m-top, .monsters.rar-6 .m-top { color: #fff; text-shadow: 0 .3cqw .8cqw rgba(0, 0, 0, .55); }
.monsters.rar-4 .m-hp, .monsters.rar-4 .m-hp small, .monsters.rar-5 .m-hp, .monsters.rar-5 .m-hp small, .monsters.rar-6 .m-hp, .monsters.rar-6 .m-hp small { color: #fff; }
.monsters.rar-4 .m-strip, .monsters.rar-5 .m-strip, .monsters.rar-6 .m-strip { background: rgba(0, 0, 0, .35); color: #fff; top: 70.5cqw; }
.monsters.rar-4 .m-atk, .monsters.rar-5 .m-atk, .monsters.rar-6 .m-atk { top: 77cqw; color: #fff; background: rgba(0, 0, 0, .38); border-radius: 1.6cqw; padding: 2cqw 2.4cqw; left: 6cqw; right: 6cqw; text-shadow: 0 .2cqw .6cqw rgba(0, 0, 0, .5); }
.monsters.rar-4 .atk + .atk, .monsters.rar-5 .atk + .atk, .monsters.rar-6 .atk + .atk { border-color: rgba(255, 255, 255, .25); }
.monsters.rar-4 .m-foot, .monsters.rar-5 .m-foot, .monsters.rar-6 .m-foot, .monsters.rar-4 .m-foot b, .monsters.rar-5 .m-foot b, .monsters.rar-6 .m-foot b { color: #fff; }
.monsters.rar-4 .m-bg { background: radial-gradient(ellipse at 50% 45%, rgba(255, 255, 255, .55), transparent 50%), repeating-conic-gradient(from 0deg at 50% 45%, rgba(255, 255, 255, .12) 0 4deg, transparent 4deg 8deg), linear-gradient(180deg, var(--t2), var(--t3)); }
.monsters.rar-5 .cface { background: linear-gradient(145deg, #f6e4a6, #b88a24 30%, #fbefc7 55%, #a37717 80%, #e9cd7d); }
.monsters.rar-5 .m-bg { background: radial-gradient(ellipse at 50% 45%, #fff6d0, transparent 50%), repeating-conic-gradient(from 0deg at 50% 45%, rgba(255, 240, 190, .35) 0 4deg, transparent 4deg 8deg), linear-gradient(180deg, #e2b84a, #8a6414); }
.monsters.rar-5 .m-art img.art { filter: sepia(.85) saturate(2.1) brightness(1.06) contrast(1.05) drop-shadow(0 1cqw 1cqw rgba(60, 40, 0, .4)); }
.monsters.rar-6 .cface { background: #0b0b0d; }
.monsters.rar-6 .m-bg { background: radial-gradient(ellipse at 50% 45%, rgba(255, 255, 255, .2), transparent 50%), conic-gradient(from 0deg at 50% 45%, #ff6f6f33, #ffd65e33, #9cff6a33, #6af2ff33, #7b8bff33, #ff7af033, #ff6f6f33), #0b0b10; }

/* ---- Bounty Seas (wanted posters) ---- */
.card.pirates { background: #2a1a0c; }
.pirates .cface { background: #2a1a0c; }
.p-paper { position: absolute; inset: 2.4cqw; border-radius: 2cqw;
  background: radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, .25), transparent 40%), radial-gradient(ellipse at 80% 85%, rgba(120, 70, 20, .25), transparent 45%), radial-gradient(ellipse at 10% 90%, rgba(120, 70, 20, .2), transparent 35%), radial-gradient(ellipse at 50% 45%, #f3e4bf 0%, #e6d09e 62%, #c9a76a 100%);
  box-shadow: inset 0 0 5cqw rgba(110, 65, 20, .45); }
.p-cost { position: absolute; top: 4.4cqw; left: 4.4cqw; width: 9.6cqw; height: 9.6cqw; border-radius: 50%; display: grid; place-items: center; background: #1f1f1f; color: #fff; font: 700 5.8cqw 'Playfair Display', serif; box-shadow: 0 0 0 .5cqw #e6d09e, 0 0 0 .8cqw #1f1f1f; z-index: 2; }
.p-power { position: absolute; top: 5cqw; right: 5.6cqw; text-align: right; font: 900 4.6cqw/1 'Playfair Display', serif; color: #3a2410; z-index: 2; }
.p-power small { display: block; font: 700 1.9cqw 'Barlow', sans-serif; letter-spacing: .16em; }
.p-wanted { position: absolute; top: 12.5cqw; left: 0; right: 0; text-align: center; font: 900 14.5cqw/1 'Playfair Display', serif; letter-spacing: .06em; color: #2e1c0c; transform: scaleY(1.12); z-index: 2; }
.p-photo { position: absolute; top: 30cqw; left: 9.5cqw; right: 9.5cqw; height: 54cqw; overflow: hidden; box-shadow: 0 0 0 .5cqw #2e1c0c, 0 0 0 1.4cqw #e6d09e, 0 0 0 1.7cqw rgba(46, 28, 12, .6); z-index: 1; }
.p-sea { position: absolute; inset: 0; background: radial-gradient(ellipse 40% 12% at 25% 22%, rgba(255, 255, 255, .8), transparent), radial-gradient(ellipse 30% 9% at 75% 14%, rgba(255, 255, 255, .7), transparent), linear-gradient(180deg, #a9d3e6 0%, #cfe6ee 50%, #5d9cc2 50.5%, #2f6f99 75%, #1d4e72 100%); }
.p-photo img.art { left: 50%; bottom: -1%; height: 100%; transform: translateX(-50%); }
.p-photo .foil-art { inset: 0; }
.pirates.rar-0 .p-photo > :not(.foil-art), .pirates.rar-1 .p-photo > :not(.foil-art) { filter: sepia(.45) contrast(.95) saturate(.85); }
.p-doa { position: absolute; top: 86.5cqw; left: 0; right: 0; display: flex; justify-content: center; align-items: center; gap: 2cqw; font: 900 6.4cqw/1 'Playfair Display', serif; color: #2e1c0c; letter-spacing: .04em; z-index: 2; }
.p-doa i { font-size: 3.4cqw; font-weight: 700; }
.p-name { position: absolute; top: 95.5cqw; left: 6cqw; right: 6cqw; text-align: center; font: 900 6cqw/1.05 'Playfair Display', serif; text-transform: uppercase; color: #2e1c0c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; z-index: 2; }
.p-bounty { position: absolute; top: 103.5cqw; left: 6cqw; right: 6cqw; display: flex; align-items: center; justify-content: center; gap: 1.8cqw; color: #2e1c0c; z-index: 2; }
.p-bounty .coinb { width: 6.6cqw; height: 6.6cqw; }
.p-bounty b { font: 900 9cqw/1 'Playfair Display', serif; letter-spacing: .01em; }
.p-bounty span { font: 700 3.2cqw 'Barlow', sans-serif; letter-spacing: .06em; }
.p-crew { position: absolute; top: 116.5cqw; left: 6cqw; right: 6cqw; text-align: center; font: italic 600 3cqw 'Playfair Display', serif; color: #4b3115; z-index: 2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-foot { position: absolute; bottom: 4.6cqw; left: 6cqw; right: 6cqw; display: flex; justify-content: space-between; font: 700 2.2cqw 'Barlow', sans-serif; letter-spacing: .08em; color: #5b3a1a; z-index: 2; }
.pirates.rar-3 .p-photo { box-shadow: 0 0 0 .5cqw #2e1c0c, 0 0 0 1.4cqw #d9b24c, 0 0 0 1.7cqw #7a5a12; }
/* alt art: the sea takes the whole card */
.pirates.rar-4 .p-paper { background: linear-gradient(180deg, rgba(20, 10, 4, 0) 0 55%, rgba(20, 10, 4, .75) 70%, rgba(20, 10, 4, .92)); box-shadow: none; z-index: 1; }
.pirates.rar-4 .p-photo { inset: 2.4cqw; height: auto; border-radius: 2cqw; box-shadow: none; z-index: 0; }
.pirates.rar-4 .p-sea { background: radial-gradient(circle at 70% 26%, #ffe7a8 0 6%, rgba(255, 200, 120, .5) 7%, transparent 22%), linear-gradient(180deg, #2b1b4d 0%, #b0466a 30%, #f29a5c 48%, #3a2a5a 48.5%, #1f1838 75%, #0c0a18); }
.pirates.rar-4 .p-photo img.art { height: 62%; bottom: 33%; }
.pirates.rar-4 .p-wanted { color: rgba(255, 245, 225, .92); text-shadow: 0 .4cqw 1.4cqw rgba(0, 0, 0, .5); }
.pirates.rar-4 .p-power, .pirates.rar-4 .p-doa, .pirates.rar-4 .p-name, .pirates.rar-4 .p-bounty, .pirates.rar-4 .p-crew, .pirates.rar-4 .p-foot { color: #f3e4bf; }
/* manga gold */
.pirates.rar-5 .cface { background: linear-gradient(145deg, #f6e4a6, #b88a24 30%, #fbefc7 55%, #a37717 80%, #e9cd7d); }
.pirates.rar-5 .p-paper { background: radial-gradient(circle, rgba(0, 0, 0, .09) 0 .3cqw, transparent .38cqw) 0 0 / 1.4cqw 1.4cqw, radial-gradient(ellipse at 50% 40%, #fbf8ef, #e9e3d2); box-shadow: inset 0 0 0 .6cqw #111; }
.pirates.rar-5 .p-sea { background: repeating-linear-gradient(115deg, #fff 0 .8cqw, #e4e4e4 .8cqw 1cqw), #fff; }
.pirates.rar-5 .p-photo { box-shadow: 0 0 0 .6cqw #111, 0 0 0 1.4cqw #d9b24c, 0 0 0 1.8cqw #111; }
.pirates.rar-5 .p-photo img.art { filter: grayscale(1) contrast(1.6) brightness(1.05); }
.pirates.rar-5 .p-wanted, .pirates.rar-5 .p-doa, .pirates.rar-5 .p-name, .pirates.rar-5 .p-bounty, .pirates.rar-5 .p-power { color: #111; }
.pirates.rar-6 .cface { background: #08080a; }
.pirates.rar-6 .p-paper { background: radial-gradient(ellipse at 50% 40%, #26262c, #0c0c0f); box-shadow: inset 0 0 0 .4cqw #c9a646; }
.pirates.rar-6 .p-sea { background: conic-gradient(from 0deg at 50% 50%, #ff6f6f44, #ffd65e44, #9cff6a44, #6af2ff44, #7b8bff44, #ff7af044, #ff6f6f44), #111; }
.pirates.rar-6 .p-wanted, .pirates.rar-6 .p-doa, .pirates.rar-6 .p-name, .pirates.rar-6 .p-bounty, .pirates.rar-6 .p-power, .pirates.rar-6 .p-crew, .pirates.rar-6 .p-foot { color: #e9d38f; }
.pirates.rar-6 .p-photo { box-shadow: 0 0 0 .5cqw #c9a646; }

/* ---- Meme All-Stars (chrome sports) ---- */
.card.allstars { background: #111; }
.allstars .cface { background: var(--c2); }
.s-bg { position: absolute; inset: 0;
  background:
    linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .55)),
    repeating-conic-gradient(from 8deg at 50% 46%, color-mix(in srgb, var(--c1) 14%, transparent) 0 2.5deg, transparent 2.5deg 5deg),
    radial-gradient(circle at 50% 46%, color-mix(in srgb, var(--c1) 55%, #fff) 0, transparent 52%),
    linear-gradient(160deg, color-mix(in srgb, var(--c2) 80%, #fff 6%), var(--c2) 50%, #000 110%); }
.allstars.rar-1 .s-bg { background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .55)), repeating-linear-gradient(135deg, color-mix(in srgb, var(--c1) 30%, transparent) 0 3cqw, transparent 3cqw 6cqw), linear-gradient(160deg, var(--c2), #000); }
.allstars.rar-2 .s-bg, .allstars.rar-3 .s-bg { filter: saturate(.25) brightness(1.25); }
.allstars.rar-3 .cface { background: #0c3a6b; }
.allstars.rar-4 .cface { background: #5a0b1f; }
.allstars.rar-5 .cface { background: #6b4e12; }
.allstars.rar-5 .s-bg { background: linear-gradient(180deg, transparent 55%, rgba(40, 25, 0, .6)), repeating-conic-gradient(from 8deg at 50% 46%, rgba(255, 230, 160, .22) 0 2.5deg, transparent 2.5deg 5deg), radial-gradient(circle at 50% 46%, #fff3c4, transparent 55%), linear-gradient(160deg, #e6c262, #8a6414); }
.allstars.rar-6 .s-bg { background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .7)), repeating-conic-gradient(from 8deg at 50% 46%, rgba(255, 255, 255, .05) 0 2.5deg, transparent 2.5deg 5deg), radial-gradient(circle at 50% 46%, #3a3a44, transparent 55%), #050507; }
.s-num { position: absolute; top: 8cqw; right: -3cqw; font: 700 74cqw/1 'Oswald', sans-serif; color: transparent; -webkit-text-stroke: .45cqw rgba(255, 255, 255, .18); letter-spacing: -.04em; }
.s-brand { position: absolute; top: 5cqw; left: 5.4cqw; font: 700 italic 4.6cqw/1 'Oswald', sans-serif; color: #fff; letter-spacing: .04em; z-index: 3; }
.s-brand small { display: block; font: 500 2cqw 'Oswald', sans-serif; letter-spacing: .14em; color: rgba(255, 255, 255, .75); font-style: normal; margin-top: .8cqw; }
.s-rc { position: absolute; top: 4.6cqw; right: 5cqw; font: 700 3.6cqw/1 'Oswald', sans-serif; color: var(--c2); background: #fff; padding: 1cqw 1.4cqw; border-radius: .8cqw; z-index: 3; }
.s-serial { position: absolute; top: 4.4cqw; right: 4.4cqw; font: 700 4.2cqw/1 var(--mono); color: #1b1b1b; padding: 1.2cqw 1.8cqw; border-radius: .8cqw; z-index: 3; background: linear-gradient(135deg, #d8dbe0, #ffffff 40%, #9aa1aa 70%, #f2f3f5); box-shadow: 0 .3cqw .8cqw rgba(0, 0, 0, .4); }
.allstars.rar-5 .s-serial { background: linear-gradient(135deg, #b98a24, #fff0b8 40%, #9a6f12 70%, #f2d27a); }
.allstars.rar-6 .s-serial { background: linear-gradient(135deg, #222, #555 40%, #111 70%, #444); color: #fff; }
.s-serial i { font-style: normal; opacity: .55; margin: 0 .3cqw; }
.card img.s-player { left: 50%; bottom: 26.5cqw; width: 84%; transform: translateX(-50%); z-index: 2; filter: drop-shadow(0 0 .9cqw rgba(255, 255, 255, .9)) drop-shadow(0 1.6cqw 2.4cqw rgba(0, 0, 0, .55)); }
.allstars .foil-art { inset: 0; z-index: 1; }
.allstars.rar-2 .foil-art, .allstars.rar-3 .foil-art { opacity: calc(.18 + var(--o) * .4); }
.s-auto { position: absolute; bottom: 29cqw; left: 13cqw; right: 13cqw; height: 15cqw; border-radius: 1cqw; background: rgba(255, 255, 255, .93); box-shadow: 0 .3cqw 1cqw rgba(0, 0, 0, .35); transform: rotate(-2deg); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 4; }
.s-auto span { font: 11cqw/0.9 'Mrs Saint Delafield', cursive; color: #1b3db8; white-space: nowrap; }
.s-auto small { font: 600 1.7cqw 'Oswald', sans-serif; letter-spacing: .2em; color: #555; margin-top: .6cqw; }
.s-plate { position: absolute; left: 0; right: 0; bottom: 12.5cqw; height: 15cqw; background: var(--c1); clip-path: polygon(0 24%, 100% 0, 100% 76%, 0 100%); display: flex; flex-direction: column; justify-content: center; padding: 0 6cqw; z-index: 3; }
.s-plate b { font: 700 7.4cqw/1 'Oswald', sans-serif; text-transform: uppercase; color: #fff; letter-spacing: .01em; text-shadow: 0 .3cqw 0 rgba(0, 0, 0, .35); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-plate span { font: 600 2.6cqw 'Oswald', sans-serif; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .85); margin-top: .6cqw; }
.allstars.rar-5 .s-plate { background: linear-gradient(90deg, #a77a12, #f3d27a, #a77a12); }
.allstars.rar-6 .s-plate { background: linear-gradient(90deg, #111, #3a3a40, #111); }
.s-val { position: absolute; left: 5cqw; bottom: 4.4cqw; display: flex; align-items: center; gap: 1.4cqw; color: #fff; z-index: 3; }
.s-val .coinb { width: 5cqw; height: 5cqw; }
.s-val b { font: 700 4cqw var(--mono); }
.s-val span { font: 600 2.6cqw 'Oswald', sans-serif; letter-spacing: .08em; color: rgba(255, 255, 255, .75); }
.s-foot { position: absolute; right: 5cqw; bottom: 5cqw; font: 600 2.4cqw 'Oswald', sans-serif; letter-spacing: .12em; color: rgba(255, 255, 255, .6); z-index: 3; }

/* ---------- graded slab ---------- */
.slab { container-type: inline-size; position: relative; width: 100%; padding: 3.2% 4% 4.4%; border-radius: 3.4% / 2.2%;
  background: linear-gradient(135deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .06) 40%, rgba(255, 255, 255, .12) 70%, rgba(255, 255, 255, .05));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35), inset 0 0 0 7px rgba(255, 255, 255, .035), inset 0 0 0 8px rgba(255, 255, 255, .14), 0 24px 50px rgba(0, 0, 0, .55); }
.slab::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .12) 38%, transparent 46%); }
.slab-label { position: relative; height: 19cqw; border-radius: 1.4cqw; background: #fbfbf9; color: #111; display: grid; grid-template-columns: 1fr auto; grid-template-rows: 1fr auto; padding: 1.8cqw 2.6cqw 1.4cqw; box-shadow: inset 0 0 0 .7cqw #c8102e; }
.slab.g10 .slab-label { box-shadow: inset 0 0 0 .7cqw #b8912e; }
.sl-l { display: flex; flex-direction: column; justify-content: center; gap: .2cqw; min-width: 0; padding-left: 1cqw; }
.sl-l b, .sl-l span { font: 700 2.7cqw/1.25 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .02em; }
.sl-l span { font-weight: 600; }
.sl-r { text-align: right; padding-right: 1cqw; display: flex; flex-direction: column; justify-content: center; }
.sl-r small { font: 700 2.4cqw var(--sans); letter-spacing: .06em; }
.sl-r b { font: 800 8.4cqw/1 var(--sans); }
.sl-bar { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; padding: 0 1cqw; font: 600 2.1cqw var(--mono); color: #444; }
.bars { display: flex; gap: .45cqw; height: 2.6cqw; }
.bars i { background: #111; display: block; height: 100%; }
.slab-well { margin-top: 3cqw; padding: 2.6cqw; border-radius: 2cqw; background: rgba(0, 0, 0, .18); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), inset 0 2px 10px rgba(0, 0, 0, .4); }
.slab-well .card { box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }

/* =====================================================================
   PACK OPENING  (a rip mat under a desk lamp)
   ===================================================================== */
.opener { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; overflow: hidden;
  background: radial-gradient(ellipse 60% 50% at 50% 42%, #2a2a2e 0%, #18181b 55%, #0b0b0c 100%); animation: fadein .3s ease; }
.opener::before { /* mat texture */ content: ''; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px), radial-gradient(rgba(0, 0, 0, .25) 1px, transparent 1px); background-size: 3px 3px, 5px 5px; background-position: 0 0, 1px 2px; }
@keyframes fadein { from { opacity: 0; } }
.op-head { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; height: 60px; padding: 0 20px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.op-head b { font-weight: 600; }
.op-head span { color: var(--muted); font-size: 13px; margin-left: 10px; }
.op-x { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line2); background: transparent; display: grid; place-items: center; color: var(--muted); }
.op-x:hover { color: var(--text); border-color: #55555e; }
.op-stage { position: relative; flex: 1; display: grid; place-items: center; z-index: 2; --cw: min(290px, 66vw, calc((100dvh - 290px) * .716)); }
.op-pack { position: relative; width: calc(var(--cw) * 1.04); aspect-ratio: 300 / 470; touch-action: none; cursor: grab; animation: packin .55s cubic-bezier(.2, .9, .3, 1.1); }
@keyframes packin { from { transform: translateY(40px) scale(.9); opacity: 0; } }
.op-pack img { position: absolute; inset: 0; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.op-pack .pk-top { clip-path: polygon(0 0, 100% 0, 100% 11.2%, 0 11.2%); transform-origin: 100% 11%; transition: transform .1s; filter: drop-shadow(0 12px 20px rgba(0, 0, 0, .5)); }
.op-pack .pk-body { clip-path: polygon(0 11%, 100% 11%, 100% 100%, 0 100%); filter: drop-shadow(0 18px 28px rgba(0, 0, 0, .55)); transition: transform .6s cubic-bezier(.5, 0, .6, 1), opacity .5s; }
.op-pack .pk-sheen { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .7) 45%, transparent 60%); background-size: 250% 100%; animation: sheen 3.2s ease-in-out infinite; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
@keyframes sheen { 0% { background-position: 120% 0; } 60%, 100% { background-position: -40% 0; } }
.tear { position: absolute; left: 0; top: 11%; height: 2px; width: 0; background: #fff; box-shadow: 0 0 6px rgba(255, 255, 255, .8); border-radius: 2px; pointer-events: none; }
.op-pack.ripped .pk-top { transition: transform .7s cubic-bezier(.3, .6, .3, 1), opacity .7s; transform: translate(60%, -140%) rotate(28deg); opacity: 0; }
.op-pack.ripped .pk-body { transform: translateY(70%); opacity: 0; }
.op-pack.ripped .pk-sheen, .op-pack.ripped .tear { display: none; }
.op-hint { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 10px; white-space: nowrap; z-index: 3; }
.op-hint .btn { height: 32px; }

.op-stack { position: absolute; width: var(--cw); aspect-ratio: 63 / 88; }
.flip { position: absolute; inset: 0; perspective: 1400px; cursor: pointer; transition: transform .55s cubic-bezier(.2, .8, .2, 1), opacity .4s; }
.flip-in { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .75s cubic-bezier(.25, .8, .25, 1); }
.flip.flipped .flip-in { transform: rotateY(180deg); }
.flip-back, .flip-front { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip-front { transform: rotateY(180deg); }
.flip .card { box-shadow: 0 2px 3px rgba(0, 0, 0, .4), 0 22px 40px rgba(0, 0, 0, .5); }
.flip.rise { animation: rise .6s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes rise { from { transform: translateY(55%) scale(.92); opacity: 0; } }
.flip.out { transform: translate(var(--ox, 120%), var(--oy, 10%)) rotate(var(--orot, 8deg)) scale(.5); opacity: 0; pointer-events: none; }
.flip.hint-glow .flip-back .card { animation: edge 1.1s ease-in-out infinite; }
@keyframes edge { 50% { box-shadow: 0 0 0 1px rgba(255, 255, 255, .25), 0 0 26px 2px var(--hc), 0 22px 40px rgba(0, 0, 0, .5); } }
.flip.shake { animation: shake .5s ease-in-out 2; }
@keyframes shake { 20% { transform: rotate(-1.4deg); } 40% { transform: rotate(1.2deg); } 60% { transform: rotate(-.8deg); } 80% { transform: rotate(.5deg); } }
.op-info { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); text-align: center; z-index: 3; min-height: 54px; width: min(520px, 92vw); }
.op-info .rn { display: inline-flex; align-items: center; gap: 8px; height: 24px; padding: 0 10px; border-radius: 99px; font: 700 11px var(--sans); letter-spacing: .08em; text-transform: uppercase; border: 1px solid currentColor; }
.op-info .nm { margin-top: 8px; font-weight: 600; font-size: 15px; }
.op-info .vl { margin-top: 2px; font: 600 13px var(--mono); color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 6px; }
.op-info .vl .coinb { width: 16px; height: 16px; }
.op-info.pop > * { animation: pop .35s cubic-bezier(.2, .9, .3, 1.3) both; }
.op-info.pop > *:nth-child(2) { animation-delay: .06s; }
.op-info.pop > *:nth-child(3) { animation-delay: .12s; }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }
.op-dealt { position: relative; z-index: 2; height: 108px; display: flex; justify-content: center; gap: 10px; padding: 0 16px 18px; }
.op-dealt .card { width: 64px; flex: none; animation: deal .4s cubic-bezier(.2, .8, .2, 1) both; cursor: pointer; }
@keyframes deal { from { transform: translateY(-30px) scale(1.2); opacity: 0; } }
.flash { position: fixed; inset: 0; background: #fff; z-index: 95; pointer-events: none; animation: flash .7s ease-out forwards; }
@keyframes flash { from { opacity: .35; } to { opacity: 0; } }

/* summary */
.op-sum { position: absolute; inset: 60px 0 0; z-index: 4; background: #111113 !important; overflow-y: auto; display: flex; justify-content: center; padding: 28px 16px 40px; background: rgba(12, 12, 14, .7); backdrop-filter: blur(6px); animation: fadein .3s; }
.sum { width: min(980px, 100%); }
.sum-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.sum-top h2 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.sum-top p { margin: 4px 0 0; color: var(--muted); }
.sum-total { text-align: right; }
.sum-total small { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.sum-total b { font: 700 26px var(--mono); }
.sum-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.sum-cards .card { cursor: pointer; }
.sum-meta { margin-top: 10px; font-size: 12.5px; }
.sum-meta b { display: block; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sum-meta span { color: var(--muted); display: flex; align-items: center; gap: 6px; }
.sum-meta .coinb { width: 14px; height: 14px; }
.sum-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); align-items: center; }
.sum-actions .note { color: var(--muted); font-size: 13px; margin-right: auto; }

/* rarity tags */
.rt { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 4px; font: 700 10.5px var(--sans); letter-spacing: .04em; text-transform: uppercase; background: var(--s3); color: var(--muted); white-space: nowrap; }
.rt.r2 { color: #8fd3ff; background: #11283a; }
.rt.r3 { color: #c9b2ff; background: #241a3d; }
.rt.r4 { color: #ff9fd6; background: #3a1530; }
.rt.r5 { color: #ffd77a; background: #3a2c0c; }
.rt.r6 { color: #0e0e10; background: linear-gradient(90deg, #ff9f9f, #ffe39f, #a6ffa6, #9ff1ff, #b3a6ff, #ffa6ef); }
.gb { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 4px; font: 700 11px var(--mono); background: #f4f4f2; color: #111; }
.gb.g10 { background: #e8c766; }

/* =====================================================================
   COLLECTION / VAULT / LIVE
   ===================================================================== */
.setrows { display: grid; gap: 12px; }
.setrow { display: grid; grid-template-columns: 220px 1fr auto; gap: 20px; align-items: center; padding: 16px 18px; }
.setrow h4 { margin: 0; font-size: 15px; font-weight: 650; }
.setrow p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.prog { height: 4px; border-radius: 2px; background: var(--s3); margin-top: 10px; overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--text); border-radius: 2px; }
.slots { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
.slot { aspect-ratio: 63 / 88; border-radius: 6px; border: 1px dashed var(--line2); display: grid; place-items: center; color: var(--dim); font: 600 11px var(--mono); overflow: hidden; position: relative; }
.slot.have { border: 0; }
.slot .card { width: 100%; }
.slot.have::after { content: ''; position: absolute; inset: 0; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); pointer-events: none; }
.bonus { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; min-width: 170px; }
.bonus span { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.bonus span.ok { color: var(--green); }
.bonus i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid currentColor; display: grid; place-items: center; flex: none; }
.bonus .ok i::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 32px 0 18px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; padding: 3px; background: var(--bg2); }
.seg button { border: 0; background: none; height: 30px; padding: 0 12px; border-radius: 6px; color: var(--muted); font-weight: 500; font-size: 13px; }
.seg button.on { background: var(--s3); color: var(--text); }
.sel { height: 38px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg2); padding: 0 32px 0 12px; font-size: 13px; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238e8e97' fill='none' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.tools .sp { flex: 1; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 28px 20px; }
.item { position: relative; cursor: pointer; content-visibility: auto; contain-intrinsic-size: 168px 300px; }
.item .meta { margin-top: 10px; font-size: 12.5px; }
.item .meta b { display: block; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .meta .r { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.item .meta .v { display: flex; align-items: center; gap: 6px; margin-top: 6px; font: 600 12.5px var(--mono); }
.item .meta .v small { color: var(--muted); font-weight: 500; }
.item .meta .coinb { width: 15px; height: 15px; }
.item .tick { position: absolute; top: 8px; left: 8px; z-index: 20; width: 22px; height: 22px; border-radius: 6px; background: rgba(14, 14, 16, .75); border: 1.5px solid rgba(255, 255, 255, .7); display: none; place-items: center; }
.selecting .item .tick { display: grid; }
.item.on .tick { background: var(--text); border-color: var(--text); }
.item.on .tick::after { content: ''; width: 9px; height: 5px; border-left: 2px solid #111; border-bottom: 2px solid #111; transform: rotate(-45deg) translate(1px, -1px); }
.item.on .card { outline: 2px solid var(--text); outline-offset: 3px; }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line2); border-radius: 12px; }
.empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }
.bulk { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 18px; border-radius: 12px; background: var(--s2); border: 1px solid var(--line2); box-shadow: 0 20px 40px rgba(0, 0, 0, .5); font-size: 13px; white-space: nowrap; }

.vault-top { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.balance { padding: 24px; }
.balance small { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.balance .big { font: 700 40px/1.1 var(--mono); letter-spacing: -.02em; margin: 6px 0 4px; }
.balance .row { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.meter { margin-top: 18px; font-size: 12.5px; color: var(--muted); }
.meter .prog i { background: var(--green); }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.t th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 10px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 12px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t tr:last-child td { border-bottom: 0; }
.t td.r, .t th.r { text-align: right; }
.t .coinb { width: 22px; height: 22px; }
.t .cn { display: flex; align-items: center; gap: 10px; }
.t .cn small { color: var(--muted); display: block; font-size: 12px; }
.t .zero { color: var(--dim); }
.twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 10px 14px; font-size: 13px; align-items: center; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-family: var(--mono); font-size: 12px; word-break: break-all; }
.inp { height: 38px; border-radius: 8px; border: 1px solid var(--line2); background: var(--bg); padding: 0 12px; font-size: 13px; width: 100%; }
.inp:focus { outline: none; border-color: #5a5a64; }
.odds td, .odds th { padding: 8px 12px; font-size: 12.5px; }
.odds td { font-family: var(--mono); }

.live-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; align-items: start; }
.feed-row td:first-child { width: 70px; color: var(--muted); font-size: 12px; }
.feed-row .fc { display: flex; align-items: center; gap: 12px; }
.feed-row .fc .card { width: 36px; flex: none; border-radius: 2px; }
.feed-row .fc b { font-weight: 600; display: block; }
.feed-row .fc small { color: var(--muted); }
.bot { font: 600 9.5px var(--sans); letter-spacing: .06em; color: var(--dim); border: 1px solid var(--line2); border-radius: 3px; padding: 0 4px; margin-left: 6px; vertical-align: 1px; }
.chat { display: flex; flex-direction: column; height: 420px; }
.chat-log { flex: 1; overflow-y: auto; padding: 12px 18px; font-size: 13px; display: flex; flex-direction: column; gap: 8px; }
.chat-log b { font-weight: 600; margin-right: 6px; }
.chat-log .sys { color: var(--muted); font-size: 12px; }
.chat form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 85; background: rgba(6, 6, 8, .72); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; animation: fadein .2s; overflow-y: auto; }
.mbox { width: min(440px, 100%); background: var(--bg2); border: 1px solid var(--line2); border-radius: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); position: relative; }
.mbox.wide { width: min(920px, 100%); }
.mbox .op-x { position: absolute; top: 12px; right: 12px; z-index: 2; }
.mpad { padding: 26px; }
.mbox h3 { margin: 0 0 6px; font-size: 20px; letter-spacing: -.02em; }
.mbox p.lead { margin: 0 0 20px; color: var(--muted); }
.field { display: flex; gap: 8px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--dim); font-size: 12px; margin: 16px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.err { color: var(--red); font-size: 13px; min-height: 20px; margin-top: 10px; }
.err a { color: inherit; }
.fine { color: var(--dim); font-size: 12px; margin-top: 16px; }
.inspect { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 32px; align-items: center; }
.insp-card { display: grid; place-items: center; perspective: 1200px; }
.insp-card > * { width: min(330px, 100%); }
.insp-card .slab { width: min(360px, 100%); }
.insp-info h3 { font-size: 22px; }
.insp-info .kv { margin: 18px 0 22px; }
.insp-info .kv dd { font-size: 12.5px; }
.insp-info .valbig { display: flex; align-items: center; gap: 10px; font: 700 22px var(--mono); }
.insp-info .valbig .coinb { width: 26px; height: 26px; }
.insp-info .usd { color: var(--muted); font: 500 13px var(--mono); margin-top: 2px; }
.insp-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- toasts ---------- */
#toasts { position: fixed; left: 50%; top: 72px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--s2); border: 1px solid var(--line2); color: var(--text); padding: 10px 16px; border-radius: 10px; font-size: 13.5px; box-shadow: 0 12px 30px rgba(0, 0, 0, .5); animation: tin .25s ease; max-width: 92vw; display: flex; align-items: center; gap: 10px; }
.toast.out { opacity: 0; transform: translateY(-6px); transition: .3s; }
.toast .coinb { width: 18px; height: 18px; }
@keyframes tin { from { opacity: 0; transform: translateY(-6px); } }

footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 26px 24px; color: var(--dim); font-size: 12.5px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; max-width: 1280px; margin-left: auto; margin-right: auto; }

/* bottom nav (phones) */
.bnav { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .daily span { display: none; }
  .top { gap: 16px; }
  .floor { justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; gap: 28px; padding: 36px 24px 30px; scrollbar-width: none; }
  .floor::-webkit-scrollbar { display: none; }
  .vm { scroll-snap-align: center; }
  .live-grid, .vault-top, .twocol { grid-template-columns: 1fr; }
  .setrow { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 760px) {
  .top { padding: 0 14px; gap: 10px; height: 56px; }
  .tabs { display: none; }
  .chip.vault { display: none; }
  .chip .sub { display: none; }
  .daily span { display: none; }
  main { padding: 0 16px 100px; }
  .page-head { padding: 24px 0 16px; }
  .page-head h1 { font-size: 23px; }
  .stats { width: 100%; }
  .stat { flex: 1; min-width: 0; padding: 8px 12px; }
  .stat b { font-size: 15px; }
  .room { margin: 0 -16px; border-radius: 0; border-left: 0; border-right: 0; }
  .floor { padding: 30px 16px 24px; }
  .steps { grid-template-columns: 1fr; }
  .step { border-right: 0; border-bottom: 1px solid var(--line); }
  .step:last-child { border-bottom: 0; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; }
  .slots { grid-template-columns: repeat(4, 1fr); }
  .sum-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .sum-actions .note { width: 100%; }
  .sum-actions .btn { flex: 1; }
  .inspect { grid-template-columns: 1fr; padding: 22px; gap: 22px; }
  .insp-card > * { width: min(260px, 100%); }
  .insp-card .slab { width: min(290px, 100%); }
  .t th, .t td { padding: 10px 12px; }
  .hide-sm { display: none; }
  .bnav { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; height: 62px; padding-bottom: env(safe-area-inset-bottom); background: rgba(14, 14, 16, .94); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
  .bnav button { background: none; border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--muted); }
  .bnav button.on { color: var(--text); }
  .bnav svg.i { width: 20px; height: 20px; }
  .op-dealt { height: 92px; }
  .op-hint { top: 72px; bottom: auto; font-size: 12px; }
  .op-dealt .card { width: 52px; }
  .bulk { bottom: 76px; }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track, .card.sway, .pk-sheen { animation: none !important; }
}

/* small cards: fine print is unreadable at this size anyway, so leave just the printed layout */
@container (max-width: 160px) {
  .an p, .m-strip, .m-foot, .m-stage, .valuebar small, .valuebar span, .p-crew, .p-foot, .p-power small, .p-bounty span,
  .s-brand small, .s-foot, .s-auto small, .s-plate span, .s-val span, .cb-sub { visibility: hidden; }
}
@container (max-width: 100px) {
  .m-top, .m-atk, .valuebar, .p-cost, .p-power, .p-doa, .p-name, .p-bounty, .s-brand, .s-rc, .s-serial, .s-plate b, .s-val, .s-auto span, .s-num, .cb-logo { visibility: hidden; }
  .p-wanted { font-size: 15cqw; }
}

/* =====================================================================
   3D VENDING FLOOR
   ===================================================================== */
.world { position: relative; margin: 0 calc(50% - 50vw); height: calc(100svh - 94px); min-height: 540px; max-height: 920px; overflow: hidden; background: #0a0a0c; border-bottom: 1px solid var(--line); }
.world canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: pixelated; image-rendering: crisp-edges; touch-action: pan-y; }
.w-head { position: absolute; left: 28px; top: 24px; z-index: 2; max-width: 380px; pointer-events: none; transition: opacity .3s, transform .3s; }
.w-head h1 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.025em; text-shadow: 0 2px 12px rgba(0, 0, 0, .6); }
.w-head p { margin: 6px 0 14px; color: #b9b9c2; font-size: 13.5px; text-shadow: 0 1px 8px rgba(0, 0, 0, .8); }
.w-head .stats { pointer-events: auto; background: rgba(14, 14, 16, .72); backdrop-filter: blur(8px); border-color: rgba(255, 255, 255, .08); display: inline-flex; }
.w-head .stat { min-width: 0; padding: 8px 14px; }
.w-head .stat b { font-size: 15px; }
.world.focused .w-head { opacity: 0; transform: translateY(-6px); }
.w-hint { position: absolute; right: 28px; top: 24px; z-index: 2; font-size: 12.5px; color: #c9c9d1; background: rgba(14, 14, 16, .7); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .08); padding: 7px 14px; border-radius: 99px; white-space: nowrap; pointer-events: none; }
.w-tag { position: absolute; left: 0; top: 0; z-index: 2; border: 1px solid rgba(255, 255, 255, .1); background: rgba(14, 14, 16, .74); backdrop-filter: blur(6px); border-radius: 8px; padding: 6px 11px; text-align: center; transition: opacity .25s, border-color .2s, background .2s; white-space: nowrap; }
.w-tag b { display: block; font-size: 12.5px; font-weight: 600; }
.w-tag span { display: block; font-size: 11px; color: var(--muted); }
.w-tag.on, .w-tag:hover { border-color: rgba(255, 255, 255, .35); background: rgba(24, 24, 28, .9); }
.w-load { position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--muted); font-size: 13px; background: #0a0a0c; }
.w-load span { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #2a2a30; border-top-color: #ececef; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.w-panel { position: absolute; z-index: 3; right: 28px; top: 50%; transform: translateY(-50%); width: 340px; padding: 22px; border-radius: 14px; background: rgba(16, 16, 19, .86); backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, .09); box-shadow: 0 30px 60px rgba(0, 0, 0, .5); animation: pin .35s cubic-bezier(.2, .8, .2, 1); }
@keyframes pin { from { opacity: 0; transform: translateY(-50%) translateX(12px); } }
.w-panel small { font: 600 11px var(--mono); color: var(--dim); letter-spacing: .04em; }
.w-panel h2 { margin: 4px 0 4px; font-size: 22px; letter-spacing: -.02em; }
.w-panel p { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.w-back { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; padding: 0; color: var(--muted); font-size: 12.5px; margin-bottom: 16px; }
.w-back:hover { color: var(--text); }
.w-tiers { display: grid; gap: 8px; }
.w-tier { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line2); background: var(--s1); transition: border-color .15s, background .15s, transform .08s; }
.w-tier:hover { border-color: #55555e; background: var(--s2); }
.w-tier:active { transform: translateY(1px); }
.w-tier b { width: 34px; height: 34px; border-radius: 6px; display: grid; place-items: center; font-weight: 800; color: #1b1b1d; background: linear-gradient(180deg, #f2f3f5, #c8ccd1); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .18); }
.w-tier.grail b { background: linear-gradient(180deg, #ffe08a, #c99a2e); }
.w-tier strong { display: block; font-weight: 600; font-size: 14px; }
.w-tier em { display: block; font-style: normal; color: var(--muted); font-size: 12px; font-family: var(--mono); }
.w-tier i { font-style: normal; font: 700 12px var(--mono); color: var(--accent); }
.w-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; font-size: 12.5px; color: var(--muted); }
.w-foot b { color: var(--text); font-family: var(--mono); }
/* the rip mat lets the shop show through, softly */
.opener { background: radial-gradient(ellipse 60% 50% at 50% 42%, rgba(42, 42, 46, .88) 0%, rgba(24, 24, 27, .9) 55%, rgba(11, 11, 12, .95) 100%); backdrop-filter: blur(10px); }
@media (max-width: 760px) {
  .world { height: calc(100svh - 90px - 62px); min-height: 520px; }
  .w-head { left: 16px; right: 16px; top: 16px; }
  .w-head h1 { font-size: 21px; }
  .w-head p { display: none; }
  .w-head .stats { margin-top: 10px; }
  .w-panel { left: 12px; right: 12px; bottom: 12px; top: auto; width: auto; transform: none; padding: 16px; animation: pup .35s cubic-bezier(.2, .8, .2, 1); }
  @keyframes pup { from { opacity: 0; transform: translateY(14px); } }
  .w-panel p { display: none; }
  .w-panel h2 { font-size: 18px; margin-bottom: 12px; }
  .w-back { margin-bottom: 10px; }
  .w-tier { padding: 8px 10px; }
  .w-tag { padding: 4px 8px; }
  .w-hint { top: auto; bottom: 16px; right: 50%; transform: translateX(50%); }
  .w-tag span { display: none; }
  .w-tag b { font-size: 11px; }
}
.logo-img { width: 30px; height: 30px; border-radius: 7px; image-rendering: pixelated; display: block; }
.xlink { text-decoration: none; color: var(--text); }
footer a { color: var(--muted); text-underline-offset: 3px; }
footer a:hover { color: var(--text); }
.w-x { position: absolute; left: 28px; bottom: 22px; z-index: 2; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 99px; font-size: 12.5px; font-weight: 600; color: var(--text); text-decoration: none; background: rgba(14, 14, 16, .74); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .12); }
.w-x:hover { border-color: rgba(255, 255, 255, .35); }
.world.focused .w-x { opacity: 0; pointer-events: none; }
@media (max-width: 760px) { .w-x { left: auto; right: 16px; bottom: auto; top: 16px; height: 30px; padding: 0 11px; font-size: 0; gap: 0; } .w-x svg { width: 14px; height: 14px; } }
