/* =========================================================
   HODLER — components
   ========================================================= */

/* ---------- Pixel-stepped panel ---------- */
.px {
  --pc: var(--line-2);
  position: relative;
  background: linear-gradient(180deg, rgba(20,20,36,.92), rgba(13,13,22,.92));
  margin: 4px;
  box-shadow:
    0 -4px 0 0 var(--pc), 0 4px 0 0 var(--pc),
    -4px 0 0 0 var(--pc), 4px 0 0 0 var(--pc),
    inset 0 4px 0 0 rgba(255,255,255,.04),
    inset 0 -4px 0 0 rgba(0,0,0,.35);
}
.px--y { --pc: var(--yellow); }
.px--glow { box-shadow:
    0 -4px 0 0 var(--pc), 0 4px 0 0 var(--pc),
    -4px 0 0 0 var(--pc), 4px 0 0 0 var(--pc),
    0 0 40px -8px var(--pc); }
.hud-label {
  font-family: var(--f-pixel); font-size: 9px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--dim); display: flex; align-items: center; gap: 8px;
}
.hud-label::before { content: ""; width: 8px; height: 8px; background: var(--yellow); }

/* ---------- Buttons ---------- */
.btn {
  --b: var(--yellow); --bt: #111; --hi: #ffe27a; --lo: #b88a00; --depth: #000;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; margin: 4px 4px 10px;
  border: 0; background: var(--b); color: var(--bt);
  font-family: var(--f-pixel); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; line-height: 1;
  white-space: nowrap; user-select: none; -webkit-tap-highlight-color: transparent;
  box-shadow:
    inset -4px -4px 0 0 var(--lo), inset 4px 4px 0 0 var(--hi),
    0 -4px 0 0 #000, 0 4px 0 0 #000, -4px 0 0 0 #000, 4px 0 0 0 #000,
    0 10px 0 0 var(--depth);
  transform: translateY(0);
  transition: transform .06s steps(2), box-shadow .06s steps(2), filter .15s;
}
.btn:hover { filter: brightness(1.08); color: var(--bt); }
.btn:active, .btn.is-pressed {
  transform: translateY(6px);
  box-shadow:
    inset -4px -4px 0 0 var(--lo), inset 4px 4px 0 0 var(--hi),
    0 -4px 0 0 #000, 0 4px 0 0 #000, -4px 0 0 0 #000, 4px 0 0 0 #000,
    0 4px 0 0 var(--depth);
}
.btn[disabled], .btn.is-disabled { filter: grayscale(.8) brightness(.6); cursor: not-allowed; transform: none; }
.btn--ghost { --b: var(--bg-3); --bt: var(--text); --hi: #2a2a44; --lo: #08080f; }
.btn--ghost:hover { color: var(--yellow); }
.btn--epic { --b: var(--epic); --bt: #fff; --hi: #c99bff; --lo: #6b21a8; }
.btn--rare { --b: var(--rare); --bt: #021; --hi: #8af1ff; --lo: #0e7490; }
.btn--common { --b: #c9ced3; --bt: #111; --hi: #f1f3f5; --lo: #6b7178; }
.btn--danger { --b: var(--danger); --bt: #fff; --hi: #ff8ca0; --lo: #9b1c35; }
.btn--sm { min-height: 44px; padding: 0 14px; font-size: 9px; }
.btn--block { width: calc(100% - 8px); }
.btn .spin { width: 12px; height: 12px; background: currentColor; animation: pxspin .6s steps(4) infinite; }
@keyframes pxspin { 0% { clip-path: inset(0 50% 50% 0); } 25% { clip-path: inset(0 0 50% 50%); } 50% { clip-path: inset(50% 0 0 50%); } 75% { clip-path: inset(50% 50% 0 0); } }

.icon-btn {
  min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; color: var(--muted);
}
.icon-btn:hover { color: var(--yellow); }

/* ---------- Glitch wordmark ---------- */
.glitch { position: relative; display: inline-block; color: var(--text); }
.glitch::before, .glitch::after {
  content: attr(data-text); position: absolute; inset: 0; pointer-events: none;
}
.glitch::before { color: var(--yellow); transform: translate(2px, 0); clip-path: inset(0 0 60% 0); animation: glitchA 3.2s steps(1) infinite; mix-blend-mode: screen; }
.glitch::after { color: var(--rare); transform: translate(-2px, 0); clip-path: inset(55% 0 0 0); animation: glitchB 2.7s steps(1) infinite; mix-blend-mode: screen; }
@keyframes glitchA {
  0%, 86%, 100% { transform: translate(0); clip-path: inset(0 0 100% 0); }
  87% { transform: translate(3px, -1px); clip-path: inset(10% 0 60% 0); }
  90% { transform: translate(-3px, 1px); clip-path: inset(40% 0 30% 0); }
  93% { transform: translate(2px, 0); clip-path: inset(70% 0 5% 0); }
}
@keyframes glitchB {
  0%, 80%, 100% { transform: translate(0); clip-path: inset(100% 0 0 0); }
  81% { transform: translate(-3px, 1px); clip-path: inset(60% 0 10% 0); }
  85% { transform: translate(3px, -1px); clip-path: inset(20% 0 55% 0); }
  88% { transform: translate(-1px, 0); clip-path: inset(5% 0 80% 0); }
}

/* ---------- Badges / chips ---------- */
.rank {
  --rc: var(--common);
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f-pixel); font-size: 8px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--rc); padding: 6px 8px; background: color-mix(in srgb, var(--rc) 14%, transparent);
  box-shadow: 0 -2px 0 0 var(--rc), 0 2px 0 0 var(--rc), -2px 0 0 0 var(--rc), 2px 0 0 0 var(--rc);
  margin: 2px; line-height: 1;
}
.rank::before { content: ""; width: 6px; height: 6px; background: var(--rc); }
.rank--common { --rc: var(--common); }
.rank--epic { --rc: var(--epic); }
.rank--rare { --rc: var(--rare); }
.rank--legendary { --rc: var(--legendary); }
.preview-tag {
  font-family: var(--f-pixel); font-size: 7px; letter-spacing: .1em; color: #000; background: var(--yellow-2);
  padding: 5px 6px; text-transform: uppercase; line-height: 1;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  --cc: var(--yellow);
  min-height: 44px; padding: 0 14px; margin: 2px;
  background: var(--bg-2); border: 0; color: var(--muted);
  font-family: var(--f-pixel); font-size: 9px; text-transform: uppercase; letter-spacing: .06em;
  box-shadow: 0 -2px 0 0 var(--line-2), 0 2px 0 0 var(--line-2), -2px 0 0 0 var(--line-2), 2px 0 0 0 var(--line-2);
  display: inline-flex; align-items: center; gap: 8px;
}
.chip i { width: 8px; height: 8px; background: var(--cc); }
.chip:hover { color: var(--text); }
.chip[aria-pressed="true"], .chip.is-active {
  color: #000; background: var(--cc);
  box-shadow: 0 -2px 0 0 #000, 0 2px 0 0 #000, -2px 0 0 0 #000, 2px 0 0 0 #000, 0 0 18px -4px var(--cc);
}
.chip[aria-pressed="true"] i, .chip.is-active i { background: #000; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 4px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto; min-height: 48px; padding: 0 18px; border: 0; background: transparent; color: var(--dim);
  font-family: var(--f-pixel); font-size: 10px; text-transform: uppercase; letter-spacing: .06em;
  position: relative; display: inline-flex; align-items: center; gap: 8px;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--yellow); background: rgba(240,185,11,.07); }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 4px; background: var(--yellow); }
.tab .count { font-family: var(--f-num); font-size: 18px; color: var(--muted); }

/* ---------- NFT card (tilt + holo) ---------- */
.nft-card {
  --rc: var(--common); --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%;
  position: relative; display: flex; flex-direction: column;
  background: var(--bg-2); margin: 4px;
  box-shadow: 0 -4px 0 0 var(--rc), 0 4px 0 0 var(--rc), -4px 0 0 0 var(--rc), 4px 0 0 0 var(--rc), 0 18px 40px -20px color-mix(in srgb, var(--rc) 60%, transparent);
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform .25s var(--ease-out), box-shadow .25s;
  will-change: transform;
}
.nft-card.is-tilting { transition: transform .06s linear; }
.nft-card--common { --rc: var(--common); }
.nft-card--epic { --rc: var(--epic); }
.nft-card--rare { --rc: var(--rare); }
.nft-card--legendary { --rc: var(--legendary); }
.nft-card__art { position: relative; aspect-ratio: 1; overflow: hidden; background: #000; }
.nft-card__art img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; transition: transform .4s var(--ease-out); }
.nft-card:hover .nft-card__art img { transform: scale(1.04); }
.nft-card__art::after { /* glare */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at var(--mx) var(--my), rgba(255,255,255,.22), transparent 45%);
  opacity: 0; transition: opacity .2s;
}
.nft-card:hover .nft-card__art::after { opacity: 1; }
.nft-card__body { padding: 14px; display: grid; gap: 10px; flex: 1; }
.nft-card__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.nft-card__id { font-family: var(--f-pixel); font-size: 11px; }
.nft-card__price { font-family: var(--f-num); font-size: 28px; line-height: 1; color: var(--text); }
.nft-card__price small { font-size: 18px; color: var(--yellow); margin-left: 4px; }
.nft-card__seller { font-family: var(--f-num); font-size: 18px; color: var(--dim); }
.nft-card__tags { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; justify-content: space-between; align-items: flex-start; z-index: 2; gap: 6px; }
.nft-card__actions { display: flex; gap: 4px; flex-wrap: wrap; }
.nft-card__actions .btn { flex: 1; }
button.nft-card { border: 0; padding: 0; text-align: left; color: inherit; font: inherit; width: calc(100% - 8px); }

/* Legendary holographic shimmer */
.holo { position: relative; }
.holo::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(115deg, transparent 20%, rgba(255,215,106,.0) 30%, rgba(255,120,200,.35) 40%, rgba(120,255,240,.35) 50%, rgba(255,240,120,.35) 60%, transparent 72%);
  background-size: 250% 250%;
  mix-blend-mode: color-dodge;
  animation: holo 4s linear infinite;
}
.nft-card.holo:hover::before { animation-duration: 1.6s; }
@keyframes holo { 0% { background-position: 120% 120%; } 100% { background-position: -120% -120%; } }

/* ---------- Progress bar ---------- */
.pbar { --pc: var(--yellow); height: 22px; background: #000; padding: 4px; position: relative;
  box-shadow: 0 -4px 0 0 var(--line-2), 0 4px 0 0 var(--line-2), -4px 0 0 0 var(--line-2), 4px 0 0 0 var(--line-2); margin: 4px; }
.pbar__fill { height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--pc) 0 10px, color-mix(in srgb, var(--pc) 55%, #000) 10px 12px); transition: width 1.2s var(--ease-out); box-shadow: 0 0 12px -2px var(--pc); min-width: 0; }

/* ---------- Stepper ---------- */
.stepper { display: inline-flex; align-items: stretch; background: #000; margin: 4px;
  box-shadow: 0 -4px 0 0 var(--line-2), 0 4px 0 0 var(--line-2), -4px 0 0 0 var(--line-2), 4px 0 0 0 var(--line-2); }
.stepper button { width: 48px; min-height: 48px; border: 0; background: var(--bg-3); color: var(--yellow); font-family: var(--f-pixel); font-size: 14px; }
.stepper button:hover:not(:disabled) { background: #22223a; }
.stepper button:disabled { color: var(--dim); cursor: not-allowed; }
.stepper input { width: 72px; text-align: center; border: 0; background: transparent; color: var(--text); font-family: var(--f-num); font-size: 30px; -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- Inputs ---------- */
.field { display: grid; gap: 8px; }
.field label { font-family: var(--f-pixel); font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.input, .select {
  min-height: 48px; width: 100%; padding: 0 14px; border: 0; background: #000; color: var(--text);
  font-family: var(--f-num); font-size: 24px; margin: 0;
  box-shadow: inset 0 0 0 4px var(--line-2);
}
.input:focus, .select:focus { outline: none; box-shadow: inset 0 0 0 4px var(--yellow); }
.select { font-family: var(--f-pixel); font-size: 9px; text-transform: uppercase; appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--yellow) 50%), linear-gradient(135deg, var(--yellow) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.input--suffix { position: relative; }
.input--suffix span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-family: var(--f-pixel); font-size: 9px; color: var(--yellow); pointer-events: none; }
.field__err { color: var(--danger); font-size: 13px; min-height: 1.2em; margin: 0; }

/* ---------- Marquee ---------- */
.marquee { position: relative; overflow: hidden; background: var(--yellow); color: #000; border-block: 4px solid #000; z-index: 2; }
.marquee__track { display: flex; width: max-content; animation: marquee 28s linear infinite; }
.marquee__track span { font-family: var(--f-pixel); font-size: 11px; letter-spacing: .08em; padding: 14px 0; white-space: nowrap; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee--tilt { transform: rotate(-1.2deg); margin: 0 -10px; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 16px; }
.modal__scrim { position: absolute; inset: 0; background: rgba(3,3,8,.78); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fadeIn .2s both; }
.modal__dialog {
  position: relative; width: min(100%, 520px); max-height: calc(100dvh - 32px); overflow-y: auto;
  background: var(--bg-2); padding: 24px 20px 20px;
  box-shadow: 0 -4px 0 0 var(--yellow), 0 4px 0 0 var(--yellow), -4px 0 0 0 var(--yellow), 4px 0 0 0 var(--yellow), 0 0 0 8px #000, 0 30px 80px rgba(0,0,0,.6);
  animation: modalIn .28s steps(6) both;
}
.modal__dialog--wide { width: min(100%, 880px); }
.modal__close { position: absolute; top: 8px; right: 8px; z-index: 3; font-family: var(--f-pixel); font-size: 14px; }
.modal__title { font-size: 13px; color: var(--yellow); padding-right: 44px; margin-bottom: 16px; }
.modal__body p { color: var(--muted); }
.modal__actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.modal__actions .btn { flex: 1 1 160px; }
.modal.is-closing .modal__dialog { animation: modalOut .18s steps(4) forwards; }
.modal.is-closing .modal__scrim { animation: fadeOut .18s forwards; }
@keyframes modalIn { from { transform: scale(.9) translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes modalOut { to { transform: scale(.94); opacity: 0; } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
@media (max-width: 560px) {
  .modal { place-items: end center; padding: 0; }
  .modal__dialog { width: 100%; max-height: 92dvh; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}
.status-icon { width: 72px; height: 72px; margin: 0 auto 16px; display: grid; place-items: center; font-family: var(--f-pixel); font-size: 26px; }
.status-icon--ok { color: var(--ok); }
.status-icon--err { color: var(--danger); }
.status-icon--wait { color: var(--yellow); }
.tx-link { font-family: var(--f-num); font-size: 20px; word-break: break-all; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; z-index: 1300; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); left: 16px; display: grid; gap: 10px; justify-items: end; pointer-events: none; }
.toast {
  --tc: var(--yellow);
  pointer-events: auto; width: min(100%, 380px); display: flex; gap: 12px; align-items: flex-start;
  background: var(--bg-2); padding: 14px 14px; margin: 4px;
  box-shadow: 0 -4px 0 0 var(--tc), 0 4px 0 0 var(--tc), -4px 0 0 0 var(--tc), 4px 0 0 0 var(--tc), 0 16px 40px rgba(0,0,0,.5);
  animation: toastIn .25s steps(5) both; font-size: 14px;
}
.toast--ok { --tc: var(--ok); }
.toast--err { --tc: var(--danger); }
.toast--info { --tc: var(--rare); }
.toast__icon { font-family: var(--f-pixel); font-size: 12px; color: var(--tc); line-height: 1.6; }
.toast__msg { flex: 1; }
.toast__msg strong { display: block; font-family: var(--f-pixel); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 4px; color: var(--tc); }
.toast.is-out { animation: toastOut .2s steps(4) forwards; }
@keyframes toastIn { from { transform: translateX(30px); opacity: 0; } }
@keyframes toastOut { to { transform: translateX(30px); opacity: 0; } }
@media (max-width: 560px) { .toasts { justify-items: stretch; } .toast { width: auto; } }

/* ---------- Wallet button + dropdown ---------- */
.wallet-slot { position: relative; }
.wallet-btn { display: inline-flex; align-items: center; gap: 10px; }
.wallet-pill {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 12px 4px 4px;
  background: var(--bg-3); border: 0; color: var(--text); margin: 4px;
  box-shadow: 0 -3px 0 0 var(--line-2), 0 3px 0 0 var(--line-2), -3px 0 0 0 var(--line-2), 3px 0 0 0 var(--line-2);
}
.wallet-pill:hover, .wallet-pill[aria-expanded="true"] { box-shadow: 0 -3px 0 0 var(--yellow), 0 3px 0 0 var(--yellow), -3px 0 0 0 var(--yellow), 3px 0 0 0 var(--yellow); }
.wallet-pill img.avatar { width: 36px; height: 36px; image-rendering: pixelated; }
.wallet-pill__addr { font-family: var(--f-pixel); font-size: 9px; }
.wallet-pill__bal { font-family: var(--f-num); font-size: 19px; color: var(--yellow); line-height: 1; }
.wallet-pill__meta { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.wallet-wrong { --b: var(--danger); --bt: #fff; --hi: #ff8ca0; --lo: #9b1c35; }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 230px; z-index: 120;
  background: var(--bg-2); padding: 8px;
  box-shadow: 0 -4px 0 0 var(--yellow), 0 4px 0 0 var(--yellow), -4px 0 0 0 var(--yellow), 4px 0 0 0 var(--yellow), 0 20px 50px rgba(0,0,0,.6);
  animation: modalIn .18s steps(4) both;
}
.dropdown__head { padding: 8px 10px 12px; border-bottom: 2px dashed var(--line-2); margin-bottom: 6px; }
.dropdown__head p { margin: 0; font-family: var(--f-num); font-size: 20px; color: var(--muted); }
.dropdown a, .dropdown button {
  display: flex; width: 100%; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px;
  border: 0; background: transparent; color: var(--text); font-family: var(--f-pixel); font-size: 9px; text-transform: uppercase; text-align: left;
}
.dropdown a:hover, .dropdown button:hover, .dropdown a:focus-visible, .dropdown button:focus-visible { background: rgba(240,185,11,.1); color: var(--yellow); outline: none; }
.dropdown .is-danger { color: var(--danger); }
@media (max-width: 560px) {
  .wallet-pill__meta { display: none; }
  .wallet-pill { padding: 4px; }
  .wallet-slot .btn { padding: 0 12px; font-size: 9px; }
}

/* Wallet picker list */
.wallet-list { display: grid; gap: 10px; margin-top: 4px; }
.wallet-opt {
  display: flex; align-items: center; gap: 14px; width: calc(100% - 8px); min-height: 60px; padding: 10px 14px; margin: 4px;
  background: var(--bg-3); border: 0; color: var(--text); text-align: left; text-decoration: none;
  box-shadow: 0 -3px 0 0 var(--line-2), 0 3px 0 0 var(--line-2), -3px 0 0 0 var(--line-2), 3px 0 0 0 var(--line-2);
  transition: transform .1s steps(2);
}
.wallet-opt:hover, .wallet-opt:focus-visible { color: var(--text); box-shadow: 0 -3px 0 0 var(--yellow), 0 3px 0 0 var(--yellow), -3px 0 0 0 var(--yellow), 3px 0 0 0 var(--yellow); transform: translateX(4px); outline: none; }
.wallet-opt__icon { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; font-family: var(--f-pixel); font-size: 12px; color: #000; overflow: hidden; }
.wallet-opt__icon img { width: 100%; height: 100%; object-fit: contain; }
.wallet-opt__name { flex: 1; font-weight: 600; }
.wallet-opt__name small { display: block; font-weight: 400; font-size: 12px; color: var(--dim); }
.wallet-opt__tag { font-family: var(--f-pixel); font-size: 7px; padding: 6px 7px; text-transform: uppercase; letter-spacing: .06em; line-height: 1; }
.wallet-opt__tag--ok { background: var(--ok); color: #000; }
.wallet-opt__tag--get { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 2px var(--line-2); }
.wallet-opt__tag--open { background: var(--yellow); color: #000; }
.wallet-note { font-size: 13px; color: var(--dim); margin-top: 14px; }

/* ---------- Connect prompt / empty state ---------- */
.prompt { text-align: center; padding: 40px 20px; display: grid; justify-items: center; gap: 8px; }
.prompt img { width: 120px; height: 120px; object-fit: contain; animation: bob 3s ease-in-out infinite; image-rendering: pixelated; }
.prompt h3 { font-size: 13px; color: var(--yellow); margin-top: 8px; }
.prompt p { color: var(--muted); max-width: 44ch; }

/* ---------- Section heading ---------- */
.sec-head { display: grid; gap: 10px; margin-bottom: 28px; }
.sec-head__kicker { font-family: var(--f-num); font-size: 22px; color: var(--yellow); letter-spacing: .06em; }
.sec-head h2 { font-size: clamp(16px, 3.4vw, 26px); margin: 0; }
.sec-head p { color: var(--muted); max-width: 60ch; margin: 0; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; translate: 0 18px; transition: opacity .5s var(--ease-out), translate .5s var(--ease-out), transform .25s var(--ease-out), box-shadow .25s; }
.reveal.is-in { opacity: 1; translate: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; translate: none; } }

/* ---------- Copy chip ---------- */
.copy { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 0 8px; min-height: 44px; color: var(--text); font-family: var(--f-num); font-size: 22px; }
.copy:hover { color: var(--yellow); }

/* Preview banner */
.banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; margin: 4px 4px 20px; background: rgba(240,185,11,.07);
  box-shadow: 0 -2px 0 0 var(--yellow-dark), 0 2px 0 0 var(--yellow-dark), -2px 0 0 0 var(--yellow-dark), 2px 0 0 0 var(--yellow-dark);
  font-size: 14px; color: var(--muted);
}
.banner strong { font-family: var(--f-pixel); font-size: 9px; color: var(--yellow); letter-spacing: .06em; }
@media (max-width: 420px) { .hide-xs { display: none; } }

/* ---------- HODLER orbit loader (replaces hourglass) ---------- */
.hx-loader { --s: 84px; position: relative; width: var(--s); height: var(--s); margin: 4px auto 18px; display: grid; place-items: center; }
.hx-loader > * { position: absolute; inset: 0; margin: auto; }
.hx-ring {
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 18%, rgba(240,185,11,.15) 30%, var(--yellow) 88%, #fff3c4 100%);
  -webkit-mask: repeating-conic-gradient(#000 0 9deg, transparent 9deg 15deg), radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
  -webkit-mask-composite: source-in; mask-composite: intersect;
  mask: repeating-conic-gradient(#000 0 9deg, transparent 9deg 15deg), radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
  animation: hxSpin 1.1s linear infinite;
  filter: drop-shadow(0 0 6px rgba(240,185,11,.45));
}
.hx-track { width: 64%; height: 64%; border-radius: 50%; border: 1px dashed rgba(240,185,11,.28); animation: hxSpin 6s linear infinite reverse; }
.hx-orbit { width: 64%; height: 64%; animation: hxSpin 1.6s cubic-bezier(.55,.1,.45,.9) infinite reverse; }
.hx-orbit i { position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; margin-left: -4px; background: #fff; box-shadow: 0 0 0 2px var(--yellow), 0 0 12px 3px rgba(240,185,11,.8); }
.hx-core { width: 22px; height: 22px; background: var(--yellow); transform: rotate(45deg); box-shadow: 0 0 18px rgba(240,185,11,.7), inset 0 0 0 5px #f8d33a; animation: hxPulse 1.1s ease-in-out infinite; }
.hx-core::after { content: ""; position: absolute; inset: 7px; background: var(--bg); }
.hx-msg::after { content: ""; display: inline-block; width: 1.2em; text-align: left; animation: hxDots 1.2s steps(4) infinite; }
@keyframes hxSpin { to { transform: rotate(360deg); } }
@keyframes hxPulse { 0%,100% { transform: rotate(45deg) scale(.82); opacity: .85; } 50% { transform: rotate(45deg) scale(1.08); opacity: 1; } }
@keyframes hxDots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
.hx-loader--sm { --s: 44px; margin: 0 auto 12px; }
.hx-loader--sm .hx-core { width: 12px; height: 12px; box-shadow: 0 0 10px rgba(240,185,11,.7), inset 0 0 0 3px #f8d33a; }
.hx-loader--sm .hx-core::after { inset: 4px; }
.hx-loader--sm .hx-orbit i { width: 5px; height: 5px; margin-left: -2.5px; top: -2.5px; }
/* button spinner: smooth segmented ring */
.btn .spin { width: 14px; height: 14px; background: none; border-radius: 50%;
  background: conic-gradient(transparent 0 25%, currentColor 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  animation: hxSpin .8s linear infinite; clip-path: none; }
@media (prefers-reduced-motion: reduce) {
  .hx-ring, .hx-orbit, .hx-track { animation-duration: 3s; }
  .hx-core { animation: none; }
}
.listed-tag { color: var(--yellow); font-family: var(--f-pixel); font-size: 10px; letter-spacing: .05em; }

/* ---------- Shop · Activity ---------- */
.act-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--bg-2); }
.act-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.act-table th { text-align: left; font-family: var(--f-pixel); font-size: 10px; letter-spacing: .08em; color: #8c8ca8; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.act-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
.act-table tbody tr:hover { background: var(--bg-3); }
.act__type { font-family: var(--f-pixel); font-size: 10px; padding: 5px 8px; border: 1px solid currentColor; display: inline-block; }
.act--mint .act__type { color: #4ade80; } .act--sale .act__type { color: var(--yellow); } .act--list .act__type, .act--update .act__type { color: #60a5fa; }
.act--delist .act__type { color: #f87171; } .act--transfer .act__type { color: #c084fc; }
.act__item { display: flex; align-items: center; gap: 10px; }
.act__item img { width: 36px; height: 36px; image-rendering: pixelated; border: 1px solid var(--line-2); }
.act__item > span { display: grid; gap: 3px; } .act__item .rank { font-size: 9px; }
.act__price { font-family: var(--f-num); font-size: 20px; color: #fff; } .act__price small { font-size: 14px; color: #8c8ca8; }
.act__free { color: #4ade80; font-family: var(--f-pixel); font-size: 11px; }
.act__muted { color: #6b6b85; font-size: 13px; font-family: inherit; }
.act__addr { font-family: var(--f-num); font-size: 18px; color: #cfcfe0; }
.act__time { color: #8c8ca8; text-decoration: none; font-size: 13px; } .act__time:hover { color: var(--yellow); }
@media (max-width: 720px) {
  .act-wrap { border: 0; background: none; overflow: visible; }
  .act-table thead { display: none; }
  .act-table, .act-table tbody, .act-table tr, .act-table td { display: block; width: 100%; }
  .act-table tr.act { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "type item price" "from from time" ; gap: 8px 12px; padding: 12px; margin-bottom: 10px; border: 1px solid var(--line); background: var(--bg-2); }
  .act-table td { padding: 0; border: 0; }
  .act-table td[data-l="Event"] { grid-area: type; align-self: center; }
  .act-table td[data-l="Item"] { grid-area: item; }
  .act-table td[data-l="Price"] { grid-area: price; text-align: right; align-self: center; }
  .act-table td[data-l="From"] { grid-area: from; font-size: 15px; }
  .act-table td[data-l="To"] { display: none; }
  .act-table td[data-l="Time"] { grid-area: time; text-align: right; }
  .act-table td[data-l="From"]::before { content: "From "; color: #6b6b85; font-family: var(--f-body, inherit); font-size: 12px; }
  .act-table tr.act--mint td[data-l="From"]::before { content: "Minter "; }
}
@media (max-width: 720px) {
  .act-table td[data-l="From"] { font-size: 0; }
  .act-table td[data-l="From"]::after { content: attr(data-m); font-size: 17px; }
  .act-table tr.act--sale td[data-l="From"]::before { content: "Seller → Buyer "; }
  .act-table tr.act--list td[data-l="From"]::before, .act-table tr.act--update td[data-l="From"]::before, .act-table tr.act--delist td[data-l="From"]::before { content: "Seller "; }
}

/* tabs: horizontal-only scroll on mobile (underline no longer overflows vertically) */
.tabs { border-bottom: 0; box-shadow: inset 0 -4px 0 var(--line); overflow-y: hidden; overscroll-behavior-x: contain; touch-action: pan-x pan-y; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; }
.tab { flex: 0 0 auto; white-space: nowrap; }
.tab[aria-selected="true"]::after { bottom: 0; }
.act-live { display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-pixel); font-size: 10px; color: #4ade80; letter-spacing: .08em; }
.act-live i { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 0 rgba(74,222,128,.7); animation: actLive 1.4s ease-out infinite; }
@keyframes actLive { 0% { box-shadow: 0 0 0 0 rgba(74,222,128,.7); } 100% { box-shadow: 0 0 0 10px rgba(74,222,128,0); } }
.act-table tr.act--new { animation: actNew 2.4s ease-out; }
@keyframes actNew { 0% { background: rgba(240,185,11,.28); transform: translateY(-6px); opacity: 0; } 15% { opacity: 1; transform: none; } 100% { background: transparent; } }
