/* ============================================================
   Shop + Inventory — prefixed .sh-*
   ============================================================ */

.sh-root {
  max-width: 1040px;
  margin: 0 auto;
  padding: 20px 16px 80px;
  color: var(--text-primary);
}
.sh-root::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1100px 620px at 12% -8%, rgba(124,58,237,.18), transparent 60%),
    radial-gradient(900px 540px at 90% 4%, rgba(244,114,182,.11), transparent 62%);
}

.sh-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.sh-head h1 {
  margin: 0;
  font-size: 1.8rem;
  letter-spacing: -0.01em;
  color: var(--text-heading);
}
.sh-sub {
  margin: 4px 0 0;
  color: var(--text-faint);
  font-size: 0.88rem;
}

.sh-wallet { display: flex; gap: 10px; }
.sh-wallet-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: linear-gradient(180deg, rgba(30,30,48,0.85), rgba(18,18,30,0.85));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(255,255,255,0.03);
}
.sh-wallet-ico {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  font-size: 0.9rem;
  line-height: 1;
}
.sh-wallet-ico-coin {
  background: radial-gradient(circle at 30% 30%, #fde68a, #b45309 70%, #78350f);
  color: #78350f;
  box-shadow: inset 0 0 0 1px rgba(253,230,138,0.5), 0 0 8px rgba(245,158,11,0.35);
}
.sh-wallet-ico-token {
  background: radial-gradient(circle at 30% 30%, #bae6fd, #2563eb 70%, #1e3a8a);
  color: #e0f2fe;
  box-shadow: inset 0 0 0 1px rgba(191,219,254,0.6), 0 0 8px rgba(59,130,246,0.4);
}

.sh-tabs {
  display: flex; gap: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 18px;
}
.sh-tab {
  background: transparent;
  border: 0;
  color: var(--text-faint);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 10px 16px;
  cursor: pointer;
  position: relative;
  transition: color 160ms ease;
}
.sh-tab:hover { color: var(--text-primary); }
.sh-tab-active { color: var(--text-primary); }
.sh-tab-active::after {
  content: "";
  position: absolute;
  left: 8px; right: 8px; bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, #c79bff, #7dd3fc);
  border-radius: 2px;
}
.sh-tab-count {
  display: inline-block;
  min-width: 20px;
  padding: 1px 7px;
  margin-left: 4px;
  font-size: 0.72rem;
  background: rgba(199,155,255,0.25);
  color: #ddd6fe;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.sh-panel { display: none; }
.sh-panel-active { display: block; }

.sh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.sh-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-faint);
  padding: 40px 16px;
}

/* ---- item card ---- */
.sh-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(24,24,40,0.92), rgba(12,12,22,0.92));
  border: 1px solid var(--sh-rarity-border, rgba(255,255,255,0.08));
  box-shadow: 0 10px 24px rgba(0,0,0,0.35), inset 0 0 0 1px rgba(255,255,255,0.02);
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.sh-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5),
              0 0 26px var(--sh-rarity-glow, transparent),
              inset 0 0 0 1px rgba(255,255,255,0.05);
}
.sh-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--sh-rarity-wash, transparent), transparent 55%);
  pointer-events: none;
  opacity: 0.45;
}

.sh-card-top {
  display: flex; align-items: center; gap: 10px;
}
.sh-card-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 1.4rem;
  font-weight: 900;
  color: #fff;
  background: var(--sh-rarity-icon-bg, linear-gradient(135deg, #374151, #1f2937));
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.15),
    inset 0 -3px 8px rgba(0,0,0,0.5),
    0 0 14px var(--sh-rarity-glow, transparent);
  flex-shrink: 0;
}
.sh-card-title {
  flex: 1;
  min-width: 0;
}
.sh-card-label {
  font-weight: 800;
  font-size: 1rem;
  color: var(--text-heading);
  margin: 0 0 2px;
  line-height: 1.2;
}
.sh-card-rarity {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sh-rarity-label, #9ca3af);
}

.sh-card-blurb {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
  min-height: 2.3em;
  position: relative;
  z-index: 1;
}

.sh-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  position: relative;
  z-index: 1;
}

.sh-price {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
  font-size: 0.92rem;
}
.sh-price.sh-price-coins { color: #fbbf24; }
.sh-price.sh-price-tokens { color: #7dd3fc; }
.sh-price-ico {
  display: inline-grid; place-items: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  font-size: 0.62rem;
}
.sh-price-coins .sh-price-ico {
  background: radial-gradient(circle at 30% 30%, #fde68a, #b45309);
  color: #78350f;
}
.sh-price-tokens .sh-price-ico {
  background: radial-gradient(circle at 30% 30%, #bae6fd, #2563eb);
  color: #e0f2fe;
}

.sh-btn {
  border: 0;
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease, opacity 140ms ease, box-shadow 200ms ease;
}
.sh-btn:hover { transform: translateY(-1px); filter: brightness(1.1); }
.sh-btn:active { transform: scale(0.97); }
.sh-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  filter: grayscale(0.4);
}
.sh-btn-buy {
  background: linear-gradient(135deg, #c79bff, #7c3aed);
  color: #fff;
  box-shadow: 0 4px 14px rgba(124,58,237,0.35);
}
.sh-btn-use {
  background: linear-gradient(135deg, #34d399, #059669);
  color: #052e22;
  box-shadow: 0 4px 14px rgba(16,185,129,0.35);
}
.sh-btn-owned {
  background: rgba(255,255,255,0.08);
  color: var(--text-faint);
}

.sh-qty {
  font-size: 0.78rem;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
.sh-qty strong { color: var(--text-primary); font-weight: 800; }

/* ---- rarity tokens ---- */
.sh-r-common {
  --sh-rarity-border: rgba(156,163,175,0.25);
  --sh-rarity-label: #9ca3af;
  --sh-rarity-wash: rgba(156,163,175,0.08);
  --sh-rarity-glow: transparent;
  --sh-rarity-icon-bg: linear-gradient(135deg, #374151, #1f2937);
}
.sh-r-uncommon {
  --sh-rarity-border: rgba(52,211,153,0.38);
  --sh-rarity-label: #34d399;
  --sh-rarity-wash: rgba(16,185,129,0.10);
  --sh-rarity-glow: rgba(16,185,129,0.20);
  --sh-rarity-icon-bg: linear-gradient(135deg, #065f46, #022c22);
}
.sh-r-rare {
  --sh-rarity-border: rgba(125,211,252,0.42);
  --sh-rarity-label: #7dd3fc;
  --sh-rarity-wash: rgba(56,189,248,0.12);
  --sh-rarity-glow: rgba(56,189,248,0.28);
  --sh-rarity-icon-bg: linear-gradient(135deg, #0c4a6e, #082f49);
}
.sh-r-epic {
  --sh-rarity-border: rgba(199,155,255,0.48);
  --sh-rarity-label: #c79bff;
  --sh-rarity-wash: rgba(124,58,237,0.14);
  --sh-rarity-glow: rgba(124,58,237,0.32);
  --sh-rarity-icon-bg: linear-gradient(135deg, #4c1d95, #1e1b4b);
}
.sh-r-legendary {
  --sh-rarity-border: rgba(251,191,36,0.55);
  --sh-rarity-label: #fbbf24;
  --sh-rarity-wash: rgba(245,158,11,0.16);
  --sh-rarity-glow: rgba(245,158,11,0.40);
  --sh-rarity-icon-bg: linear-gradient(135deg, #78350f, #451a03);
}
.sh-r-legendary .sh-card-label { color: #fde68a; }
.sh-r-legendary::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1.2px 1.2px at 20% 20%, rgba(253,230,138,0.7), transparent 60%),
    radial-gradient(1.2px 1.2px at 80% 15%, rgba(253,230,138,0.6), transparent 60%),
    radial-gradient(1.2px 1.2px at 70% 90%, rgba(253,230,138,0.6), transparent 60%),
    radial-gradient(1.2px 1.2px at 15% 85%, rgba(253,230,138,0.5), transparent 60%);
  pointer-events: none;
  animation: sh-shimmer 6s ease-in-out infinite;
  opacity: 0.7;
}
@keyframes sh-shimmer {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 0.9; }
}

/* ---- toast ---- */
.sh-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 20px;
  background: linear-gradient(180deg, rgba(24,24,40,0.98), rgba(12,12,22,0.98));
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  color: var(--text-primary);
  font-weight: 700;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease, transform 260ms cubic-bezier(.2,.8,.2,1);
  z-index: 5000;
  max-width: 320px;
  text-align: center;
}
.sh-toast.sh-toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.sh-toast.sh-toast-good { border-color: rgba(52,211,153,0.55); }
.sh-toast.sh-toast-bad  { border-color: rgba(248,113,113,0.55); }

@media (max-width: 640px) {
  .sh-head { gap: 10px; }
  .sh-head h1 { font-size: 1.4rem; }
  .sh-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
  .sh-card { padding: 12px; }
  .sh-card-icon { width: 38px; height: 38px; font-size: 1.2rem; }
}

/* ============================================================
   PER-ITEM ICON ART
   Replaces the flat rarity-tinted box with a unique sculpted
   glyph. Shared scaffold: every .sh-icon-* gets a specular
   highlight via ::before and a per-item shimmer via ::after.
   ============================================================ */

.sh-card-icon[class*="sh-icon-"],
.sh-acquire-icon[class*="sh-icon-"] {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.sh-card-icon[class*="sh-icon-"]::before,
.sh-acquire-icon[class*="sh-icon-"]::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 22%, rgba(255,255,255,.45) 0%, rgba(255,255,255,0) 40%),
    radial-gradient(ellipse at 50% 100%, rgba(0,0,0,.45) 0%, rgba(0,0,0,0) 65%);
  pointer-events: none;
  z-index: 1;
}
.sh-card-icon[class*="sh-icon-"]::after,
.sh-acquire-icon[class*="sh-icon-"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg,
    transparent 40%,
    rgba(255,255,255,.25) 48%,
    rgba(255,255,255,.55) 50%,
    rgba(255,255,255,.25) 52%,
    transparent 60%);
  pointer-events: none;
  z-index: 2;
  animation: sh-icon-shine 4.5s ease-in-out infinite;
  opacity: 0;
}
@keyframes sh-icon-shine {
  0%, 70%, 100% { transform: translateX(-120%); opacity: 0; }
  35%           { transform: translateX(120%);  opacity: 1; }
}
.sh-icon-glyph {
  position: relative;
  z-index: 3;
  font-family: "JetBrains Mono", "Fira Code", "Consolas", ui-monospace, monospace;
  font-weight: 900;
  text-shadow:
    0 1px 0 rgba(0,0,0,.55),
    0 0 12px currentColor;
  line-height: 1;
}

/* ---- XP potions (spark → inkfire) ---- */
.sh-icon-potion_spark {
  background:
    radial-gradient(circle at 30% 22%, #bae6fd 0%, #38bdf8 38%, #0c4a6e 100%);
  color: #e0f2fe;
  box-shadow:
    inset 0 0 0 1px rgba(186,230,253,.65),
    inset 0 -4px 10px rgba(12,74,110,.75),
    0 0 16px rgba(56,189,248,.45);
}
.sh-icon-potion_kindling {
  background:
    radial-gradient(circle at 50% 100%, #fde68a 0%, #f59e0b 28%, #7c2d12 85%, #1f0a03 100%);
  color: #fef3c7;
  box-shadow:
    inset 0 0 0 1px rgba(253,230,138,.6),
    inset 0 -4px 10px rgba(67,20,7,.7),
    0 0 18px rgba(245,158,11,.5);
  animation: sh-icon-flicker 2.8s ease-in-out infinite;
}
@keyframes sh-icon-flicker {
  0%, 100% { box-shadow:
              inset 0 0 0 1px rgba(253,230,138,.6),
              inset 0 -4px 10px rgba(67,20,7,.7),
              0 0 18px rgba(245,158,11,.5); }
  50%      { box-shadow:
              inset 0 0 0 1px rgba(253,230,138,.7),
              inset 0 -4px 14px rgba(67,20,7,.8),
              0 0 28px rgba(245,158,11,.75); }
}
.sh-icon-potion_inkfire {
  background:
    radial-gradient(circle at 30% 28%, #f472b6 0%, #a21caf 32%, #1e1b4b 78%, #030014 100%);
  color: #fbcfe8;
  box-shadow:
    inset 0 0 0 1px rgba(244,114,182,.55),
    inset 0 -4px 10px rgba(3,0,20,.9),
    0 0 20px rgba(162,28,175,.55);
}

/* ---- Coin / token ---- */
.sh-icon-charm_coinfall {
  background:
    radial-gradient(circle at 30% 22%, #fef3c7 0%, #fbbf24 40%, #78350f 100%);
  color: #78350f;
  box-shadow:
    inset 0 0 0 2px rgba(253,230,138,.75),
    inset 0 -4px 10px rgba(69,26,3,.6),
    0 0 16px rgba(245,158,11,.55);
}
.sh-icon-chest_dragonhoard {
  background:
    radial-gradient(circle at 30% 25%, #fde68a 0%, #a16207 35%, #134e4a 78%, #042f2e 100%);
  color: #fde68a;
  box-shadow:
    inset 0 0 0 1px rgba(253,230,138,.6),
    inset 0 -4px 12px rgba(4,47,46,.7),
    0 0 18px rgba(180,83,9,.55);
}
.sh-icon-scroll_fortune {
  background:
    radial-gradient(circle at 30% 25%, #fef3c7 0%, #d4a574 35%, #78350f 85%, #451a03 100%);
  color: #fef3c7;
  box-shadow:
    inset 0 0 0 1px rgba(252,211,77,.55),
    inset 0 -4px 10px rgba(69,26,3,.6),
    0 0 14px rgba(161,98,7,.45);
}
.sh-icon-token_shard {
  background:
    linear-gradient(135deg, #cffafe 0%, #22d3ee 38%, #0e7490 75%, #083344 100%);
  color: #e0f2fe;
  box-shadow:
    inset 0 0 0 1px rgba(207,250,254,.7),
    inset 0 -4px 10px rgba(8,51,68,.75),
    0 0 18px rgba(34,211,238,.55);
}

/* ---- Runes ---- */
.sh-icon-rune_stats {
  background:
    radial-gradient(circle at 30% 25%, #94a3b8 0%, #475569 45%, #1e293b 100%);
  color: #fdba74;
  box-shadow:
    inset 0 0 0 1px rgba(148,163,184,.55),
    inset 0 -4px 10px rgba(15,23,42,.85),
    0 0 14px rgba(249,115,22,.35);
}
.sh-icon-rune_stats_great {
  background:
    radial-gradient(circle at 30% 25%, #57534e 0%, #1c1917 55%, #0c0a09 100%);
  color: #fbbf24;
  box-shadow:
    inset 0 0 0 1px rgba(251,191,36,.5),
    inset 0 -4px 12px rgba(0,0,0,.9),
    0 0 18px rgba(245,158,11,.6);
}

/* ---- Protection ---- */
.sh-icon-charm_streakshield {
  background:
    linear-gradient(180deg, #cbd5e1 0%, #64748b 40%, #1e293b 100%);
  color: #f1f5f9;
  box-shadow:
    inset 0 0 0 1px rgba(203,213,225,.7),
    inset 0 -4px 10px rgba(15,23,42,.75),
    0 0 16px rgba(59,130,246,.45);
}

/* ---- Mystery crates ---- */
.sh-icon-crate_mystery {
  background:
    radial-gradient(circle at 30% 25%, #dcc8ff 0%, #7c3aed 45%, #2e1065 100%);
  color: #ede9fe;
  box-shadow:
    inset 0 0 0 1px rgba(196,181,253,.6),
    inset 0 -4px 10px rgba(46,16,101,.75),
    0 0 18px rgba(124,58,237,.5);
  animation: sh-icon-jitter 5s ease-in-out infinite;
}
@keyframes sh-icon-jitter {
  0%, 100% { transform: rotate(0deg); }
  45%      { transform: rotate(-2deg); }
  55%      { transform: rotate(2deg); }
}
.sh-icon-crate_starlit {
  background:
    radial-gradient(1px 1px at 22% 22%, #fff, transparent 60%),
    radial-gradient(1px 1px at 78% 30%, #fff, transparent 60%),
    radial-gradient(1px 1px at 40% 82%, #fff, transparent 60%),
    radial-gradient(circle at 50% 50%, #1e1b4b 0%, #0a0521 70%, #000 100%);
  color: #dcc8ff;
  box-shadow:
    inset 0 0 0 1px rgba(199,155,255,.55),
    inset 0 0 12px rgba(0,0,0,.9),
    0 0 22px rgba(109,40,217,.55);
}

/* ---- Bottled (day/night) ---- */
.sh-icon-bottled_sunlight {
  background:
    radial-gradient(circle at 50% 40%, #fef9c3 0%, #fbbf24 40%, #b45309 90%);
  color: #fff7ed;
  box-shadow:
    inset 0 0 0 1px rgba(254,249,195,.75),
    inset 0 -3px 10px rgba(120,53,15,.6),
    0 0 22px rgba(245,158,11,.65);
}
.sh-icon-bottled_midnight {
  background:
    radial-gradient(circle at 50% 40%, #c7d2fe 0%, #4338ca 35%, #1e1b4b 78%, #020617 100%);
  color: #dbeafe;
  box-shadow:
    inset 0 0 0 1px rgba(199,210,254,.55),
    inset 0 -3px 10px rgba(2,6,23,.85),
    0 0 20px rgba(67,56,202,.55);
}

/* ---- Legendaries (non-apex) ---- */
.sh-icon-philosopher_draught {
  background: conic-gradient(from 0deg,
    #065f46 0%, #0e7490 14%, #1e40af 28%,
    #6d28d9 42%, #be185d 56%, #9a3412 70%,
    #b45309 84%, #065f46 100%);
  color: #fff;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.55),
    inset 0 0 10px rgba(0,0,0,.6),
    0 0 24px rgba(124,58,237,.55);
  filter: saturate(.95);
  animation: sh-icon-huespin 14s linear infinite;
}
@keyframes sh-icon-huespin {
  to { filter: hue-rotate(360deg) saturate(.95); }
}
.sh-icon-tome_titan {
  background:
    radial-gradient(circle at 30% 25%, #fca5a5 0%, #991b1b 35%, #450a0a 78%, #1c0505 100%);
  color: #fde68a;
  box-shadow:
    inset 0 0 0 1px rgba(251,191,36,.5),
    inset 0 -4px 12px rgba(28,5,5,.9),
    0 0 22px rgba(153,27,27,.6);
}

/* ============================================================
   APEX — Ichor of the Progenitor
   Full event-horizon treatment. Spinning cosmic ring, starfield,
   pulsing corona, rainbow halo. This is the one.
   ============================================================ */
.sh-icon-ichor_progenitor {
  background:
    radial-gradient(circle at 50% 50%,
      #000 0%, #000 28%, #4c1d95 40%, #06b6d4 55%,
      #f59e0b 70%, #be185d 85%, #050510 100%);
  color: #fff;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.45),
    inset 0 0 12px rgba(0,0,0,.85),
    0 0 30px rgba(236,72,153,.7),
    0 0 50px rgba(6,182,212,.35);
  filter: saturate(1.1);
  animation: sh-icon-cosmic-breath 4.5s ease-in-out infinite;
}
@keyframes sh-icon-cosmic-breath {
  0%, 100% {
    box-shadow:
      inset 0 0 0 1px rgba(255,255,255,.45),
      inset 0 0 12px rgba(0,0,0,.85),
      0 0 30px rgba(236,72,153,.7),
      0 0 50px rgba(6,182,212,.35);
  }
  50% {
    box-shadow:
      inset 0 0 0 1px rgba(255,255,255,.6),
      inset 0 0 16px rgba(0,0,0,.9),
      0 0 44px rgba(236,72,153,.85),
      0 0 80px rgba(6,182,212,.55),
      0 0 120px rgba(253,224,71,.25);
  }
}
.sh-icon-ichor_progenitor::before {
  background:
    radial-gradient(1px 1px at 20% 22%, #fff, transparent 60%),
    radial-gradient(1px 1px at 80% 30%, #fff, transparent 60%),
    radial-gradient(1px 1px at 30% 82%, #fde047, transparent 60%),
    radial-gradient(1px 1px at 70% 78%, #ec4899, transparent 60%),
    radial-gradient(1px 1px at 50% 12%, #fff, transparent 60%),
    radial-gradient(circle at 30% 22%, rgba(255,255,255,.35) 0%, rgba(255,255,255,0) 48%);
  animation: sh-icon-cosmic-pulse 3s ease-in-out infinite;
}
@keyframes sh-icon-cosmic-pulse {
  0%, 100% { opacity: .6; }
  50%      { opacity: 1;  }
}
.sh-icon-ichor_progenitor::after {
  /* replace the linear shine with a rainbow halo */
  background:
    conic-gradient(from 0deg,
      transparent 0 15%, rgba(6,182,212,.6) 15% 17%, transparent 17% 40%,
      rgba(236,72,153,.6) 40% 42%, transparent 42% 65%,
      rgba(253,224,71,.6) 65% 67%, transparent 67% 90%,
      rgba(168,85,247,.6) 90% 92%, transparent 92%);
  animation: sh-icon-cosmic-halo 10s linear infinite;
  opacity: .85;
  filter: blur(.5px);
}
@keyframes sh-icon-cosmic-halo {
  to { transform: rotate(360deg); }
}
.sh-icon-ichor_progenitor .sh-icon-glyph {
  color: #fff;
  text-shadow:
    0 0 4px #fff,
    0 0 10px #a5f3fc,
    0 0 20px #ec4899,
    0 0 30px #fde047;
  animation: sh-icon-cosmic-glyph 3s ease-in-out infinite;
}
@keyframes sh-icon-cosmic-glyph {
  0%, 100% { transform: scale(1);    filter: brightness(1); }
  50%      { transform: scale(1.12); filter: brightness(1.35); }
}

/* Apex card gets extra polish — bigger rarity label glow + edge pulse */
.sh-r-legendary[data-code="ichor_progenitor"] .sh-card-label {
  background: linear-gradient(135deg, #fde68a 0%, #fff 35%, #f472b6 65%, #a5f3fc 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          text-fill-color: transparent;
  animation: sh-icon-cosmic-glyph 4s ease-in-out infinite;
}

/* ============================================================
   SYSTEM BOOT intro (.sh-boot)
   Reuses the .sl-* corner brackets. Renders once on page load,
   then fades and unmounts. Root content stays hidden until the
   intro finishes (JS toggles .sh-ready on .sh-root).
   ============================================================ */

.sh-root {
  opacity: 0;
  transition: opacity .45s ease .1s;
}
.sh-root.sh-ready {
  opacity: 1;
}

.sh-boot {
  position: fixed;
  inset: 0;
  z-index: 9200;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "JetBrains Mono", "Fira Code", "Consolas", ui-monospace, monospace;
  cursor: pointer;
  opacity: 0;
  transition: opacity .28s ease;
}
.sh-boot.sh-boot-in   { opacity: 1; }
.sh-boot.sh-boot-out  { opacity: 0; pointer-events: none; }

.sh-boot-backdrop {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(8,20,40,.55) 0%, rgba(0,0,0,.82) 70%, #000 100%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.sh-boot-backdrop::before {
  /* faint scanlines for CRT vibe */
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg,
    rgba(56,189,248,.04) 0px, rgba(56,189,248,.04) 1px,
    transparent 1px, transparent 3px);
  pointer-events: none;
}

.sh-boot-panel {
  position: relative;
  z-index: 1;
  min-width: 380px;
  max-width: 540px;
  padding: 28px 32px 22px;
  color: #bae6fd;
  background:
    linear-gradient(180deg, rgba(8,20,40,.88), rgba(3,12,28,.82));
  border: 1px solid rgba(56,189,248,.45);
  box-shadow:
    0 0 0 1px rgba(56,189,248,.12),
    0 0 40px -4px rgba(56,189,248,.55),
    0 20px 60px -10px rgba(0,0,0,.75),
    inset 0 0 0 1px rgba(255,255,255,.03);
  transform: scale(.94);
  transition: transform .4s cubic-bezier(.22,1,.36,1);
  isolation: isolate;
}
.sh-boot.sh-boot-in .sh-boot-panel { transform: scale(1); }

.sh-boot-tag {
  font-size: .72rem;
  letter-spacing: .42em;
  color: #38bdf8;
  text-shadow: 0 0 10px rgba(56,189,248,.6);
  text-align: center;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(56,189,248,.18);
  text-transform: uppercase;
}

.sh-boot-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: .82rem;
  color: rgba(186,230,253,.75);
  min-height: 108px;
}
.sh-boot-line {
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .25s ease, transform .3s cubic-bezier(.22,1,.36,1);
}
.sh-boot.sh-boot-in .sh-boot-line[data-line="1"] { transition-delay: .10s; opacity: 1; transform: none; }
.sh-boot.sh-boot-in .sh-boot-line[data-line="2"] { transition-delay: .40s; opacity: 1; transform: none; }
.sh-boot.sh-boot-in .sh-boot-line[data-line="3"] { transition-delay: .70s; opacity: 1; transform: none; }
.sh-boot.sh-boot-in .sh-boot-line[data-line="4"] { transition-delay: 1.00s; opacity: 1; transform: none; }

.sh-boot-prompt {
  color: #38bdf8;
  font-weight: 700;
  margin-right: 8px;
  text-shadow: 0 0 6px rgba(56,189,248,.8);
}
.sh-boot-ok {
  color: #34d399;
  font-weight: 700;
  margin-left: 8px;
  text-shadow: 0 0 6px rgba(16,185,129,.7);
}
.sh-boot-dots::after {
  content: "";
  display: inline-block;
  animation: sh-boot-dots 1s steps(4) infinite;
}
@keyframes sh-boot-dots {
  0%   { content: ""; }
  25%  { content: "."; }
  50%  { content: ".."; }
  75%  { content: "..."; }
  100% { content: ""; }
}

.sh-boot-scan {
  position: relative;
  height: 2px;
  margin: 14px 0 12px;
  overflow: hidden;
  background: rgba(56,189,248,.08);
}
.sh-boot-scan::before {
  content: "";
  position: absolute;
  left: -30%; top: 0;
  width: 30%; height: 100%;
  background: linear-gradient(90deg, transparent, #7dd3fc, #fff, #7dd3fc, transparent);
  box-shadow: 0 0 10px #7dd3fc;
  animation: sh-boot-scan 1.4s cubic-bezier(.22,1,.36,1) 1 forwards;
}
@keyframes sh-boot-scan {
  to { left: 100%; }
}

.sh-boot-title {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: .36em;
  color: #fff;
  text-shadow:
    0 0 14px rgba(56,189,248,.95),
    0 0 28px rgba(56,189,248,.55);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .4s ease, transform .4s cubic-bezier(.22,1,.36,1);
  padding-left: .36em;
}
.sh-boot.sh-boot-in .sh-boot-title {
  transition-delay: 1.25s;
  opacity: 1;
  transform: none;
}

.sh-boot-hint {
  text-align: center;
  font-size: .68rem;
  letter-spacing: .24em;
  color: rgba(186,230,253,.55);
  margin-top: 12px;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity .5s ease;
}
.sh-boot.sh-boot-in .sh-boot-hint {
  transition-delay: 1.5s;
  opacity: 1;
  animation: sh-boot-blink 1.4s ease-in-out 2s infinite;
}
@keyframes sh-boot-blink {
  0%, 100% { opacity: .55; }
  50%      { opacity: .9; }
}

/* ============================================================
   ITEM ACQUIRED card (.sh-acquire)
   Fires after a successful buy. Takes the .sl-lvlup shape and
   tints the panel glow by item rarity.
   ============================================================ */
.sh-acquire {
  position: fixed;
  inset: 0;
  z-index: 9300;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "JetBrains Mono", "Fira Code", "Consolas", ui-monospace, monospace;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}
.sh-acquire.sh-acquire-in  { opacity: 1; pointer-events: auto; }
.sh-acquire.sh-acquire-out { opacity: 0; }

.sh-acquire-backdrop {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(8,20,40,.55) 0%, rgba(0,0,0,.75) 70%, rgba(0,0,0,.9) 100%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.sh-acquire-panel {
  position: relative;
  z-index: 1;
  min-width: 340px;
  max-width: 440px;
  padding: 24px 28px 20px;
  text-align: center;
  color: #bae6fd;
  background:
    linear-gradient(180deg, rgba(8,20,40,.92), rgba(3,12,28,.88));
  border: 1px solid var(--sh-acq-border, rgba(56,189,248,.5));
  box-shadow:
    0 0 0 1px rgba(56,189,248,.1),
    0 0 36px -2px var(--sh-acq-glow, rgba(56,189,248,.6)),
    0 20px 50px -10px rgba(0,0,0,.8),
    inset 0 0 0 1px rgba(255,255,255,.03);
  transform: scale(.88) translateY(10px);
  opacity: 0;
  transition: transform .4s cubic-bezier(.22,1,.36,1), opacity .3s ease;
  isolation: isolate;
}
.sh-acquire.sh-acquire-in .sh-acquire-panel { transform: scale(1) translateY(0); opacity: 1; }

/* rarity tinting for panel + corner glow */
.sh-acquire.sh-acq-r-common    { --sh-acq-border: rgba(156,163,175,.45); --sh-acq-glow: rgba(156,163,175,.35); --sh-acq-ink: #e5e7eb; }
.sh-acquire.sh-acq-r-uncommon  { --sh-acq-border: rgba(52,211,153,.55); --sh-acq-glow: rgba(16,185,129,.55);  --sh-acq-ink: #6ee7b7; }
.sh-acquire.sh-acq-r-rare      { --sh-acq-border: rgba(125,211,252,.6); --sh-acq-glow: rgba(56,189,248,.6);   --sh-acq-ink: #7dd3fc; }
.sh-acquire.sh-acq-r-epic      { --sh-acq-border: rgba(199,155,255,.62);--sh-acq-glow: rgba(124,58,237,.6);   --sh-acq-ink: #dcc8ff; }
.sh-acquire.sh-acq-r-legendary { --sh-acq-border: rgba(251,191,36,.7); --sh-acq-glow: rgba(245,158,11,.7);    --sh-acq-ink: #fde68a; }
.sh-acquire .sl-corner {
  border-color: var(--sh-acq-ink, #38bdf8);
  filter: drop-shadow(0 0 6px var(--sh-acq-glow, rgba(56,189,248,.8)));
}

.sh-acquire-eyebrow {
  font-size: .72rem;
  letter-spacing: .42em;
  color: var(--sh-acq-ink, #38bdf8);
  text-shadow: 0 0 10px var(--sh-acq-glow, rgba(56,189,248,.6));
  text-transform: uppercase;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(56,189,248,.14);
}

.sh-acquire-icon {
  width: 84px; height: 84px;
  margin: 4px auto 14px;
  border-radius: 16px;
  display: grid; place-items: center;
  font-size: 2.5rem;
  font-weight: 900;
  color: #fff;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.25), transparent 50%),
    linear-gradient(180deg, rgba(30,30,48,.9), rgba(10,10,20,.95));
  border: 1px solid var(--sh-acq-border, rgba(56,189,248,.5));
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.12),
    inset 0 -4px 10px rgba(0,0,0,.5),
    0 0 28px var(--sh-acq-glow, rgba(56,189,248,.55));
  opacity: 0;
  transform: scale(.6) rotate(-8deg);
  transition: transform .55s cubic-bezier(.22,1,.36,1) .12s, opacity .4s ease .12s;
}
.sh-acquire.sh-acquire-in .sh-acquire-icon {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.sh-acquire-label {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: .02em;
  margin: 0 0 4px;
  text-shadow: 0 0 10px var(--sh-acq-glow, rgba(56,189,248,.6));
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .35s ease .2s, transform .35s cubic-bezier(.22,1,.36,1) .2s;
}
.sh-acquire.sh-acquire-in .sh-acquire-label { opacity: 1; transform: none; }

.sh-acquire-rarity {
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--sh-acq-ink, #7dd3fc);
  margin-bottom: 10px;
  opacity: 0;
  transition: opacity .35s ease .28s;
}
.sh-acquire.sh-acquire-in .sh-acquire-rarity { opacity: 1; }

.sh-acquire-blurb {
  font-size: .82rem;
  color: rgba(186,230,253,.78);
  font-style: italic;
  line-height: 1.4;
  margin: 0 0 12px;
  padding: 0 4px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .4s ease .32s, transform .4s cubic-bezier(.22,1,.36,1) .32s;
}
.sh-acquire.sh-acquire-in .sh-acquire-blurb { opacity: 1; transform: none; }

.sh-acquire-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  margin: 4px 0 2px;
  border: 1px solid rgba(56,189,248,.18);
  border-radius: 999px;
  font-size: .78rem;
  letter-spacing: .08em;
  color: rgba(186,230,253,.85);
  background: rgba(8,20,40,.5);
  opacity: 0;
  transition: opacity .4s ease .4s;
}
.sh-acquire.sh-acquire-in .sh-acquire-meta { opacity: 1; }

.sh-acquire-hint {
  font-size: .62rem;
  letter-spacing: .24em;
  color: rgba(186,230,253,.5);
  margin-top: 14px;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity .5s ease .6s;
}
.sh-acquire.sh-acquire-in .sh-acquire-hint {
  opacity: 1;
  animation: sh-boot-blink 1.4s ease-in-out 1s infinite;
}

/* Burst ring radiating out of the icon on spawn */
.sh-acquire-panel::after {
  content: "";
  position: absolute;
  top: 84px; left: 50%;
  width: 84px; height: 84px;
  margin-left: -42px;
  border-radius: 50%;
  border: 2px solid var(--sh-acq-ink, #7dd3fc);
  opacity: 0;
  pointer-events: none;
}
.sh-acquire.sh-acquire-in .sh-acquire-panel::after {
  animation: sh-acq-burst .9s cubic-bezier(.22,1,.36,1) .15s 1 forwards;
}
@keyframes sh-acq-burst {
  0%   { opacity: .9; transform: scale(.6); }
  100% { opacity: 0;  transform: scale(2.2); }
}

@media (max-width: 640px) {
  .sh-boot-panel   { min-width: 0; width: calc(100% - 28px); padding: 22px 18px 16px; }
  .sh-acquire-panel{ min-width: 0; width: calc(100% - 28px); padding: 20px 18px 16px; }
  .sh-acquire-icon { width: 68px; height: 68px; font-size: 2rem; }
  .sh-acquire-label{ font-size: 1.1rem; }
}
