/* ============================================================
   BULLY FORGE MARKET — neon streetwear design system
   ============================================================ */

:root {
  --pink:   #ff2e97;
  --cyan:   #26d0ff;
  --lime:   #b6ff00;
  --gold:   #ffd23f;
  --red:    #ff2e44;

  --bg-0:   #06030a;
  --bg-1:   #0a0410;
  --bg-2:   #120a1d;

  --glass:        rgba(22, 12, 34, 0.55);
  --glass-strong: rgba(28, 16, 44, 0.78);
  --stroke:       rgba(255, 255, 255, 0.10);
  --stroke-2:     rgba(255, 255, 255, 0.18);

  --ink:    #f6f0ff;
  --ink-dim:#b3a6c9;
  --ink-mute:#7d7191;

  --radius:   18px;
  --radius-sm:12px;
  --shadow:   0 24px 60px -18px rgba(0,0,0,0.7);
  --glow-pink: 0 0 0 1px rgba(255,46,151,.5), 0 0 28px -4px rgba(255,46,151,.55);
  --glow-cyan: 0 0 0 1px rgba(38,208,255,.5), 0 0 28px -4px rgba(38,208,255,.55);
  --glow-red:  0 0 0 1px rgba(255,46,68,.55), 0 0 28px -4px rgba(255,46,68,.6);

  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body:    "Space Grotesk", system-ui, sans-serif;
}

/* ---- CRITICAL: modals never stick open ---- */
[hidden] { display: none !important; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg-1);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* ===================== BACKGROUND FX ===================== */
.bg-grid {
  position: fixed; inset: 0; z-index: -3;
  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px) 0 0 / 46px 46px,
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px) 0 0 / 46px 46px,
    radial-gradient(120% 90% at 50% -10%, var(--bg-2), var(--bg-0) 70%);
  mask-image: radial-gradient(110% 80% at 50% 0%, #000 55%, transparent 100%);
}
.bg-glow {
  position: fixed; z-index: -2; border-radius: 50%;
  filter: blur(90px); opacity: .42; pointer-events: none;
  animation: drift 22s ease-in-out infinite alternate;
}
.bg-glow--pink { width: 46vw; height: 46vw; background: var(--pink); top: -12vw; left: -8vw; }
.bg-glow--cyan { width: 40vw; height: 40vw; background: var(--cyan); top: 30vh; right: -12vw; animation-delay: -6s; }
.bg-glow--lime { width: 32vw; height: 32vw; background: var(--lime); bottom: -14vw; left: 30vw; opacity: .28; animation-delay: -12s; }
@keyframes drift {
  from { transform: translate3d(0,0,0) scale(1); }
  to   { transform: translate3d(3vw,4vh,0) scale(1.12); }
}
.bg-noise {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===================== TOP BAR ===================== */
.topbar {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(16px) saturate(140%);
  background: linear-gradient(180deg, rgba(10,4,16,.92), rgba(10,4,16,.62));
  border-bottom: 1px solid var(--stroke);
}
.topbar__inner {
  max-width: 1160px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 14px clamp(14px, 4vw, 28px) 10px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__mark {
  display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 13px;
  background: var(--glass-strong); border: 1px solid var(--stroke-2);
  box-shadow: inset 0 0 18px rgba(255,46,151,.18);
}
.brand__text { display: flex; flex-direction: column; line-height: .92; }
.brand__text strong {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(15px, 2.4vw, 19px); letter-spacing: .04em; color: var(--ink);
}
.brand__text em {
  font-style: normal; font-weight: 800; letter-spacing: .42em;
  font-size: 10px; color: var(--cyan);
  text-shadow: 0 0 12px rgba(38,208,255,.7);
}

.wallet-chip {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 15px; border-radius: 999px; cursor: pointer;
  background: var(--glass-strong);
  border: 1px solid var(--stroke-2);
  color: var(--ink); font-family: var(--font-body);
  transition: transform .15s ease, box-shadow .25s ease, border-color .2s;
}
.wallet-chip:hover { transform: translateY(-1px); box-shadow: var(--glow-red); border-color: rgba(255,46,68,.55); }
.wallet-chip__star { color: var(--gold); font-size: 15px; text-shadow: 0 0 10px rgba(255,210,63,.8); }

/* Bully Coin glyph — gold disc look */
.coin {
  color: var(--gold);
  text-shadow: 0 0 10px rgba(255,210,63,.85), 0 0 2px rgba(255,160,40,.9);
  font-weight: 700;
}
.wallet-chip__bal { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; min-width: 1ch; }
.wallet-chip__id {
  font-size: 10px; letter-spacing: .12em; color: var(--ink-mute);
  text-transform: uppercase; padding-left: 9px; border-left: 1px solid var(--stroke);
}
.wallet-chip.bump { animation: chipBump .5s ease; }
@keyframes chipBump {
  0% { transform: scale(1); }
  35% { transform: scale(1.12); box-shadow: var(--glow-cyan); }
  100% { transform: scale(1); }
}

/* ===================== TABS ===================== */
.tabs {
  max-width: 1160px; margin: 0 auto;
  display: flex; gap: 4px; padding: 0 clamp(10px, 4vw, 28px);
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto; cursor: pointer;
  background: none; border: none; color: var(--ink-mute);
  font-family: var(--font-display); font-weight: 700; font-size: 13px;
  letter-spacing: .14em; padding: 13px 16px 14px; position: relative;
  transition: color .2s ease;
}
.tab__glyph { margin-right: 5px; opacity: .8; }
.tab:hover { color: var(--ink-dim); }
.tab.is-active { color: var(--ink); }
.tab.is-active { color: #fff; }
.tab.is-active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, var(--red), var(--pink) 55%, var(--cyan));
  box-shadow: 0 0 14px rgba(255,46,68,.75);
}

/* ===================== STAGE / PANELS ===================== */
.stage { max-width: 1160px; margin: 0 auto; padding: clamp(22px, 4vw, 40px) clamp(14px, 4vw, 28px) 60px; }
.panel { animation: fadeUp .4s ease both; }
.panel:not(.is-active) { display: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.glass {
  background: var(--glass); border: 1px solid var(--stroke);
  border-radius: var(--radius); backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

/* Typography */
.display { font-family: var(--font-display); font-weight: 800; letter-spacing: -.01em; line-height: .96; margin: 0; }
.display { font-size: clamp(30px, 6.5vw, 54px); }
.display.sm { font-size: clamp(24px, 4.5vw, 38px); }
.display.xs { font-size: clamp(20px, 3.5vw, 26px); }
.grad-text {
  background: linear-gradient(92deg, var(--pink), var(--cyan) 55%, var(--lime));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(255,46,151,.35));
}
.sub { color: var(--ink-dim); font-size: 15px; margin: 8px 0 0; max-width: 60ch; }

/* ===================== FORGE ===================== */
.forge { max-width: 720px; margin: 0 auto; }
.forge__head { text-align: center; margin-bottom: 26px; }
.forge__head .sub { margin-inline: auto; }

.forge__box { padding: 22px; }
.field-label {
  display: block; font-family: var(--font-display); font-weight: 700;
  font-size: 11px; letter-spacing: .2em; color: var(--ink-mute); margin-bottom: 9px;
}
.prompt-input {
  width: 100%; resize: vertical; min-height: 92px;
  background: rgba(0,0,0,.35); border: 1px solid var(--stroke-2);
  border-radius: var(--radius-sm); color: var(--ink);
  font-family: var(--font-body); font-size: 16px; line-height: 1.5; padding: 14px 16px;
  transition: border-color .2s, box-shadow .2s;
}
.prompt-input::placeholder { color: var(--ink-mute); }
.prompt-input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(38,208,255,.16); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.chip {
  cursor: pointer; font-family: var(--font-body); font-size: 12.5px;
  color: var(--ink-dim); background: rgba(255,255,255,.04);
  border: 1px solid var(--stroke); border-radius: 999px; padding: 7px 13px;
  transition: all .18s ease;
}
.chip:hover { color: var(--ink); border-color: var(--pink); box-shadow: 0 0 0 1px rgba(255,46,151,.4); }

.forge__actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; }
.hint { font-size: 12px; color: var(--ink-mute); font-variant-numeric: tabular-nums; }

/* Buttons */
.btn {
  cursor: pointer; border: none; font-family: var(--font-display); font-weight: 700;
  letter-spacing: .06em; border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: transform .14s ease, box-shadow .25s ease, filter .2s, opacity .2s;
  color: #190618; padding: 13px 20px; font-size: 14px; white-space: nowrap;
}
.btn--forge { background: linear-gradient(96deg, var(--red), var(--pink) 55%, var(--cyan)); box-shadow: 0 10px 30px -10px rgba(255,46,68,.75); }
.btn--forge:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -10px rgba(255,46,68,.7), 0 16px 40px -16px rgba(38,208,255,.6); }
.btn--forge.is-cooling { filter: saturate(.6) brightness(.85); }
.btn--lime { background: linear-gradient(96deg, var(--lime), var(--cyan)); box-shadow: 0 10px 30px -10px rgba(182,255,0,.6); }
.btn--gold { background: linear-gradient(96deg, var(--gold), var(--pink)); box-shadow: 0 10px 30px -10px rgba(255,210,63,.6); }
.btn--ghost {
  background: rgba(255,255,255,.04); color: var(--ink);
  border: 1px solid var(--stroke-2);
}
.btn--ghost:hover { border-color: var(--cyan); color: #fff; transform: translateY(-1px); }
.btn--danger { background: rgba(255,46,151,.12); color: #ff8fc4; border: 1px solid rgba(255,46,151,.4); }
.btn--danger:hover { background: rgba(255,46,151,.2); transform: translateY(-1px); }
.btn--sm { padding: 8px 13px; font-size: 12px; }
.btn--full { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; filter: grayscale(.4); }
.btn.is-busy { pointer-events: none; }
.btn.is-busy .btn__label { opacity: .35; }

.cost-pill {
  display: inline-flex; align-items: center; gap: 3px;
  background: rgba(0,0,0,.28); border-radius: 999px; padding: 3px 9px;
  font-size: 12px; font-weight: 700;
}
.cost-pill__star { color: var(--gold); }
.cost-pill__star.coin { color: var(--gold); }
.cost-pill--free {
  background: rgba(182,255,0,.18); color: #0a1a06;
  letter-spacing: .08em;
}
.cost-pill--free { color: var(--lime); }

/* spinner for busy buttons */
.btn.is-busy::after {
  content: ""; position: absolute; width: 17px; height: 17px;
  border: 2px solid rgba(25,6,24,.4); border-top-color: #190618;
  border-radius: 50%; animation: spin .7s linear infinite;
}
.btn { position: relative; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Loading shimmer */
.forge__loading { display: grid; place-items: center; gap: 16px; padding: 40px 0; }
.mint-shimmer {
  position: relative; width: 220px; height: 220px; border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255,46,151,.18), rgba(38,208,255,.18));
  border: 1px solid var(--stroke-2); overflow: hidden; display: grid; place-items: center;
}
.mint-shimmer__core { font-size: 64px; opacity: .5; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100%{ opacity:.35; transform: scale(.95);} 50%{ opacity:.7; transform: scale(1.05);} }
.mint-shimmer__sheen {
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.22) 50%, transparent 70%);
  animation: sheen 1.5s linear infinite;
}
@keyframes sheen { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.loading-text { color: var(--ink-dim); font-size: 14px; letter-spacing: .04em; }

.forge__result { margin-top: 8px; display: grid; place-items: center; }

/* ===================== CARDS / GRID ===================== */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.row-head {
  font-family: var(--font-display); font-weight: 800; font-size: 13px; letter-spacing: .2em;
  color: var(--ink-mute); margin: 30px 0 14px;
}

.grid {
  display: grid; gap: 16px; margin-top: 18px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.card {
  background: var(--glass); border: 1px solid var(--stroke);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .2s ease, border-color .25s, box-shadow .3s;
}
.card:hover { transform: translateY(-4px); border-color: var(--stroke-2); box-shadow: 0 30px 60px -20px rgba(255,46,151,.4); }
.card.mint-in { animation: mintPop .6s cubic-bezier(.2,1.1,.3,1) both; }
@keyframes mintPop {
  0% { opacity: 0; transform: translateY(20px) scale(.92) rotate(-1.5deg); filter: brightness(1.6); }
  60% { filter: brightness(1.2); }
  100% { opacity: 1; transform: none; filter: none; }
}

.card__media { position: relative; aspect-ratio: 1/1; background: #0c0612; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card__media .badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; }
.badge {
  font-family: var(--font-display); font-weight: 800; font-size: 10px; letter-spacing: .12em;
  padding: 4px 8px; border-radius: 7px; backdrop-filter: blur(4px);
}
.badge--hd { background: linear-gradient(90deg, var(--lime), var(--cyan)); color: #0a1a06; box-shadow: 0 0 16px rgba(182,255,0,.5); }
.badge--game { background: linear-gradient(90deg, var(--gold), var(--pink)); color: #2a0a14; }
.badge--listed { background: rgba(38,208,255,.18); color: var(--cyan); border: 1px solid rgba(38,208,255,.4); }

.card__view3d {
  position: absolute; bottom: 10px; right: 10px;
  width: 38px; height: 38px; border-radius: 10px; cursor: pointer;
  display: grid; place-items: center; font-size: 17px;
  background: rgba(6,3,10,.6); border: 1px solid var(--stroke-2); color: var(--ink);
  backdrop-filter: blur(6px); transition: all .18s;
}
.card__view3d:hover { border-color: var(--cyan); color: #fff; box-shadow: var(--glow-cyan); transform: scale(1.08); }

.card__body { padding: 13px 14px 15px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__name { font-family: var(--font-display); font-weight: 700; font-size: 15px; margin: 0; line-height: 1.15; }
.card__prompt {
  font-size: 12px; color: var(--ink-dim); margin: 0; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.price-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-display); font-weight: 800; font-size: 17px; color: var(--gold);
}
.price-tag .star { font-size: 13px; }
.seller { font-size: 10.5px; color: var(--ink-mute); letter-spacing: .06em; }

.card__actions { display: flex; flex-wrap: wrap; gap: 7px; }
.card__actions .btn { flex: 1 1 auto; min-width: 0; }

/* compact action buttons in cards */
.actbtn {
  cursor: pointer; flex: 1 1 calc(50% - 4px); min-width: 0;
  font-family: var(--font-body); font-weight: 600; font-size: 12px;
  padding: 9px 8px; border-radius: 10px; border: 1px solid var(--stroke-2);
  background: rgba(255,255,255,.04); color: var(--ink-dim);
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  transition: all .16s ease; position: relative; white-space: nowrap;
}
.actbtn:hover { color: #fff; transform: translateY(-1px); }
.actbtn--list:hover  { border-color: var(--cyan); box-shadow: var(--glow-cyan); }
.actbtn--hd:hover    { border-color: var(--lime); box-shadow: 0 0 0 1px rgba(182,255,0,.5); }
.actbtn--world:hover { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(255,210,63,.5); }
.actbtn--unlist:hover{ border-color: var(--pink); box-shadow: 0 0 0 1px rgba(255,46,151,.5); }
.actbtn:disabled { opacity: .45; cursor: default; transform: none; }
.actbtn.is-busy { pointer-events: none; color: transparent; }
.actbtn.is-busy::after {
  content: ""; position: absolute; width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.25); border-top-color: var(--cyan);
  border-radius: 50%; animation: spin .7s linear infinite;
}
.cost-mini { font-size: 10px; opacity: .8; }
.cost-mini .star { color: var(--gold); }

/* buy button full width */
.btn--buy { width: 100%; }

/* ===================== VAULT ===================== */
.vault-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.stat { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.stat__k { font-family: var(--font-display); font-weight: 700; font-size: 10px; letter-spacing: .18em; color: var(--ink-mute); }
.stat__v { font-family: var(--font-display); font-weight: 800; font-size: 26px; display: flex; align-items: center; gap: 6px; }
.stat__v .star { color: var(--gold); font-size: 18px; }

/* Ledger */
.ledger { padding: 6px 4px; max-height: 360px; overflow-y: auto; }
.ledger__row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-bottom: 1px solid var(--stroke);
}
.ledger__row:last-child { border-bottom: none; }
.ledger__icon {
  width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 15px;
  background: rgba(255,255,255,.05); border: 1px solid var(--stroke);
}
.ledger__main { flex: 1; min-width: 0; }
.ledger__kind { font-weight: 600; font-size: 13.5px; text-transform: capitalize; }
.ledger__time { font-size: 11px; color: var(--ink-mute); }
.ledger__delta { font-family: var(--font-display); font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
.ledger__delta.pos { color: var(--lime); }
.ledger__delta.neg { color: var(--pink); }
.ledger__delta.zero { color: var(--ink-mute); }
.ledger__empty { padding: 22px; text-align: center; color: var(--ink-mute); font-size: 13px; }

/* Empty states */
.empty-state {
  text-align: center; padding: 50px 20px; color: var(--ink-mute);
  border: 1px dashed var(--stroke-2); border-radius: var(--radius); margin-top: 18px;
}
.empty-state__glyph { font-size: 42px; opacity: .4; margin-bottom: 10px; }

/* ===================== MODALS ===================== */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 18px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(4,2,8,.74); backdrop-filter: blur(8px); animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal__panel {
  position: relative; z-index: 1; width: 100%; max-width: 520px;
  background: var(--glass-strong); border: 1px solid var(--stroke-2);
  border-radius: 22px; box-shadow: var(--shadow); padding: 26px;
  animation: modalPop .3s cubic-bezier(.2,1,.3,1) both; max-height: 92vh; overflow: auto;
}
@keyframes modalPop { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }
.modal__panel--3d { max-width: 560px; }
.modal__close {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  width: 34px; height: 34px; border-radius: 10px; cursor: pointer;
  background: rgba(255,255,255,.06); border: 1px solid var(--stroke-2);
  color: var(--ink); font-size: 15px; transition: all .16s;
}
.modal__close:hover { border-color: var(--pink); color: #fff; transform: rotate(90deg); }

/* 3D showcase */
.showcase { display: flex; flex-direction: column; gap: 16px; }
.showcase__canvas-wrap {
  position: relative; aspect-ratio: 1/1; border-radius: var(--radius);
  overflow: hidden; background: radial-gradient(circle at 50% 40%, #1a0d28, #06030a 75%);
  border: 1px solid var(--stroke);
}
#showcaseCanvas { width: 100%; height: 100%; display: block; }
.showcase__loading {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--ink-mute); font-size: 13px; letter-spacing: .1em;
}
.showcase__meta { text-align: center; }
.showcase__name { font-family: var(--font-display); font-weight: 800; font-size: 22px; margin: 0 0 6px; }
.showcase__prompt { color: var(--ink-dim); font-size: 13px; margin: 0 0 8px; }

/* Send to world */
.world { display: flex; flex-direction: column; gap: 18px; text-align: center; }
.world__head { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.world__icon {
  width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center; font-size: 36px;
  background: linear-gradient(135deg, var(--gold), var(--pink));
  box-shadow: 0 0 40px -6px rgba(255,210,63,.6); color: #2a0a14;
}
.world__icon.spin-glow { animation: spinGlow 1.2s ease-in-out infinite; }
@keyframes spinGlow {
  0%,100% { transform: scale(1) rotate(0); box-shadow: 0 0 40px -6px rgba(255,210,63,.6); }
  50% { transform: scale(1.06) rotate(4deg); box-shadow: 0 0 56px 0 rgba(255,46,151,.7); }
}
.world h3 { font-family: var(--font-display); font-weight: 800; font-size: 24px; margin: 0; }
.world__preview {
  width: 160px; height: 160px; margin: 0 auto; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--stroke-2); box-shadow: var(--glow-cyan);
}
.world__preview img { width: 100%; height: 100%; object-fit: cover; }
.world__bridge {
  background: rgba(0,0,0,.32); border: 1px solid var(--stroke-2); border-radius: var(--radius-sm);
  padding: 14px; text-align: left; display: flex; flex-direction: column; gap: 10px;
}
.world__bridge-label { font-family: var(--font-display); font-weight: 700; font-size: 10px; letter-spacing: .18em; color: var(--ink-mute); }
.asset-link {
  display: flex; align-items: center; gap: 8px;
  background: rgba(38,208,255,.08); border: 1px solid rgba(38,208,255,.35);
  border-radius: 10px; padding: 10px 12px; overflow: hidden;
}
.asset-link a {
  color: var(--cyan); font-size: 12.5px; text-decoration: none; word-break: break-all; flex: 1;
}
.asset-link a:hover { text-decoration: underline; }
.copy-btn {
  cursor: pointer; flex: 0 0 auto; padding: 6px 11px; border-radius: 8px;
  background: rgba(38,208,255,.16); border: 1px solid rgba(38,208,255,.4);
  color: var(--cyan); font-size: 11px; font-weight: 600; transition: all .15s;
}
.copy-btn:hover { background: rgba(38,208,255,.28); color: #fff; }
.world__confirm {
  font-size: 13px; color: var(--lime); display: flex; align-items: center; gap: 8px; justify-content: center;
}
.world__progress { display: flex; flex-direction: column; gap: 14px; align-items: center; padding: 10px 0; }
.world__bar { width: 100%; height: 7px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.world__bar > span { display: block; height: 100%; width: 40%; border-radius: 99px;
  background: linear-gradient(90deg, var(--gold), var(--pink)); animation: indeterminate 1.3s ease-in-out infinite; }
@keyframes indeterminate { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }

/* List form */
.list-form { display: flex; flex-direction: column; gap: 14px; }
.price-input-wrap { position: relative; }
.price-input-wrap__star {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: var(--gold); font-size: 18px; pointer-events: none;
}
.price-input {
  width: 100%; background: rgba(0,0,0,.35); border: 1px solid var(--stroke-2);
  border-radius: var(--radius-sm); color: var(--ink);
  font-family: var(--font-display); font-weight: 800; font-size: 22px;
  padding: 14px 16px 14px 42px; transition: border-color .2s, box-shadow .2s;
}
.price-input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(38,208,255,.16); }
.price-input::-webkit-outer-spin-button, .price-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.price-input[type=number] { -moz-appearance: textfield; }

/* ===================== TOASTS ===================== */
.toast-wrap {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: center;
  width: min(440px, calc(100vw - 28px)); pointer-events: none;
}
.toast {
  pointer-events: auto; width: 100%;
  display: flex; align-items: center; gap: 11px;
  padding: 13px 16px; border-radius: 13px;
  background: var(--glass-strong); border: 1px solid var(--stroke-2);
  backdrop-filter: blur(14px); box-shadow: var(--shadow);
  animation: toastIn .35s cubic-bezier(.2,1.1,.3,1) both; font-size: 14px;
}
.toast.out { animation: toastOut .3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(12px) scale(.97); } }
.toast__icon { font-size: 17px; flex: 0 0 auto; }
.toast--success { border-color: rgba(182,255,0,.45); }
.toast--success .toast__icon { color: var(--lime); }
.toast--error   { border-color: rgba(255,46,151,.5); }
.toast--error .toast__icon { color: var(--pink); }
.toast--info    { border-color: rgba(38,208,255,.45); }
.toast--info .toast__icon { color: var(--cyan); }
.toast__msg { flex: 1; line-height: 1.35; }

/* ===================== FOOTER ===================== */
.footer {
  max-width: 1160px; margin: 0 auto; padding: 26px clamp(14px,4vw,28px) 40px;
  border-top: 1px solid var(--stroke); text-align: center;
  display: flex; flex-direction: column; gap: 6px;
}
.footer__note { color: var(--ink-dim); font-size: 12.5px; margin: 0; }
.footer__brand { color: var(--ink-mute); font-size: 11px; letter-spacing: .14em; margin: 0; }

/* ===================== SEGMENTED CONTROLS (mode / batch / supply) ===================== */
.seg {
  display: inline-flex; gap: 4px; padding: 4px;
  background: rgba(0,0,0,.32); border: 1px solid var(--stroke-2);
  border-radius: 999px;
}
.seg__btn {
  cursor: pointer; border: none; background: transparent; color: var(--ink-dim);
  font-family: var(--font-display); font-weight: 700; font-size: 13px; letter-spacing: .04em;
  padding: 8px 16px; border-radius: 999px; transition: all .16s ease; white-space: nowrap;
}
.seg__btn:hover { color: var(--ink); }
.seg__btn.is-active {
  color: #190618;
  background: linear-gradient(96deg, var(--red), var(--pink));
  box-shadow: 0 0 16px -4px rgba(255,46,68,.7);
}
.seg--batch .seg__btn, .seg--supply .seg__btn { min-width: 42px; }
.mode-note {
  font-size: 11.5px; color: var(--ink-mute); margin: 8px 0 16px; line-height: 1.4; max-width: 60ch;
}
.forge__batch { display: flex; align-items: center; gap: 14px; margin-top: 16px; flex-wrap: wrap; }

/* ---- STYLE / ANIM / BIT selector rows (FORGE) ---- */
/* These segmented controls auto-inherit .seg / .seg__btn; the rows handle layout
   and wrap on narrow screens. Hidden cleanly via [hidden]{display:none!important}. */
.forge__style { margin: 4px 0 16px; }
.forge__style-head { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.seg--style { flex-wrap: wrap; max-width: 100%; }
.seg--style .seg__btn { padding: 8px 13px; font-size: 12px; }
.style-info {
  cursor: pointer; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; line-height: 1;
  background: rgba(255,255,255,.05); border: 1px solid var(--stroke-2);
  color: var(--ink-mute); transition: all .15s ease; padding: 0;
}
.style-info:hover { border-color: var(--cyan); color: var(--cyan); box-shadow: var(--glow-cyan); }
.style-note {
  font-size: 11px; color: var(--ink-mute); margin: 9px 0 0; line-height: 1.45; max-width: 62ch;
}
.style-note strong { color: var(--ink-dim); }

.forge__anim, .forge__bit {
  display: flex; align-items: center; gap: 14px; margin: 4px 0 16px; flex-wrap: wrap;
}
.seg--anim, .seg--bit { flex-wrap: wrap; }
.seg--bit .seg__btn { min-width: 56px; }

/* ---- TOP BAR right cluster + GALAXY MAP link (CHANGE 5) ---- */
.topbar__right { display: flex; align-items: center; gap: 10px; }
.map-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 999px; cursor: pointer; text-decoration: none;
  background: linear-gradient(96deg, rgba(38,208,255,.16), rgba(160,107,255,.16));
  border: 1px solid rgba(38,208,255,.45);
  color: var(--ink); font-family: var(--font-display); font-weight: 700;
  font-size: 12px; letter-spacing: .1em; white-space: nowrap;
  transition: transform .15s ease, box-shadow .25s ease, border-color .2s, background .2s;
}
.map-link:hover {
  transform: translateY(-1px); border-color: var(--cyan);
  box-shadow: var(--glow-cyan); color: #fff;
}
.map-link__glyph { font-size: 15px; line-height: 1; }
.map-link__text { line-height: 1; }

/* offscreen capture host (3D anim + GIF frames) */
.capture-host {
  position: fixed; left: -10000px; top: -10000px;
  width: 1px; height: 1px; overflow: hidden; pointer-events: none; opacity: 0;
}

/* animated media in cards */
.card__media .card__vid { width: 100%; height: 100%; object-fit: cover; display: block; }
.world__preview video { width: 100%; height: 100%; object-fit: cover; }
.badge--anim {
  background: linear-gradient(90deg, var(--red), var(--pink)); color: #fff;
  box-shadow: 0 0 14px -3px rgba(255,46,68,.7);
}

/* batch result grid spacing */
.forge__result.grid { margin-top: 18px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.forge__result.grid .card { max-width: none; }

/* ===================== COLLECTION TAB ===================== */
.coll-controls { padding: 18px; margin-top: 18px; }
.coll-controls__row { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.coll-field { display: flex; flex-direction: column; gap: 8px; }
.coll-name-input {
  background: rgba(0,0,0,.35); border: 1px solid var(--stroke-2); border-radius: var(--radius-sm);
  color: var(--ink); font-family: var(--font-body); font-size: 14px; padding: 10px 13px; min-width: 200px;
}
.coll-name-input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(255,46,68,.16); }
.coll-controls__row .btn--forge { margin-left: auto; }

.coll-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.coll-download {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 16px;
}
.coll-download__hint { font-size: 12.5px; color: var(--ink-dim); }
.coll-grid { margin-top: 18px; }
.coll-card__media { background: #0c0612; }
.coll-card__canvas { width: 100%; height: 100%; object-fit: cover; display: block; }

/* rarity tier badge colors */
.tier--legendary { background: linear-gradient(90deg, var(--gold), var(--red)); color: #2a0a14; }
.tier--epic { background: linear-gradient(90deg, var(--pink), #a06bff); color: #fff; }
.tier--rare { background: linear-gradient(90deg, var(--cyan), #2b8cff); color: #04121a; }
.tier--uncommon { background: linear-gradient(90deg, var(--lime), var(--cyan)); color: #0a1a06; }
.tier--common { background: rgba(255,255,255,.12); color: var(--ink-dim); }

/* ===================== OBLISK X HELPER CHIP ===================== */
.oblisk-x {
  position: fixed; bottom: 20px; right: 20px; z-index: 150;
  display: flex; align-items: center; gap: 12px; max-width: 320px;
  padding: 12px 14px; border-radius: 16px;
  background: linear-gradient(160deg, rgba(14,6,18,.96), rgba(20,8,14,.96));
  border: 1px solid var(--red);
  box-shadow: 0 18px 50px -18px rgba(0,0,0,.85), 0 0 22px -8px rgba(255,46,68,.6);
  backdrop-filter: blur(12px);
  animation: obliskIn .4s cubic-bezier(.2,1.1,.3,1) both;
}
@keyframes obliskIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
.oblisk-x__eye {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, #2a0a12, #0a0408 75%);
  border: 1px solid rgba(255,46,68,.6);
  display: grid; place-items: center; position: relative;
  box-shadow: 0 0 14px -2px rgba(255,46,68,.7);
  animation: obliskGlow 2.4s ease-in-out infinite;
}
.oblisk-x__pupil {
  width: 11px; height: 11px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #ff8a98, var(--red) 60%, #7a0a14);
  box-shadow: 0 0 10px 1px rgba(255,46,68,.9);
  animation: obliskPupil 4s ease-in-out infinite;
}
@keyframes obliskGlow {
  0%,100% { box-shadow: 0 0 12px -3px rgba(255,46,68,.6); }
  50% { box-shadow: 0 0 20px 0 rgba(255,46,68,.95); }
}
@keyframes obliskPupil {
  0%,20%,100% { transform: translateX(0); }
  40% { transform: translateX(-3px); }
  70% { transform: translateX(3px); }
}
.oblisk-x__body { flex: 1; min-width: 0; }
.oblisk-x__name {
  display: block; font-family: var(--font-display); font-weight: 800; font-size: 11px;
  letter-spacing: .22em; color: var(--red); text-shadow: 0 0 10px rgba(255,46,68,.5);
}
.oblisk-x__tip { margin: 3px 0 0; font-size: 12.5px; color: var(--ink-dim); line-height: 1.35; }
.oblisk-x__close {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px; cursor: pointer;
  background: rgba(255,255,255,.05); border: 1px solid var(--stroke-2); color: var(--ink-mute);
  font-size: 12px; transition: all .15s; align-self: flex-start;
}
.oblisk-x__close:hover { border-color: var(--red); color: #fff; }

/* prompt focus — hint of red */
.prompt-input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(255,46,68,.15); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 560px) {
  .wallet-chip__id { display: none; }
  .topbar__right { gap: 8px; }
  .map-link { padding: 9px 11px; }
  .map-link__text { display: none; } /* glyph-only on phones to save room */
  .vault-stats { grid-template-columns: 1fr; }
  .stat { flex-direction: row; align-items: center; justify-content: space-between; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .card__name { font-size: 14px; }
  .tab { font-size: 12px; padding: 12px 12px 13px; }
  .coll-controls__row { flex-direction: column; align-items: stretch; }
  .coll-controls__row .btn--forge { margin-left: 0; }
  .coll-name-input { min-width: 0; width: 100%; }
  .coll-stats { grid-template-columns: 1fr; }
  .oblisk-x { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  .seg__btn { padding: 8px 13px; font-size: 12px; }
}
@media (max-width: 380px) {
  .grid { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
