:root {
  --bg-primary: #181B22;
  --bg-secondary: #14171D;
  --bg-surface: #232833;
  --bg-card: #1D212A;
  --bg-card-hover: #252A36;
  --bg-input: #1A1E26;
  --border-color: rgba(255, 255, 255, 0.09);
  --border-highlight: rgba(255, 255, 255, 0.18);
  --border-focus: #2563eb;
  --text-main: #f3f5f8;
  --text-muted: #9aa3b2;
  --text-secondary: #757e8e;
  --accent-blue: #1d4ed8;
  --accent-cyan: #2563eb;
  --accent-purple: #8b5cf6;
  --accent-gradient: linear-gradient(135deg, #2563eb 0%, #1740c4 100%);
  --accent-gradient-purple: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --accent-gold: #f59e0b;
  --accent-green: #10b981;
  --accent-rose: #f43f5e;
  --card-radius: 18px;
  --chip-radius: 12px;
  --bottom-dock-height: 78px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: #181B22;
  background-image:
    radial-gradient(circle at 50% -10%, rgba(59, 130, 246, 0.22) 0%, rgba(37, 99, 235, 0.08) 40%, transparent 72%),
    linear-gradient(180deg, #1b2231 0%, #181B22 48%, #141821 100%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  font-size: 14px;
  line-height: 1.4;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}

img {
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.24);
}

.balance-val,
.card-price,
.wallet-amount,
.curr-val,
.item-spec-val,
.cart-bar-total {
  font-variant-numeric: tabular-nums;
}

#app {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  background-color: transparent;
  overflow-x: clip;
}

/* Header: Organic Balance + Action Controls */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 8px 8px 8px;
  background: linear-gradient(180deg, rgba(22, 29, 43, 0.94) 0%, rgba(22, 26, 36, 0.8) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(59, 130, 246, 0.12);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-brand {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1;
  color: #f8fafc;
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
}

.header-avatar-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  padding: 0;
  border: 1.5px solid rgba(147, 197, 253, 0.36);
  background: linear-gradient(145deg, #38bdf8 0%, #2563eb 54%, #172554 100%);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: transform 0.16s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-avatar-btn:hover {
  border-color: rgba(147, 197, 253, 0.65);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.header-avatar-btn:active {
  transform: scale(0.94);
}

.header-avatar-initial {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.2px;
  line-height: 1;
  text-shadow: 0 1px 4px rgba(10, 14, 24, 0.45);
}

.header-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--bg-input);
  border: 1px solid rgba(147, 197, 253, 0.13);
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-icon-btn:hover {
  border-color: rgba(59, 130, 246, 0.45);
  color: #ffffff;
  background: var(--bg-card-hover);
}

.header-icon-btn:active {
  transform: scale(0.95);
}

.lang-pill-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 42px;
  background: var(--bg-input);
  border: 1px solid rgba(147, 197, 253, 0.13);
  padding: 0 13px;
  border-radius: 13px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.lang-pill-btn:hover {
  background: var(--bg-card-hover);
  border-color: rgba(59, 130, 246, 0.45);
}

.lang-pill-btn:active {
  transform: scale(0.96);
}

.balance-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  background: transparent;
  border: 1px solid transparent;
  padding: 3px 4px 3px 6px;
  border-radius: 11px;
  color: var(--text-main);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: none;
}

.balance-badge:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(96, 165, 250, 0.22);
}

.balance-badge:active {
  transform: scale(0.97);
}

.balance-gem-wrap {
  width: 16px;
  height: 16px;
  border-radius: 0;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 5px rgba(255, 255, 255, 0.18));
}

.balance-plus-pill {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(96, 165, 250, 0.34);
  color: #dbeafe;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 1px;
  box-shadow: none;
  flex-shrink: 0;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.balance-badge:hover .balance-plus-pill {
  background: rgba(59, 130, 246, 0.42);
  border-color: rgba(147, 197, 253, 0.65);
  color: #ffffff;
}

.gramm-logo-svg {
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
}

.gem-icon {
  width: 16px;
  height: 16px;
}

.curr-icon-gramm {
  width: 15px;
  height: 15px;
}

.wallet-gramm-logo {
  width: 30px;
  height: 30px;
  align-self: center;
}

.curr-name-gramm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.gramm-logo-xs {
  width: 13px;
  height: 13px;
}

.promo-gramm-logo {
  width: 28px;
  height: 28px;
}

.balance-meta {
  display: inline-flex;
  align-items: baseline;
}

.balance-val {
  font-size: 14px;
  font-weight: 500;
  color: #f8fafc;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.balance-val .balance-frac {
  font-weight: 400;
  color: rgba(203, 213, 225, 0.55);
}

/* Content Container */
.content-container {
  flex: 1;
  min-width: 0;
  padding: 2px 8px calc(var(--bottom-dock-height) + 14px) 8px;
  transition: padding-bottom 0.22s ease;
}

.content-container.has-cart-bar {
  padding-bottom: calc(var(--bottom-dock-height) + 74px);
}

.tab-page {
  display: none;
  animation: tabFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.tab-page.active {
  display: block;
}

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* News & Events Peek Carousel (matches wireframe 3-card peek strip) */
.news-carousel {
  position: relative;
  overflow: hidden;
  margin: 0 -8px 8px -8px;
  padding: 0 0 14px 0;
}

.news-track {
  display: flex;
  gap: 10px;
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.news-slide {
  flex: 0 0 74%;
  border-radius: 16px;
  padding: 15px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  min-height: 92px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  opacity: 0.58;
  transform: scale(0.95);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease, border-color 0.25s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.news-slide.active {
  opacity: 1;
  transform: scale(1);
  border-color: rgba(255, 255, 255, 0.2);
}

.slide-1 {
  background: linear-gradient(135deg, #273244 0%, #222b3a 100%);
}

.slide-2 {
  background: linear-gradient(135deg, #26354d 0%, #1f2a3c 100%);
}

.slide-3 {
  background: linear-gradient(135deg, #2a3342 0%, #232934 100%);
}

.slide-content h3 {
  font-size: 16.5px;
  font-weight: 800;
  margin: 4px 0 2px 0;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.slide-content p {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  line-height: 1.3;
}

.slide-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.18);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.slide-decor {
  font-size: 36px;
  opacity: 0.95;
  margin-left: 8px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.28));
}

.carousel-dots {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

.carousel-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.carousel-dots .dot.active {
  width: 18px;
  border-radius: 8px;
  background: #ffffff;
}

/* Search Bar Row */
.search-bar-row {
  display: flex;
  gap: 4px;
  margin-bottom: 4px;
}

.search-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input-wrap input {
  width: 100%;
  min-height: 48px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 13px;
  padding: 12px 14px 12px 42px;
  color: var(--text-main);
  font-size: 14px;
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-input-wrap input::placeholder {
  color: var(--text-secondary);
}

.search-input-wrap input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
}

.filter-toggle-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 13px;
  width: 54px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
  flex-shrink: 0;
}

.filter-toggle-btn svg {
  width: 19px;
  height: 19px;
}

.filter-toggle-btn:hover,
.filter-toggle-btn.active {
  background: var(--bg-card-hover);
  border-color: #3b82f6;
  color: #3b82f6;
}

.filter-toggle-btn:active {
  transform: scale(0.95);
}

/* Collapsible Filter & Sort Panel */
.filter-panel {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, margin-bottom 0.25s ease;
  margin-bottom: 0;
}

.filter-panel.open {
  max-height: 780px;
  opacity: 1;
  margin-bottom: 8px;
}

/* Category Chips */
.category-chips {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 0;
  scrollbar-width: none;
}

.category-chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 1;
  min-width: 0;
  justify-content: center;
  min-height: 46px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 11px 10px;
  border-radius: 13px;
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 6px;
}

.chip:hover {
  border-color: var(--border-highlight);
  color: var(--text-main);
}

.chip.active {
  background: rgba(59, 130, 246, 0.22);
  border-color: var(--accent-cyan);
  color: #ffffff;
}

.sort-pills-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.sort-pills-row::-webkit-scrollbar {
  display: none;
}

.sort-pill {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 5px 10px;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sort-pill:hover {
  color: var(--text-main);
  border-color: var(--border-highlight);
}

.sort-pill.active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.24);
  color: #ffffff;
}

/* Main Lots Grid Wrapper (clean, boxless surface) */
.lots-board {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

/* Catalog Meta Row */
.catalog-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  padding: 0 2px;
  font-size: 12px;
  color: var(--text-muted);
}

.catalog-meta-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.toggle-my-lots-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(147, 197, 253, 0.18);
  color: #cbd5e1;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.toggle-my-lots-btn:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(96, 165, 250, 0.42);
  color: #ffffff;
}

.toggle-my-lots-btn.is-hidden {
  background: rgba(59, 130, 246, 0.22);
  border-color: rgba(59, 130, 246, 0.65);
  color: #93c5fd;
}

.toggle-my-lots-btn:active {
  transform: scale(0.95);
}

.sort-select-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s;
}

.sort-select-btn:hover {
  color: var(--text-main);
}

/* Sort By Modal (#2E323B Slate Design) */
.sort-modal-sheet {
  padding-bottom: 20px;
}

.sort-options-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 58vh;
  overflow-y: auto;
  margin-bottom: 16px;
}

.sort-option-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.16s ease;
}

.sort-option-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.sort-option-row input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.sort-radio-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.sort-radio-circle::after {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-cyan);
  transform: scale(0);
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.sort-option-row input[type="radio"]:checked + .sort-radio-circle {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

.sort-option-row input[type="radio"]:checked + .sort-radio-circle::after {
  transform: scale(1);
}

.sort-option-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.sort-option-row input[type="radio"]:checked ~ .sort-option-text {
  color: #ffffff;
  font-weight: 600;
}

.sort-modal-actions {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
}

.btn-sort-reset {
  background: #252931;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 13px 18px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.btn-sort-reset:hover {
  background: var(--bg-card-hover);
  color: #ffffff;
  border-color: var(--border-highlight);
}

.btn-sort-apply {
  padding: 13px 18px;
  font-size: 14.5px;
}

/* Goods Grid */
.goods-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.item-card {
  min-width: 0;
  background: #1D222C;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 15px;
  padding: 6px 6px 9px 6px;
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  contain: layout style paint;
  content-visibility: auto;
  contain-intrinsic-size: 225px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.2s ease,
              border-color 0.2s ease,
              box-shadow 0.22s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.item-card:hover {
  background: #232936;
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.36);
}

.item-card:active {
  transform: scale(0.98);
}

.card-num-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 19, 26, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.11);
  padding: 2px 6.5px;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 700;
  color: rgba(248, 250, 252, 0.92);
  z-index: 5;
  letter-spacing: -0.1px;
  pointer-events: none;
}

.card-rarity-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(15, 19, 26, 0.72);
  border: 1px solid rgba(59, 130, 246, 0.36);
  padding: 2px 6.5px;
  border-radius: 7px;
  font-size: 9px;
  font-weight: 800;
  color: #60a5fa;
  z-index: 5;
  letter-spacing: 0.3px;
  pointer-events: none;
}

.card-owner-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #10b981, #059669);
  padding: 2px 7px;
  border-radius: 7px;
  font-size: 9.5px;
  font-weight: 800;
  color: #fff;
  z-index: 5;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
  pointer-events: none;
}

/* 1:1 Square Official Telegram Collectible Preview */
.card-preview-box {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  margin-bottom: 9px;
  background: radial-gradient(circle at 50% 48%, var(--tg-bg-center, #263449) 0%, var(--tg-bg-edge, #18202b) 100%);
  perspective: 680px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.22);
}

/* Official Telegram Concentric Emoji Pattern Layer */
.card-tg-pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  z-index: 1;
}

.tg-pat-i {
  position: absolute;
  display: block;
  pointer-events: none;
  background-color: var(--tg-pattern-color, rgba(0, 0, 0, 0.32));
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.item-card:hover .card-tg-pattern,
.item-card.is-animating .card-tg-pattern {
  transform: scale(1.06);
  opacity: 0.92;
}

/* Soft Radial Ambient Glow Behind Gift */
.card-tg-glow {
  position: absolute;
  width: 72%;
  height: 72%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.36) 0%, transparent 72%);
  opacity: 0.22;
  transform: scale(0.88);
  transition: opacity 0.32s ease, transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 1;
}

.item-card:hover .card-tg-glow,
.item-card.is-animating .card-tg-glow {
  opacity: 0.68;
  transform: scale(1.15);
}

/* 3D Interactive Stage Holding the Official Vector Lottie */
.card-lottie-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  opacity: 0;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.16s ease;
  z-index: 2;
  pointer-events: none;
}

.card-preview-box.lottie-ready .card-lottie-stage {
  opacity: 1;
}

.item-card.is-tilting .card-lottie-stage {
  transition: transform 0.06s linear;
}

/* Official Telegram Vector Lottie Animation Layer */
.card-lottie-slot {
  width: 82%;
  height: 82%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0) scale(1);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.card-lottie-slot svg,
.card-lottie-slot canvas {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
  overflow: visible !important;
  display: block;
}

.item-card:hover .card-lottie-stage,
.item-card.is-animating .card-lottie-stage {
  will-change: transform;
}

.item-card:hover .card-lottie-slot,
.item-card.is-animating .card-lottie-slot {
  will-change: transform;
  transform: translate3d(var(--px, 0px), calc(var(--py, 0px) - 3px), 18px) scale(1.1);
}

/* Fallback Image / Crisp Official Model PNG over Official Backdrop */
.card-preview-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.16s ease;
  z-index: 2;
}

.card-preview-img.model-png {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 82%;
  height: 82%;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.28));
}

.modal-nft-img.model-png {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 78%;
  height: 78%;
  object-fit: contain;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.48));
}

.card-preview-box.lottie-ready .card-preview-img {
  opacity: 0;
  pointer-events: none;
}

.item-card:hover .card-preview-img {
  transform: scale(1.06);
}

/* Pointer-Tracking Specular Glare */
.card-tg-glare {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at var(--glare-x, 50%) var(--glare-y, 35%),
    rgba(255, 255, 255, 0.16) 0%,
    rgba(255, 255, 255, 0.04) 38%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.28s ease;
  pointer-events: none;
  z-index: 3;
  mix-blend-mode: soft-light;
}

.item-card:hover .card-tg-glare {
  opacity: 1;
}

/* Diagonal Glass Shimmer Sweep on Hover */
.card-tg-shimmer {
  position: absolute;
  top: -60%;
  left: -60%;
  width: 220%;
  height: 220%;
  background: linear-gradient(
    60deg,
    transparent 42%,
    rgba(255, 255, 255, 0.08) 48%,
    rgba(255, 255, 255, 0.18) 50%,
    rgba(255, 255, 255, 0.08) 52%,
    transparent 58%
  );
  transform: translateX(-65%) translateY(-65%) rotate(25deg);
  opacity: 0;
  pointer-events: none;
  z-index: 3;
}

.item-card:hover .card-tg-shimmer,
.item-card.is-animating .card-tg-shimmer {
  animation: cardShimmerSweep 1.35s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes cardShimmerSweep {
  0% {
    transform: translateX(-55%) translateY(-55%) rotate(25deg);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    transform: translateX(55%) translateY(55%) rotate(25deg);
    opacity: 0;
  }
}

/* Official Telegram 4-Point Sparkle Stars on Hover */
.card-tg-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 4;
}

.item-card:hover .card-tg-sparkles,
.item-card.is-animating .card-tg-sparkles {
  opacity: 1;
}

.tg-sparkle {
  position: absolute;
  width: 12px;
  height: 12px;
  color: rgba(255, 255, 255, 0.92);
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.85));
  opacity: 0;
}

.tg-sparkle.s1 { top: 24%; left: 16%; width: 11px; height: 11px; }
.tg-sparkle.s2 { top: 26%; right: 15%; width: 14px; height: 14px; }
.tg-sparkle.s3 { bottom: 18%; left: 18%; width: 9px; height: 9px; }
.tg-sparkle.s4 { bottom: 20%; right: 17%; width: 12px; height: 12px; }

.item-card:hover .tg-sparkle.s1,
.item-card.is-animating .tg-sparkle.s1 {
  animation: tgStarTwinkle 1.6s ease-in-out 0.05s infinite;
}
.item-card:hover .tg-sparkle.s2,
.item-card.is-animating .tg-sparkle.s2 {
  animation: tgStarTwinkle 1.8s ease-in-out 0.35s infinite;
}
.item-card:hover .tg-sparkle.s3,
.item-card.is-animating .tg-sparkle.s3 {
  animation: tgStarTwinkle 1.5s ease-in-out 0.65s infinite;
}
.item-card:hover .tg-sparkle.s4,
.item-card.is-animating .tg-sparkle.s4 {
  animation: tgStarTwinkle 1.7s ease-in-out 0.2s infinite;
}

@keyframes tgStarTwinkle {
  0%, 100% {
    opacity: 0;
    transform: scale(0.35) rotate(0deg);
  }
  45% {
    opacity: 0.95;
    transform: scale(1.1) rotate(22deg);
  }
  75% {
    opacity: 0.4;
    transform: scale(0.75) rotate(45deg);
  }
}

/* @mrkt Corner Trait Badges (top right glass icons) */
.card-trait-stack {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 3;
}

.card-trait-pill {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Details below preview matching @mrkt */
.card-details {
  display: flex;
  flex-direction: column;
  padding: 0 2px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.2px;
  line-height: 1.25;
}

.card-id {
  font-size: 12.5px;
  color: #718096;
  font-weight: 600;
  margin-top: 2px;
  letter-spacing: -0.1px;
}

.card-sub-info {
  font-size: 12px;
  color: #b5c0d0;
  margin-top: 3px;
  font-weight: 700;
  letter-spacing: -0.15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.card-sub-info > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-floor-badge {
  font-size: 10px;
  font-weight: 700;
  color: #34d399;
  background: rgba(16, 185, 129, 0.14);
  padding: 1.5px 5px;
  border-radius: 6px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Bottom Price & Action Row matching @mrkt */
.card-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 9px;
  gap: 6px;
}

.card-price-wrap {
  background: #1a222c;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 5px 10px 5px 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
}

.curr-icon-pill {
  font-size: 12.5px;
  line-height: 1;
  flex-shrink: 0;
}

.card-price {
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-price small {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
}

.card-buy-btn {
  background: var(--accent-gradient);
  border: none;
  border-radius: 10px;
  padding: 6px 12px;
  height: 34px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.35);
  transition: transform 0.16s ease, filter 0.16s ease;
}

.card-buy-btn .curr-icon-pill {
  background: transparent;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.card-buy-btn .gramm-logo-svg path:first-child {
  fill: #ffffff;
}

.card-buy-btn .gramm-logo-svg path:last-child {
  fill: #2563eb;
  stroke: #2563eb;
}

.item-card:hover .card-buy-btn {
  filter: brightness(1.1);
}

.card-buy-btn:active {
  transform: scale(0.95);
}

.card-price-pill {
  background: #1a222c;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.2px;
  flex-grow: 1;
}

.card-price-pill .pill-curr-icon {
  font-size: 13px;
  line-height: 1;
}

.card-cart-btn {
  background: #1a222c;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  width: 38px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.16s ease;
  flex-shrink: 0;
}

.card-cart-btn:hover,
.card-cart-btn.in-cart {
  background: var(--accent-gradient);
  color: #ffffff;
  border-color: #3b82f6;
  transform: translateY(-1px);
}

.card-cart-btn:active {
  transform: scale(0.92);
}

/* TAB 2: INVENTORY */
.inventory-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
}

.inv-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent-cyan);
}

.inventory-header h2 {
  font-size: 26px;
  font-weight: 800;
  margin-top: 3px;
  letter-spacing: -0.5px;
}

.help-btn {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.help-btn:hover {
  color: var(--text-main);
  border-color: var(--border-highlight);
}

.help-btn svg {
  width: 19px;
  height: 19px;
}

.card-summary {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  padding: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.3);
}

.summary-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.summary-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(37, 99, 235, 0.16);
  border: 1px solid rgba(59, 130, 246, 0.32);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px -2px rgba(37, 99, 235, 0.24);
}

.summary-icon svg {
  width: 24px;
  height: 24px;
}

.summary-val {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.summary-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.btn-primary-sm {
  background: var(--accent-gradient);
  border: none;
  color: #fff;
  padding: 9px 18px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: all 0.15s;
}

.btn-primary-sm:hover {
  filter: brightness(1.1);
}

.btn-primary-sm:active {
  transform: scale(0.96);
}

.sub-nav-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 16px;
}

.sub-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s;
}

.sub-tab.active {
  color: #fff;
}

.sub-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2.5px;
  border-radius: 2px;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
}

.tag-soon {
  background: rgba(255, 255, 255, 0.08);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 6px;
  color: var(--text-secondary);
  font-weight: 700;
}

.status-chips-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.status-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 7px 14px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.status-chip.active {
  border-color: var(--accent-blue);
  color: #fff;
  background: rgba(37, 99, 235, 0.18);
  box-shadow: 0 0 14px -2px rgba(37, 99, 235, 0.25);
}

.badge-num {
  background: rgba(255, 255, 255, 0.12);
  padding: 1px 7px;
  border-radius: 8px;
  font-size: 11px;
}

/* Empty State Card */
.empty-state-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  padding: 36px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 14px;
}

.empty-icon-circle {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  background: rgba(37, 99, 235, 0.14);
  border: 1px solid rgba(59, 130, 246, 0.32);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 0 24px -4px rgba(37, 99, 235, 0.28);
}

.empty-icon-circle svg {
  width: 34px;
  height: 34px;
}

.empty-state-card h3 {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.empty-state-card p {
  font-size: 13.5px;
  color: var(--text-muted);
  max-width: 300px;
  margin-bottom: 22px;
  line-height: 1.5;
}

.btn-action-primary {
  width: 100%;
  background: var(--accent-gradient);
  border: none;
  color: #ffffff;
  padding: 14px 20px;
  border-radius: 14px;
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: -0.1px;
}

.btn-action-primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.48);
  transform: translateY(-1px);
}

.btn-action-primary:active {
  transform: scale(0.98) translateY(0);
  filter: brightness(0.96);
}

.btn-link {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  margin-top: 16px;
  cursor: pointer;
  transition: color 0.15s;
}

.btn-link:hover {
  color: var(--text-main);
}

.processing-note {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* TAB 3: PROFILE */
.profile-wallet-card {
  background: #252931;
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
}

.wallet-label {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 500;
}

.wallet-amount-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 20px;
}

.wallet-amount {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
  color: #ffffff;
}

.wallet-currency {
  font-size: 16px;
  font-weight: 800;
  color: var(--accent-cyan);
}

.wallet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn-wallet {
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-deposit {
  background: var(--accent-gradient);
  border: none;
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-deposit:hover {
  filter: brightness(1.1);
}

.btn-deposit:active {
  transform: scale(0.96);
}

.btn-withdraw {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  backdrop-filter: blur(8px);
}

.btn-withdraw:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-highlight);
}

.btn-withdraw:active {
  transform: scale(0.96);
}

/* User Card */
.user-info-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  padding: 18px;
  margin-bottom: 22px;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.3);
}

.user-main-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #363B46;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  border: 1px solid var(--border-highlight);
  overflow: hidden;
  flex-shrink: 0;
}

.user-meta {
  flex: 1;
}

.user-name {
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.user-rating {
  font-size: 12px;
  color: var(--accent-gold);
  margin-top: 2px;
  font-weight: 600;
}

.user-inv-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 8px 14px;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
}

.user-inv-chip:hover {
  background: rgba(255, 255, 255, 0.1);
}

.user-inv-chip strong {
  font-size: 13.5px;
  color: var(--accent-cyan);
}

.currencies-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.curr-cell {
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.curr-val {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.curr-name {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Settings List */
.settings-group {
  margin-bottom: 22px;
}

.group-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-secondary);
  letter-spacing: 1px;
  margin-bottom: 10px;
  padding-left: 4px;
}

.settings-list {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  overflow: hidden;
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 18px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background 0.15s;
}

.setting-item:last-child {
  border-bottom: none;
}

.setting-item:hover {
  background: var(--bg-card-hover);
}

.setting-left {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14.5px;
  font-weight: 600;
}

.setting-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: rgba(37, 99, 235, 0.14);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
}

.setting-icon-box svg {
  width: 18px;
  height: 18px;
}

.setting-right {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

.badge-online {
  background: rgba(16, 185, 129, 0.18);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.35);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

.arrow {
  font-size: 19px;
  line-height: 1;
}

/* Promo Grid */
.promo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.promo-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.15s;
}

.promo-card:hover {
  transform: translateY(-2px);
}

.promo-icon {
  font-size: 26px;
}

.promo-title {
  font-size: 13.5px;
  font-weight: 800;
}

.promo-status {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
}

/* Bottom Docked Native Frosted Tab Bar */
.bottom-dock {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--bottom-dock-height);
  background: rgba(20, 23, 30, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  align-items: center;
  padding: 6px 8px 10px 8px;
  z-index: 50;
}

.nav-tab-slot {
  position: relative;
  width: 100%;
  height: 100%;
}

.nav-tab {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 4px;
  border-radius: 12px;
  transition: color 0.18s ease, background-color 0.18s ease, transform 0.15s ease;
}

.nav-tab svg {
  width: 22px;
  height: 22px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-tab:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

.nav-tab.active {
  background: rgba(59, 130, 246, 0.13);
  color: #3b82f6;
}

.nav-tab:active {
  transform: scale(0.95);
}

.nav-tab.active svg {
  stroke: #3b82f6;
  transform: translateY(-1px);
}

.nav-tab:active {
  transform: scale(0.95);
}

/* Modal Bottom Sheets */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(20, 23, 28, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-sheet {
  background-color: #151923;
  background-image:
    radial-gradient(circle at 50% -8%, rgba(59, 130, 246, 0.24) 0%, rgba(37, 99, 235, 0.08) 42%, transparent 72%),
    linear-gradient(180deg, #1b2231 0%, #161a24 48%, #11151d 100%);
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-bottom: none;
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 12px 22px 28px 22px;
  position: relative;
  animation: modalSlideUp 0.26s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.55);
}

@keyframes modalSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-drag-bar {
  width: 36px;
  height: 4px;
  border-radius: 9999px;
  background: #374151;
  margin: 0 auto 16px auto;
}

.modal-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.modal-header-row .guide-title {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0;
  letter-spacing: -0.3px;
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
  flex-shrink: 0;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  transform: scale(1.05);
}

.modal-close-btn:active {
  transform: scale(0.95);
}

.modal-bot-footer {
  text-align: center;
  margin-top: 22px;
  font-size: 13.5px;
  color: #3b82f6;
  font-weight: 600;
  letter-spacing: 0.2px;
  opacity: 0.85;
  transition: opacity 0.2s;
  cursor: default;
}

.modal-bot-footer:hover {
  opacity: 1;
}

.guide-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.4px;
  margin-bottom: 6px;
}

/* Form Styles */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 12px 16px;
  color: var(--text-main);
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
}

.form-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.price-input-row {
  display: flex;
  gap: 10px;
}

.form-select {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 12px 16px;
  color: var(--accent-cyan);
  font-size: 14px;
  font-weight: 800;
  outline: none;
}

/* Gift Picker Grid in Sell Modal */
.gift-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-height: 200px;
  overflow-y: auto;
  padding: 4px;
}

.gift-picker-item {
  background: var(--bg-card);
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 10px 4px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gift-picker-item:hover {
  background: var(--bg-card-hover);
}

.gift-picker-item.selected {
  border-color: var(--accent-cyan);
  background: rgba(37, 99, 235, 0.22);
  box-shadow: 0 0 14px -2px rgba(59, 130, 246, 0.35);
}

.gift-picker-thumb {
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin-bottom: 6px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

.gift-picker-name {
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-main);
  max-width: 100%;
}

/* Language Modal */
.lang-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 15px 18px;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s;
}

.lang-option:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-highlight);
}

.lang-option .flag {
  font-size: 26px;
}

.lang-meta {
  flex: 1;
  text-align: left;
  margin-left: 16px;
}

.lang-meta strong {
  display: block;
  font-size: 14.5px;
}

.lang-meta small {
  font-size: 11.5px;
  color: var(--text-muted);
}

.lang-option .check-mark {
  color: transparent;
  font-weight: 800;
  font-size: 18px;
}

.lang-option.active {
  border-color: var(--accent-blue);
  background: rgba(37, 99, 235, 0.18);
}

.lang-option.active .check-mark {
  color: var(--accent-cyan);
}

/* Support Modal */
.support-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--accent-green);
  margin-bottom: 8px;
  font-weight: 600;
}

.status-indicator {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
}

.faq-item summary {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  outline: none;
}

.faq-answer {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 10px;
  line-height: 1.55;
}

/* Wallet Deposit & Withdraw Specs (matching native Notcoin/Telegram modal) */
.wallet-spec-list {
  background: transparent;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin: 18px 0 20px 0;
}

.wallet-spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 15px;
}

.wallet-spec-row:last-child {
  border-bottom: none;
}

.spec-label {
  color: #8e9aa8;
  font-size: 15px;
  font-weight: 500;
}

.spec-val {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.status-disconnected {
  color: #ffffff;
  font-weight: 700;
}

.status-connected {
  color: #10b981;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.wallet-modal-desc {
  font-size: 14px;
  color: #8e9aa8;
  line-height: 1.48;
  margin-bottom: 24px;
  font-weight: 400;
}

.form-currency-badge {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 12px 18px;
  color: var(--accent-cyan);
  font-weight: 800;
  font-size: 13.5px;
  display: flex;
  align-items: center;
}

.btn-max-amount {
  background: rgba(37, 99, 235, 0.2);
  border: 1px solid var(--border-focus);
  color: var(--accent-cyan);
  padding: 0 16px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-max-amount:hover {
  background: rgba(37, 99, 235, 0.35);
}

.fee-note-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 10px;
  padding: 0 4px;
}

/* Wallet Options Selector List */
.wallet-options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wallet-opt-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 13px 16px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.wallet-opt-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(59, 130, 246, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.wallet-opt-item:active {
  transform: scale(0.98);
}

.wallet-opt-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.wallet-opt-left strong {
  display: block;
  font-size: 14.5px;
  color: var(--text-main);
  letter-spacing: -0.2px;
}

.wallet-opt-left small {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
}

.wallet-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.tonkeeper-bg {
  background: var(--accent-gradient);
  color: #fff;
}

.tgwallet-bg {
  background: var(--accent-gradient);
  color: #fff;
}

.myton-bg {
  background: linear-gradient(135deg, #ea580c, #c2410c);
  color: #fff;
}

.manual-bg {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent-cyan);
}

.btn-wallet-connect {
  background: rgba(37, 99, 235, 0.18);
  border: 1px solid var(--border-focus);
  color: var(--accent-cyan);
  padding: 7px 16px;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  pointer-events: none;
}

/* ========================================================
   TOP TOAST NOTIFICATION (Native Telegram Luxury Style)
   ======================================================== */
.top-toast {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translate(-50%, -100px);
  width: calc(100% - 24px);
  max-width: 420px;
  background: rgba(18, 26, 38, 0.96);
  border: 1px solid rgba(16, 185, 129, 0.45);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65), 0 0 20px rgba(16, 185, 129, 0.22);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 18px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1000;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  opacity: 0;
  pointer-events: none;
}

.top-toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

.toast-thumb-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.toast-thumb-img {
  width: 82%;
  height: 82%;
  object-fit: contain;
}

.toast-body {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.toast-desc {
  font-size: 11.5px;
  color: #8e9aa8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.toast-badge {
  font-size: 12px;
  font-weight: 800;
  color: #10b981;
  background: rgba(16, 185, 129, 0.14);
  padding: 4px 9px;
  border-radius: 8px;
  border: 1px solid rgba(16, 185, 129, 0.28);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Modal Specs Table */
.item-spec-box {
  background: rgba(31, 38, 54, 0.86);
  border: 1px solid rgba(147, 197, 253, 0.14);
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
}

.item-spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.item-spec-row:last-child {
  border-bottom: none;
}

.item-spec-label {
  color: var(--text-muted);
}

.item-spec-val {
  font-weight: 700;
  color: var(--text-main);
}

/* Spinner for purchase button */
.btn-spinner {
  width: 17px;
  height: 17px;
  border: 2.5px solid rgba(255, 255, 255, 0.28);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: btnSpinner 0.7s linear infinite;
  display: inline-block;
  vertical-align: middle;
}

@keyframes btnSpinner {
  to { transform: rotate(360deg); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

/* ==========================================
   3D LIVING COLLECTIBLE SHOWCASE (TELEGRAM GIFTS & PORTALS STYLE)
   ========================================== */
.modal-nft-stage-wrap {
  perspective: 900px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 6px auto 16px auto;
  position: relative;
  width: 190px;
  height: 190px;
  touch-action: none;
}

/* Pulsating colored ambient halo behind the collectible */
.modal-nft-halo {
  position: absolute;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  filter: blur(34px);
  opacity: 0.65;
  pointer-events: none;
  z-index: 0;
  animation: haloPulse 3.4s ease-in-out infinite;
  transition: background-color 0.4s ease;
}

@keyframes haloPulse {
  0%, 100% {
    transform: scale(0.92);
    opacity: 0.55;
  }
  50% {
    transform: scale(1.18);
    opacity: 0.85;
  }
}

/* The collectible showcase box */
.modal-nft-stage {
  width: 100%;
  height: 100%;
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55),
              inset 0 0 28px rgba(0, 0, 0, 0.4);
  transform-style: preserve-3d;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.2s ease;
  z-index: 1;
  cursor: grab;
}

.modal-nft-stage:active {
  cursor: grabbing;
}

/* Official Telegram dot pattern inside showcase */
.modal-nft-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image: radial-gradient(rgba(255, 255, 255, 0.95) 1.3px, transparent 1.3px);
  background-size: 14px 14px;
  pointer-events: none;
}

/* Diagonal glass light sheen sweep */
.modal-nft-shimmer {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    60deg,
    transparent 38%,
    rgba(255, 255, 255, 0.14) 47%,
    rgba(255, 255, 255, 0.28) 50%,
    rgba(255, 255, 255, 0.14) 53%,
    transparent 62%
  );
  pointer-events: none;
  transform: rotate(25deg);
  animation: shimmerPass 4.2s infinite cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
}

@keyframes shimmerPass {
  0% {
    transform: translateY(-80%) rotate(25deg);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  50%, 100% {
    transform: translateY(80%) rotate(25deg);
    opacity: 0;
  }
}

.modal-nft-lottie {
  width: 84%;
  height: 84%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 3;
  will-change: transform;
  transform-origin: center center;
  animation: nftEntrancePop 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
             nftContinuousFloat 3.8s ease-in-out 0.65s infinite;
  pointer-events: none;
}

.modal-nft-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 2;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-nft-stage.lottie-ready .modal-nft-img {
  opacity: 0;
}

.modal-nft-lottie svg,
.modal-nft-lottie canvas {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
  overflow: visible !important;
  display: block;
}

/* Entrance animation when opening modal */
@keyframes nftEntrancePop {
  0% {
    opacity: 0;
    transform: scale(0.45) translateY(45px) rotate(-12deg);
  }
  65% {
    opacity: 1;
    transform: scale(1.14) translateY(-14px) rotate(3deg);
  }
  85% {
    transform: scale(0.96) translateY(3px) rotate(-1.5deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0) rotate(0deg);
  }
}

/* Continuous 3D floating and breathing motion */
@keyframes nftContinuousFloat {
  0%, 100% {
    transform: translateY(0px) rotate(0deg) scale(1);
    filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.65)) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45));
  }
  25% {
    transform: translateY(-9px) rotate(-2.2deg) scale(1.03);
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.72)) drop-shadow(0 6px 12px rgba(0, 0, 0, 0.5));
  }
  50% {
    transform: translateY(-16px) rotate(1deg) scale(1.05);
    filter: drop-shadow(0 26px 36px rgba(0, 0, 0, 0.8)) drop-shadow(0 8px 16px rgba(0, 0, 0, 0.55));
  }
  75% {
    transform: translateY(-7px) rotate(2.4deg) scale(1.025);
    filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.68)) drop-shadow(0 5px 10px rgba(0, 0, 0, 0.48));
  }
}

/* Active Filter & Sort Indicator Dots */
.active-indicator-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.8);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}

.active-indicator-dot.inline-dot {
  position: static;
  margin-right: 2px;
  display: none;
}

.active-indicator-dot.visible {
  opacity: 1;
  transform: scale(1);
}

.active-indicator-dot.inline-dot.visible {
  display: inline-block;
}

/* Gift Traits Grid inside Item Modal */
.item-traits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0;
}

.item-trait-chip {
  background: rgba(31, 38, 54, 0.86);
  border: 1px solid rgba(147, 197, 253, 0.14);
  border-radius: 12px;
  padding: 8px 6px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.item-trait-label {
  display: block;
  font-size: 10.5px;
  color: var(--text-secondary);
  font-weight: 600;
}

.item-trait-val {
  display: block;
  font-size: 12.5px;
  color: #3b82f6;
  font-weight: 800;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

/* Floating Cart Bar above Bottom Dock */
.cart-floating-bar {
  position: fixed;
  bottom: calc(var(--bottom-dock-height) + 10px);
  left: 50%;
  transform: translate(-50%, 16px);
  width: calc(100% - 28px);
  max-width: 452px;
  background: #252931;
  border: 1px solid rgba(59, 130, 246, 0.48);
  border-radius: 15px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #ffffff;
  cursor: pointer;
  z-index: 48;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
  transition: opacity 0.22s ease, transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-floating-bar.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.cart-bar-left,
.cart-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-bar-icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--accent-gradient);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.cart-bar-count {
  font-size: 13px;
  font-weight: 700;
}

.cart-bar-total {
  font-size: 13px;
  font-weight: 800;
  color: #3b82f6;
}

.cart-bar-cta {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  background: var(--accent-gradient);
  padding: 5px 10px;
  border-radius: 9px;
}

/* Cart Checkout Modal & Deals History Modal */
.cart-modal-list,
.deals-modal-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 46vh;
  overflow-y: auto;
  margin-bottom: 14px;
}

.cart-row,
.deal-row {
  display: flex;
  align-items: center;
  gap: 11px;
  background: #252931;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 9px 11px;
}

.cart-row-img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.cart-row-meta,
.deal-row-meta {
  flex: 1;
  min-width: 0;
}

.cart-row-title,
.deal-row-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-row-sub,
.deal-row-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.cart-row-remove {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.cart-row-remove:hover {
  background: rgba(244, 63, 94, 0.18);
  color: #f43f5e;
}

.cart-modal-summary {
  background: #252931;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 14px;
}

.deal-section-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-secondary);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin: 6px 0 2px 2px;
}

.deal-badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 8px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.deal-badge.buy {
  background: rgba(59, 130, 246, 0.16);
  color: #60a5fa;
}

.deal-badge.list {
  background: rgba(16, 185, 129, 0.16);
  color: #10b981;
}

.deals-empty-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 22px 10px;
}

/* Always-visible Category Chips & Price Range Filter */
.market-chips-visible {
  margin-bottom: 4px;
}

.price-filter-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #252931;
  border: 1px solid var(--border-color);
  border-radius: 13px;
  padding: 8px 10px;
}

.price-filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.price-filter-input {
  width: 72px;
  flex: 1;
  min-width: 0;
  background: #2E323B;
  border: 1px solid var(--border-color);
  border-radius: 9px;
  padding: 6px 8px;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  outline: none;
  font-variant-numeric: tabular-nums;
}

.price-filter-input:focus {
  border-color: #3b82f6;
}

.price-filter-sep {
  color: var(--text-secondary);
  font-weight: 700;
}

.price-filter-reset {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  border-radius: 9px;
  padding: 6px 10px;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.price-filter-reset:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

/* News SVG Decor */
.slide-decor {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.86);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: 10px;
}

/* Unified Inventory Empty Actions & Profile Stat Cards */
.empty-actions-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  width: 100%;
  max-width: 300px;
}

.promo-card-btn {
  text-align: left;
  cursor: pointer;
  background: #252931;
  border: 1px solid var(--border-color);
}

.promo-card-btn:hover {
  border-color: rgba(59, 130, 246, 0.45);
}

.promo-stat-val {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

/* Modal Rich Traits & Sticky Action Bar */
.item-trait-name {
  display: block;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: -0.2px;
  color: #ffffff;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-trait-chip-model {
  display: flex;
  align-items: center;
  gap: 7px;
  text-align: left;
  padding: 8px 8px;
}

.item-trait-thumb {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px;
  flex-shrink: 0;
}

.item-trait-meta {
  flex: 1;
  min-width: 0;
}

.modal-sticky-actions {
  position: sticky;
  bottom: -28px;
  background: linear-gradient(180deg, rgba(17, 21, 29, 0) 0%, #12161f 28%, #11151d 100%);
  padding: 14px 0 6px 0;
  margin-top: 6px;
  display: flex;
  gap: 8px;
  align-items: center;
  z-index: 10;
}

.modal-cart-btn {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(31, 38, 54, 0.92);
  border: 1px solid rgba(147, 197, 253, 0.18);
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.16s ease;
}

.modal-cart-btn:hover,
.modal-cart-btn.in-cart {
  background: var(--accent-gradient);
  border-color: #3b82f6;
  color: #ffffff;
}

/* Live Feed Strip */
.live-feed-strip {
  width: 100%;
  height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 11px;
  padding: 4px 10px;
  margin-bottom: 6px;
  color: var(--text-main);
  cursor: pointer;
  text-align: left;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.live-feed-strip:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(59, 130, 246, 0.35);
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
  flex-shrink: 0;
  animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}

.live-feed-thumb {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.live-feed-text {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  color: rgba(243, 245, 248, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-feed-time {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* Portals/MRKT Style Trait Filter Pills (Sized identically to .chip controls) */
.trait-pills-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  padding: 0 0 4px 0;
  scrollbar-width: none;
}

.trait-pills-bar::-webkit-scrollbar {
  display: none;
}

.trait-pill-btn {
  flex: 1 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 46px;
  padding: 10px 7px;
  border-radius: 13px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.trait-pill-btn:hover {
  border-color: var(--border-highlight);
  color: var(--text-main);
}

.trait-pill-btn:active {
  transform: scale(0.98);
}

.trait-pill-btn.open {
  border-color: var(--border-highlight);
  background: var(--bg-card-hover);
  color: #ffffff;
}

.trait-pill-btn.active {
  background: rgba(59, 130, 246, 0.22);
  border-color: var(--accent-cyan);
  color: #ffffff;
}

.trait-pill-chevron {
  opacity: 0.72;
  flex-shrink: 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.trait-pill-btn.open .trait-pill-chevron {
  transform: rotate(180deg);
  opacity: 1;
}

.trait-pill-text {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-models-empty-note {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 2px;
}

.filter-pick-col-inline {
  border: 1px solid rgba(59, 130, 246, 0.45);
  background: rgba(59, 130, 246, 0.14);
  color: #93c5fd;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* Make Offer Drawer & Button in Item Modal */
.modal-offer-btn {
  height: 48px;
  padding: 0 13px;
  border-radius: 14px;
  background: #252931;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.16s ease;
}

.modal-offer-btn:hover,
.modal-offer-btn.active {
  border-color: #3b82f6;
  color: #3b82f6;
}

.offer-drawer {
  display: none;
  flex-direction: column;
  gap: 8px;
  background: #242934;
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 14px;
  padding: 10px 12px;
  margin-top: 8px;
}

.offer-drawer.open {
  display: flex;
}

.share-drawer {
  display: none;
  flex-direction: column;
  gap: 8px;
  background: #191e29;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
  margin-top: 10px;
  text-align: left;
}

.share-drawer.open {
  display: flex;
}

#modalShareBtn.active {
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(59, 130, 246, 0.12);
}

.share-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #131720;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 9px;
  padding: 7px 10px;
}

.share-row-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.share-row-label {
  font-size: 10.5px;
  font-weight: 500;
  color: #8e98a8;
}

.share-row-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.share-copy-btn {
  padding: 5px 10px;
  border-radius: 7px;
  background: rgba(59, 130, 246, 0.14);
  border: none;
  color: #60a5fa;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.share-copy-btn.copied {
  background: rgba(34, 197, 94, 0.16);
  color: #4ade80;
}

.share-hint {
  font-size: 11px;
  color: #8e98a8;
  line-height: 1.35;
}

.offer-presets-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.offer-preset-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 5px 9px;
  color: var(--text-main);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.offer-preset-chip:hover {
  border-color: #3b82f6;
  color: #3b82f6;
}

.offer-input-row {
  display: flex;
  gap: 8px;
}

.offer-input {
  flex: 1;
  min-width: 0;
  background: #1A1E26;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 9px 11px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  outline: none;
  font-variant-numeric: tabular-nums;
}

.offer-input:focus {
  border-color: #3b82f6;
}

.offer-submit-btn {
  background: var(--accent-gradient);
  border: none;
  border-radius: 10px;
  padding: 0 14px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

/* Collection Stats Summary Bar */
.collection-stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 11px;
  padding: 7px 10px;
  margin-bottom: 7px;
  font-size: 11.5px;
}

.coll-stat-left {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: #ffffff;
}

.coll-stat-right {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.coll-stat-delta {
  font-weight: 700;
  color: #34d399;
}

.coll-stat-delta.neg {
  color: #f87171;
}

/* Extra Filter Chips inside Filter Panel */
.filter-extra-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

.filter-chips-line {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-chips-line::-webkit-scrollbar {
  display: none;
}

.filter-pill-btn {
  background: #222732;
  border: 1px solid var(--border-color);
  border-radius: 9px;
  padding: 6px 10px;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.16s ease;
}

.filter-pill-btn:hover {
  color: #ffffff;
  border-color: var(--border-highlight);
}

.filter-pill-btn.active {
  background: rgba(59, 130, 246, 0.18);
  border-color: #3b82f6;
  color: #ffffff;
}

/* Card Favorite Button (subtle glass heart, top-right) */
.card-fav-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(15, 19, 26, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 6;
  transition: transform 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.card-fav-btn:hover {
  color: #ffffff;
  background: rgba(15, 19, 26, 0.76);
}

.card-fav-btn.active {
  color: #f43f5e;
  border-color: rgba(244, 63, 94, 0.45);
}

.card-fav-btn:active {
  transform: scale(0.9);
}

/* Modal Top Utility Actions & Seller + 7d Sparkline */
.modal-top-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.modal-util-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(31, 38, 54, 0.8);
  border: 1px solid rgba(147, 197, 253, 0.16);
  border-radius: 10px;
  padding: 7px 12px;
  color: var(--text-main);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.modal-util-btn:hover {
  border-color: #3b82f6;
}

.modal-util-btn.active {
  color: #f43f5e;
  border-color: rgba(244, 63, 94, 0.45);
  background: rgba(244, 63, 94, 0.1);
}

.seller-inline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #ffffff;
  font-weight: 700;
}

.seller-verified-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #3b82f6;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
}

.price-history-card {
  background: rgba(31, 38, 54, 0.86);
  border: 1px solid rgba(147, 197, 253, 0.14);
  border-radius: 14px;
  padding: 11px 12px;
  margin: 12px 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
}

.price-history-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
}

.price-history-title {
  font-weight: 700;
  color: #ffffff;
}

.price-history-best {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.price-history-best strong {
  color: #34d399;
}

.sparkline-svg {
  width: 100%;
  height: 52px;
  display: block;
  margin-bottom: 8px;
}

.recent-sales-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 7px;
}

.recent-sale-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.item-card.is-entering {
  animation: lotDropIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes lotDropIn {
  0% {
    opacity: 1;
    transform: translateY(-6px) scale(0.97);
    border-color: rgba(59, 130, 246, 0.85);
    box-shadow: 0 0 18px rgba(59, 130, 246, 0.28);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    border-color: rgba(255, 255, 255, 0.06);
  }
}

.recent-sale-row strong {
  color: #ffffff;
  font-weight: 700;
}

/* MRKT-Style Compact Winter Events & News Strip */
.winter-events-strip {
  display: flex;
  align-items: stretch;
  gap: 7px;
  overflow-x: auto;
  padding: 0 0 4px 0;
  margin-bottom: 0;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-x;
}

.winter-events-strip.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.winter-events-strip::-webkit-scrollbar {
  display: none;
}

.winter-event-card {
  position: relative;
  flex: 0 0 86%;
  aspect-ratio: 1024 / 317;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 15px;
  border: 1px solid rgba(59, 130, 246, 0.26);
  background:
    radial-gradient(circle at 88% 15%, rgba(147, 197, 253, 0.22) 0%, transparent 48%),
    linear-gradient(135deg, #1b273d 0%, #162135 55%, #1c2c4a 100%);
  color: #ffffff;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.18s ease;
}

.winter-event-card.winter-banner-img-card {
  padding: 0;
  border: 1px solid rgba(59, 130, 246, 0.34);
  background: #0a1224;
  overflow: hidden;
  border-radius: 15px;
  align-self: center;
}

.winter-banner-img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1024 / 317;
  object-fit: contain;
  display: block;
  border-radius: 14px;
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: none;
}

.winter-event-art {
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: none;
}

/* Custom Gemstone Ranks Promo Banner (Obsidian-Crimson Vault Theme + Typography matching Banners 1 & 2) */
.winter-event-card.ranks-promo-banner {
  position: relative;
  padding: 10px 10px 10px 15px;
  border: 1px solid rgba(248, 113, 113, 0.28);
  background:
    radial-gradient(circle at 86% 68%, rgba(220, 38, 38, 0.28) 0%, transparent 46%),
    radial-gradient(circle at 70% 42%, rgba(148, 163, 184, 0.16) 0%, transparent 48%),
    radial-gradient(circle at 22% 52%, rgba(56, 189, 248, 0.12) 0%, transparent 52%),
    repeating-linear-gradient(128deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 22px),
    linear-gradient(122deg, #0b0c12 0%, #161422 46%, #21121e 100%);
  overflow: hidden;
  justify-content: space-between;
  gap: 6px;
}

.ranks-banner-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.38) 1px, transparent 1px),
    radial-gradient(rgba(251, 191, 36, 0.35) 1px, transparent 1px);
  background-size: 44px 44px, 31px 31px;
  background-position: 10px 10px, 24px 28px;
  opacity: 0.42;
}

.ranks-banner-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  flex: 1;
}

.ranks-banner-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.7px;
  color: #e0f2fe;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(125, 211, 252, 0.35);
  padding: 2.5px 9px;
  border-radius: 999px;
  margin-bottom: 5px;
}

.ranks-banner-title {
  font-size: 18px;
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: -0.45px;
  color: #ffffff;
  text-shadow:
    0 0 14px rgba(56, 189, 248, 0.65),
    0 2px 0 rgba(14, 116, 144, 0.72),
    0 4px 10px rgba(0, 0, 0, 0.72);
  margin-bottom: 5px;
}

.ranks-banner-sub {
  font-size: 10.5px;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
}

.ranks-banner-sub span {
  color: #38bdf8;
  font-weight: 800;
}

.ranks-banner-showcase {
  position: relative;
  z-index: 2;
  width: 174px;
  height: 108px;
  flex-shrink: 0;
  margin-right: -4px;
  pointer-events: none;
}

.ranks-nft-slot {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ranks-nft-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: none;
}

/* Lowest Rank shown (Blue Sapphire Ring) — top-left, tucked in shadow of center Black Pepe */
.ranks-nft-slot.slot-sapphire {
  left: 6px;
  top: 0;
  width: 46px;
  height: 46px;
  z-index: 1;
  transform: rotate(-12deg);
  opacity: 0.84;
  filter: brightness(0.66) contrast(1.06) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.9));
}

/* Quartz (Silver-White Platinum Watch) — upper-right behind cluster */
.ranks-nft-slot.slot-quartz {
  right: 12px;
  top: -4px;
  width: 52px;
  height: 52px;
  z-index: 1;
  transform: rotate(14deg);
  opacity: 0.92;
  filter: brightness(0.88) drop-shadow(0 5px 12px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 10px rgba(226, 232, 240, 0.25));
}

/* Topaz (Golden Bear) — bottom-left edge of pile */
.ranks-nft-slot.slot-topaz {
  left: -4px;
  bottom: -4px;
  width: 56px;
  height: 56px;
  z-index: 2;
  transform: rotate(-9deg);
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 12px rgba(251, 191, 36, 0.45));
}

/* Emerald (Jade Bloom Rose) — mid-right peeking behind red crystal & Pepe */
.ranks-nft-slot.slot-emerald {
  left: 82px;
  top: 6px;
  width: 56px;
  height: 56px;
  z-index: 2;
  transform: rotate(8deg);
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 12px rgba(16, 185, 129, 0.45));
}

/* Middle/High Rank (Red Blood Gem) — foreground right, noticeably smaller than center Black Pepe */
.ranks-nft-slot.slot-ruby {
  right: -2px;
  bottom: -2px;
  width: 64px;
  height: 64px;
  z-index: 3;
  transform: rotate(10deg);
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 14px rgba(239, 68, 68, 0.58));
}

/* Highest Rank (Black Pepe X-Ray) — BIGGEST, front & center */
.ranks-nft-slot.slot-black-hero {
  left: 43%;
  top: 14px;
  width: 84px;
  height: 84px;
  transform: translateX(-50%);
  z-index: 4;
  filter: drop-shadow(-6px 8px 14px rgba(0, 0, 0, 0.94)) drop-shadow(0 0 14px rgba(226, 232, 240, 0.3));
}

/* Custom Spiced Wine ("Коньяк") Craft & Upgrade Banner */
.winter-event-card.craft-cognac-banner {
  position: relative;
  padding: 10px 10px 10px 15px;
  border: 1px solid rgba(251, 191, 36, 0.34);
  background:
    radial-gradient(circle at 80% 56%, rgba(245, 158, 11, 0.3) 0%, transparent 48%),
    radial-gradient(circle at 68% 24%, rgba(234, 88, 12, 0.2) 0%, transparent 42%),
    radial-gradient(circle at 16% 50%, rgba(251, 191, 36, 0.1) 0%, transparent 52%),
    repeating-linear-gradient(128deg, rgba(253, 224, 71, 0.03) 0 1px, transparent 1px 22px),
    linear-gradient(124deg, #100906 0%, #23140b 48%, #341a0a 100%);
  overflow: hidden;
  justify-content: space-between;
  gap: 6px;
}

.craft-banner-sparks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(253, 224, 71, 0.55) 1px, transparent 1px),
    radial-gradient(rgba(255, 255, 255, 0.35) 1px, transparent 1px);
  background-size: 40px 40px, 26px 26px;
  background-position: 6px 14px, 20px 8px;
  opacity: 0.48;
}

.craft-banner-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.7px;
  color: #fef3c7;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(251, 191, 36, 0.42);
  padding: 2.5px 9px;
  border-radius: 999px;
  margin-bottom: 5px;
}

.craft-banner-title {
  font-size: 16.8px;
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.45px;
  color: #ffffff;
  text-shadow:
    0 0 14px rgba(251, 191, 36, 0.65),
    0 2px 0 rgba(120, 53, 15, 0.85),
    0 4px 10px rgba(0, 0, 0, 0.72);
  margin-bottom: 5px;
}

.craft-banner-sub {
  font-size: 10px;
  font-weight: 600;
  color: #fef3c7;
  white-space: nowrap;
}

.craft-banner-sub span {
  color: #fbbf24;
  font-weight: 800;
}

.craft-banner-showcase {
  position: relative;
  z-index: 2;
  width: 158px;
  height: 108px;
  flex-shrink: 0;
  margin-right: -4px;
  pointer-events: none;
}

.craft-nft-slot {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
}

.craft-nft-slot.slot-wine-left {
  left: -2px;
  bottom: 2px;
  width: 54px;
  height: 54px;
  z-index: 2;
  transform: rotate(-13deg);
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 10px rgba(56, 189, 248, 0.4));
}

.craft-nft-slot.slot-wine-top {
  left: 20px;
  top: -2px;
  width: 48px;
  height: 48px;
  z-index: 1;
  opacity: 0.88;
  transform: rotate(-7deg);
  filter: brightness(0.84) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.88));
}

.craft-nft-slot.slot-wine-right {
  right: 0;
  top: 12px;
  width: 58px;
  height: 58px;
  z-index: 2;
  transform: rotate(12deg);
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 10px rgba(245, 158, 11, 0.35));
}

.craft-nft-slot.slot-wine-hero {
  left: 48%;
  top: 14px;
  width: 82px;
  height: 82px;
  transform: translateX(-50%);
  z-index: 4;
  filter: drop-shadow(-4px 8px 16px rgba(0, 0, 0, 0.92)) drop-shadow(0 0 18px rgba(251, 191, 36, 0.52));
}

.winter-event-card.active,
.winter-event-card:hover {
  border-color: rgba(59, 130, 246, 0.62);
}

.winter-event-card:active {
  transform: scale(0.985);
}

@media (max-width: 450px) {
  .winter-event-card {
    flex: 0 0 88%;
  }

  .winter-event-card.ranks-promo-banner,
  .winter-event-card.craft-cognac-banner {
    padding: 8px 8px 8px 12px;
  }

  .winter-event-card.ranks-promo-banner .ranks-banner-copy {
    padding-right: 126px;
  }

  .winter-event-card.craft-cognac-banner .ranks-banner-copy {
    padding-right: 118px;
  }

  .ranks-banner-tag,
  .craft-banner-tag {
    font-size: 8px;
    padding: 2px 7px;
    margin-bottom: 3px;
  }

  .ranks-banner-title {
    font-size: 14.5px;
    line-height: 0.96;
    margin-bottom: 3px;
  }

  .craft-banner-title {
    font-size: 14px;
    line-height: 0.98;
    margin-bottom: 3px;
  }

  .ranks-banner-sub,
  .craft-banner-sub {
    font-size: 9.2px;
    white-space: normal;
    line-height: 1.18;
  }

  .ranks-banner-showcase,
  .craft-banner-showcase {
    position: absolute;
    right: 6px;
    top: 50%;
    margin-right: 0;
    transform: translateY(-50%) scale(0.76);
    transform-origin: right center;
  }
}

.winter-event-frost {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.24) 1px, transparent 1px),
    radial-gradient(rgba(147, 197, 253, 0.18) 1px, transparent 1px);
  background-size: 38px 38px, 24px 24px;
  background-position: 0 0, 12px 16px;
  opacity: 0.45;
}

.winter-event-body {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.winter-event-tag {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.18);
  border: 1px solid rgba(59, 130, 246, 0.35);
  padding: 2px 7px;
  border-radius: 7px;
  margin-bottom: 4px;
}

.winter-event-title {
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: -0.25px;
  color: #ffffff;
  line-height: 1.2;
}

.winter-event-sub {
  font-size: 11.5px;
  color: rgba(226, 232, 240, 0.78);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.winter-event-art {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.45));
}

/* Attached Compact Cart Button (docked to Market tab corner) */
.floating-cart-orb {
  position: absolute;
  top: -12px;
  left: 2px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border: 2px solid #141822;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 60;
  user-select: none;
  box-shadow: 0 5px 14px rgba(37, 99, 235, 0.45), 0 2px 6px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: transform 0.16s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, opacity 0.18s ease;
}

.floating-cart-orb:hover {
  transform: scale(1.08);
  box-shadow: 0 7px 18px rgba(37, 99, 235, 0.58), 0 3px 8px rgba(0, 0, 0, 0.5);
}

.floating-cart-orb:active {
  transform: scale(0.92);
}

.floating-cart-orb.hidden-orb {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
}

.cart-orb-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ffffff;
  color: #1d4ed8;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  font-variant-numeric: tabular-nums;
}

/* Collection & All-Models Filter Controls */
.filter-collection-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #252931;
  border: 1px solid var(--border-color);
  border-radius: 13px;
  padding: 7px 10px;
  margin-bottom: 6px;
}

.filter-collection-thumb {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px;
  flex-shrink: 0;
}

.filter-collection-select {
  flex: 1;
  min-width: 0;
  background: #2E323B;
  border: 1px solid var(--border-color);
  border-radius: 9px;
  padding: 7px 10px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.15px;
  outline: none;
  cursor: pointer;
}

.filter-collection-select:focus {
  border-color: #3b82f6;
}

.filter-models-block {
  background: #222630;
  border: 1px solid var(--border-color);
  border-radius: 13px;
  padding: 8px 10px;
  margin-bottom: 6px;
}

.filter-models-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
}

.model-filter-search {
  flex: 1;
  min-width: 0;
  background: #1A1E26;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 5px 8px;
  color: #ffffff;
  font-size: 11.5px;
  outline: none;
}

.model-filter-search:focus {
  border-color: #3b82f6;
}

.filter-models-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-height: 158px;
  overflow-y: auto;
  padding-right: 2px;
}

.models-quick-strip {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding: 0 0 6px 0;
  scrollbar-width: none;
}

.models-quick-strip::-webkit-scrollbar {
  display: none;
}

.model-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px 5px 5px;
  border-radius: 10px;
  background: #1B202A;
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #f1f5f9;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: -0.22px;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.model-filter-chip.no-thumb {
  padding: 6px 11px;
}

.model-filter-chip img {
  width: 25px;
  height: 25px;
  border-radius: 7px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.04);
  padding: 2px;
  flex-shrink: 0;
}

.bg-swatch-thumb {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.25), 0 1px 4px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.model-filter-chip small {
  font-size: 10.5px;
  font-weight: 700;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}

.model-filter-chip:hover {
  color: #ffffff;
  border-color: var(--border-highlight);
}

.model-filter-chip.active {
  background: rgba(59, 130, 246, 0.2);
  border-color: #3b82f6;
  color: #ffffff;
}

.model-filter-chip.active small {
  color: #93c5fd;
}

/* ==========================================
   RELAYER CUSTODY STORAGE & MODALS
   ========================================== */
.storage-summary-card {
  margin-bottom: 10px;
}

.relayer-status-card {
  background: rgba(24, 27, 34, 0.92);
  border: 1px solid rgba(59, 130, 246, 0.24);
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.relayer-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.relayer-identity {
  display: flex;
  align-items: center;
  gap: 6px;
}

.relayer-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.75);
  flex-shrink: 0;
}

.relayer-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
}

.relayer-handle-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 9px;
  background: rgba(59, 130, 246, 0.16);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #93c5fd;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
}

.relayer-sync-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 9px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.relayer-sync-btn.syncing .relayer-sync-icon {
  animation: relayerSpin 0.8s linear infinite;
}

@keyframes relayerSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.relayer-desc-line {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
  margin: 8px 0 9px;
}

.relayer-desc-line strong {
  color: #e2e8f0;
}

.relayer-actions-mini {
  display: flex;
  align-items: center;
  gap: 8px;
}

.relayer-action-link {
  flex: 1;
  padding: 8px 12px;
  border-radius: 11px;
  background: var(--accent-gradient);
  border: none;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.relayer-tg-link {
  flex: 1;
  text-align: center;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 11px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: #e2e8f0;
  font-size: 12.5px;
  font-weight: 700;
}

.card-custody-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  padding: 3px 7px;
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #4ade80;
  font-size: 10px;
  font-weight: 800;
  backdrop-filter: blur(6px);
}

.inv-card-actions {
  display: flex;
  gap: 5px;
  align-items: center;
}

.inv-card-actions .card-buy-btn {
  flex: 1;
  min-width: 0;
}

.card-withdraw-btn {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.card-withdraw-btn:hover {
  border-color: var(--border-highlight);
  color: #ffffff;
}

.relayer-steps-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 12px;
}

.relayer-step-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.relayer-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.22);
  border: 1px solid #3b82f6;
  color: #93c5fd;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.relayer-step-item strong {
  font-size: 13px;
  color: #ffffff;
  display: block;
}

.relayer-step-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 2px;
}

.relayer-target-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  flex-wrap: wrap;
}

.relayer-handle-code {
  padding: 5px 10px;
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #93c5fd;
  font-size: 12.5px;
  font-weight: 800;
}

.relayer-mini-btn {
  padding: 5px 10px;
  border-radius: 9px;
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.relayer-mini-btn.primary {
  background: rgba(59, 130, 246, 0.2);
  border-color: #3b82f6;
  color: #ffffff;
}

.modal-sheet.sell-sheet {
  padding-bottom: 22px;
}

.sell-storage-preview {
  display: flex;
  align-items: center;
  gap: 13px;
  background: linear-gradient(145deg, rgba(30, 41, 68, 0.62) 0%, rgba(15, 20, 32, 0.92) 100%);
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 18px;
  padding: 12px;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.sell-hero-art {
  position: relative;
  width: 82px;
  height: 82px;
  border-radius: 14px;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 42%, var(--tg-bg-center, #2b3b55) 0%, var(--tg-bg-edge, #141a26) 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.sell-hero-art::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-size: 11px 11px;
  opacity: 0.35;
  pointer-events: none;
}

.sell-hero-art img {
  position: relative;
  z-index: 1;
  width: 68px;
  height: 68px;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.42));
}

.sell-preview-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sell-preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sell-preview-title {
  font-size: 15.5px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sell-preview-id {
  color: rgba(147, 197, 253, 0.82);
  font-weight: 700;
  font-size: 13px;
}

.sell-relayer-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 700;
  color: #4ade80;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.28);
  padding: 3px 8px;
  border-radius: 999px;
  width: fit-content;
}

.sell-relayer-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
}

.sell-traits-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.sell-trait-chip {
  font-size: 11px;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 3px 8px;
  border-radius: 8px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sell-trait-chip span {
  color: rgba(148, 163, 184, 0.78);
  font-weight: 500;
  margin-right: 3px;
}

/* Price Input Panel */
.sell-price-panel {
  background: rgba(15, 20, 32, 0.72);
  border: 1px solid rgba(147, 197, 253, 0.15);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 12px;
}

.sell-price-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.sell-price-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #cbd5e1;
}

.sell-presets-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.sell-preset-pill {
  padding: 4px 9px;
  border-radius: 9px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.28);
  color: #93c5fd;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sell-preset-pill:hover,
.sell-preset-pill.active {
  background: rgba(59, 130, 246, 0.3);
  border-color: rgba(96, 165, 250, 0.75);
  color: #ffffff;
}

.sell-preset-pill:active {
  transform: scale(0.95);
}

.sell-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(9, 13, 22, 0.9);
  border: 1.5px solid rgba(96, 165, 250, 0.24);
  border-radius: 13px;
  padding: 0 12px;
  height: 50px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.sell-input-wrap:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
}

.sell-input-gem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sell-price-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 21px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.3px;
  -moz-appearance: textfield;
}

.sell-price-input::-webkit-outer-spin-button,
.sell-price-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.sell-input-unit {
  font-size: 11.5px;
  font-weight: 800;
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(59, 130, 246, 0.28);
  padding: 4px 8px;
  border-radius: 8px;
  letter-spacing: 0.4px;
}

/* Breakdown Card */
.sell-breakdown-card {
  background: rgba(15, 20, 32, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 15px;
  padding: 12px 14px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sell-breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
}

.sell-bk-key {
  color: var(--text-muted);
  font-weight: 500;
}

.sell-bk-val {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #e2e8f0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.sell-bk-muted {
  color: #94a3b8;
  font-weight: 600;
}

.sell-delta-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.16);
  color: #93c5fd;
}

.sell-delta-pill.below {
  background: rgba(34, 197, 94, 0.16);
  color: #4ade80;
}

.sell-delta-pill.above {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
}

.sell-breakdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 1px 0;
}

.sell-breakdown-total {
  font-size: 14px;
}

.sell-bk-total-label {
  color: #ffffff;
  font-weight: 700;
}

.sell-bk-total-val {
  color: #60a5fa;
  font-size: 15.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.sell-submit-btn {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  font-size: 14.5px;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.38);
}

/* ==========================================
   ADD NFT HERO SHEET (Market Branded Dark-Blue Header)
   ========================================== */
.modal-sheet.relayer-sheet {
  padding: 0;
  overflow-x: hidden;
  background: #14171f;
  border-top: 1px solid rgba(59, 130, 246, 0.22);
}

.relayer-hero-banner {
  position: relative;
  padding: 12px 18px 22px;
  background:
    radial-gradient(circle at 82% 20%, rgba(59, 130, 246, 0.28) 0%, transparent 48%),
    radial-gradient(circle at 18% 82%, rgba(37, 99, 235, 0.22) 0%, transparent 50%),
    linear-gradient(155deg, #121826 0%, #16223a 55%, #1c2e50 100%);
  border-bottom: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 26px 26px 22px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.relayer-hero-drag {
  position: relative;
  z-index: 2;
  width: 40px;
  height: 4px;
  border-radius: 99px;
  background: rgba(148, 163, 184, 0.42);
  margin-bottom: 12px;
}

.relayer-hero-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 4;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.relayer-hero-art {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.relayer-art-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.relayer-bg-doodle {
  position: absolute;
  width: 46px;
  height: 46px;
  object-fit: contain;
  opacity: 0.28;
  filter: drop-shadow(0 6px 14px rgba(15, 23, 42, 0.55));
}

.relayer-bg-doodle.d1 { top: 18px; left: 14px; transform: rotate(-16deg); width: 44px; height: 44px; }
.relayer-bg-doodle.d2 { top: 96px; left: 8px; transform: rotate(12deg); width: 48px; height: 48px; }
.relayer-bg-doodle.d3 { bottom: 12px; left: 28px; transform: rotate(-10deg); width: 42px; height: 42px; }
.relayer-bg-doodle.d4 { top: 44px; right: 54px; transform: rotate(18deg); width: 40px; height: 40px; }
.relayer-bg-doodle.d5 { top: 98px; right: 10px; transform: rotate(-14deg); width: 46px; height: 46px; }
.relayer-bg-doodle.d6 { bottom: 10px; right: 30px; transform: rotate(22deg); width: 42px; height: 42px; }

.relayer-hero-badge {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(59, 130, 246, 0.34);
  color: #93c5fd;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.45px;
  margin-bottom: 12px;
}

.relayer-flow-card {
  position: relative;
  z-index: 2;
  background: linear-gradient(155deg, rgba(28, 47, 84, 0.56) 0%, rgba(19, 31, 57, 0.66) 100%);
  border: 1px solid rgba(147, 197, 253, 0.16);
  border-radius: 20px;
  padding: 16px 28px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  box-shadow: 0 8px 24px rgba(8, 15, 32, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

.relayer-flow-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.relayer-flow-avatar {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.relayer-flow-avatar.gift-slot {
  background: radial-gradient(circle at 35% 30%, rgba(59, 130, 246, 0.28) 0%, rgba(30, 41, 59, 0.95) 100%);
  border: 1.5px solid rgba(59, 130, 246, 0.45);
  padding: 8px;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.28);
}

.relayer-flow-avatar.gift-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.relayer-flow-avatar.relayer-bot-avatar {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: 1.5px solid rgba(96, 165, 250, 0.55);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.28);
}

.relayer-flow-avatar.relayer-bot-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.relayer-bot-fallback {
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
}

.relayer-gift-emoji {
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.relayer-flow-avatar.bot-placeholder {
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px dashed rgba(147, 197, 253, 0.36);
  box-shadow: inset 0 0 14px rgba(59, 130, 246, 0.08);
}

.relayer-flow-caption {
  font-size: 13px;
  font-weight: 700;
  color: #cbd5e1;
}

.relayer-flow-arrow {
  color: #3b82f6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(59, 130, 246, 0.3);
  margin-bottom: 22px;
}

.relayer-sheet-body {
  padding: 16px 16px 20px;
}

.relayer-info-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.relayer-info-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  border-radius: 18px;
  background: #1f2229;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.relayer-info-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.relayer-info-icon.tg { background: #229ED9; }
.relayer-info-icon.gift { background: #a855f7; }
.relayer-info-icon.ok { background: #22c55e; border-radius: 11px; }

.relayer-info-text {
  flex: 1;
  min-width: 0;
}

.relayer-info-title {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
}

.relayer-info-sub {
  font-size: 13.5px;
  color: #8e96a4;
  margin-top: 2px;
  line-height: 1.3;
}

.relayer-handle-link {
  background: none;
  border: none;
  padding: 0;
  color: #38bdf8;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}

.relayer-hero-cta-btn {
  width: 100%;
  margin-top: 14px;
  padding: 15px 18px;
  border-radius: 999px;
  border: none;
  background: #ffffff;
  color: #0b0e14;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.2px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.14s ease, opacity 0.14s ease;
}

.relayer-hero-cta-btn:active {
  transform: scale(0.985);
}

/* ==========================================
   NEW STORAGE TAB (Reference Structure + Branded Controls)
   ========================================== */
.inv-segment-bar {
  display: flex;
  gap: 5px;
  margin-bottom: 10px;
}

.inv-segment-btn {
  flex: 1;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 13px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.inv-segment-btn:hover {
  border-color: var(--border-highlight);
  color: var(--text-main);
}

.inv-segment-btn.active {
  background: rgba(59, 130, 246, 0.22);
  border-color: var(--accent-cyan);
  color: #ffffff;
}

.inv-segment-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 800;
}

.inv-segment-btn.active .inv-segment-badge {
  background: rgba(59, 130, 246, 0.32);
  color: #93c5fd;
}

.inv-actions-dock {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 8px 6px;
  margin-bottom: 10px;
}

.inv-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 2px;
  border-radius: 11px;
  border: none;
  background: transparent;
  color: #e2e8f0;
  cursor: pointer;
  transition: background-color 0.16s ease, transform 0.12s ease;
}

.inv-action-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

.inv-action-btn:active {
  transform: scale(0.95);
}

.inv-action-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.inv-action-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #cbd5e1;
  white-space: nowrap;
}

.inv-search-row {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
}

.inv-search-wrap {
  flex: 1;
}

.inv-search-wrap input {
  min-height: 44px;
  border-radius: 13px;
}

.inv-view-btn {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.16s ease;
}

.inv-view-btn.active,
.inv-view-btn:hover {
  border-color: var(--border-highlight);
  color: #ffffff;
}

.inv-filter-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.inv-trait-chips {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.inv-trait-chips::-webkit-scrollbar {
  display: none;
}

.inv-trait-btn {
  flex: 1 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 44px;
  padding: 10px 11px;
  border-radius: 13px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.16s ease;
}

.inv-trait-btn.active {
  background: rgba(59, 130, 246, 0.2);
  border-color: var(--accent-cyan);
  color: #ffffff;
}

.inv-toolbar-divider {
  width: 1px;
  height: 26px;
  background: rgba(255, 255, 255, 0.14);
  flex-shrink: 0;
}

.inv-right-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.inv-tool-btn {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.16s ease;
}

.inv-tool-btn.active,
.inv-tool-btn:hover {
  background: rgba(59, 130, 246, 0.18);
  border-color: var(--accent-cyan);
  color: #ffffff;
}

.inv-filter-drawer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.25s ease, opacity 0.2s ease, margin-bottom 0.2s ease;
  margin-bottom: 0;
}

.inv-filter-drawer.open {
  max-height: 640px;
  opacity: 1;
  margin-bottom: 10px;
}

.inv-filter-drawer-inner {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 13px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inv-empty-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 0 8px;
}

.inv-empty-carousel {
  width: 100%;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.inv-empty-carousel.dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  scroll-behavior: auto;
}

.inv-empty-carousel::-webkit-scrollbar {
  display: none;
}

.inv-empty-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 16px 14px;
}

.inv-empty-pepe {
  width: 104px;
  height: 104px;
  object-fit: contain;
  margin-bottom: 14px;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.42));
  -webkit-user-drag: none;
  pointer-events: none;
}

.inv-empty-slide h3 {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 5px;
}

.inv-empty-slide p {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.inv-empty-cta-btn {
  min-height: 44px;
  padding: 11px 22px;
  border-radius: 13px;
  border: 1px solid rgba(59, 130, 246, 0.35);
  background: var(--accent-gradient);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.32);
}

.inv-empty-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
}

.inv-carousel-dot {
  width: 14px;
  height: 4px;
  border-radius: 4px;
  border: none;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
}

.inv-carousel-dot.active {
  width: 18px;
  background: #3b82f6;
}

.goods-grid.inv-list-mode {
  grid-template-columns: 1fr;
}

/* ==========================================
   BRANDED PROFILE MENU & 5-LANGUAGE SWITCHER
   ========================================== */
.profile-menu-panel {
  background: rgba(24, 28, 38, 0.92);
  border: 1px solid rgba(147, 197, 253, 0.14);
  border-radius: 18px;
  padding: 16px 14px 16px;
  margin-bottom: 14px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.profile-menu-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.profile-menu-heading {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #ffffff;
}

.profile-menu-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-menu-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.profile-menu-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 2px;
}

.profile-menu-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 9px 10px;
  border-radius: 13px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
}

.profile-menu-pill:hover {
  border-color: rgba(59, 130, 246, 0.45);
  background: var(--bg-card-hover);
  color: #ffffff;
}

.profile-menu-links {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.profile-menu-link {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 8px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.profile-menu-link:hover {
  background: rgba(59, 130, 246, 0.08);
}

.profile-menu-ico {
  width: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

.profile-menu-text {
  flex: 1;
  min-width: 0;
}

.profile-menu-chevron {
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.profile-menu-link.open .profile-menu-chevron {
  transform: rotate(180deg);
}

.profile-channels-sub {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 6px 10px 8px 42px;
}

.profile-channels-sub.open {
  display: flex;
}

.profile-channels-sub a {
  color: #93c5fd;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
}

.profile-menu-divider {
  height: 1px;
  background: rgba(147, 197, 253, 0.1);
  margin: 12px 0;
}

.profile-lang-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
  margin-top: 2px;
}

.profile-lang-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 13px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
}

.profile-lang-btn:hover {
  border-color: var(--border-highlight);
  background: var(--bg-card-hover);
}

.profile-lang-btn.active {
  background: rgba(59, 130, 246, 0.2);
  border-color: #3b82f6;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.2);
}

.lang-flag-svg {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

/* ==========================================
   GEMSTONE RANKS SYSTEM (6 TIERS & FRAME DESIGNS)
   ========================================== */
.user-info-card {
  position: relative;
  overflow: hidden;
  transition: border-color 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}

.user-name-line {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.user-rank-badge {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px 3px 6px;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.1px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.14s ease, filter 0.14s ease;
}

.user-rank-badge::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -70%;
  width: 50%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: rotate(25deg);
  animation: rankPillShine 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes rankPillShine {
  0%, 70% { left: -70%; }
  100% { left: 140%; }
}

.rank-gem-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.55));
}

.gem-3d-svg {
  display: block;
  overflow: visible;
}

.user-rank-badge:hover {
  filter: brightness(1.12);
}

.user-rank-badge:active {
  transform: scale(0.95);
}

.user-rank-progress-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(15, 19, 28, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 9px 11px;
  margin-bottom: 14px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.18s ease;
}

.user-rank-progress-wrap:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.rank-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: #cbd5e1;
}

.rank-fee-pill {
  font-size: 10.5px;
  font-weight: 800;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.14);
  padding: 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
}

.rank-progress-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.rank-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #94a3b8 0%, #cbd5e1 100%);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Common glossy 3D rank frame structure (User Info Card only) */
.user-info-card[data-rank] {
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
  background-origin: border-box;
  background-clip: padding-box, padding-box, border-box;
}

.user-info-card[data-rank] > * {
  position: relative;
  z-index: 2;
}

/* Crisp faceted diamond lattice + corner specular reflections */
.user-info-card[data-rank]::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(125deg, rgba(255, 255, 255, 0.055) 0px, rgba(255, 255, 255, 0.055) 1px, transparent 1px, transparent 22px),
    repeating-linear-gradient(35deg, rgba(255, 255, 255, 0.04) 0px, rgba(255, 255, 255, 0.04) 1px, transparent 1px, transparent 26px),
    radial-gradient(circle at 10% 8%, rgba(255, 255, 255, 0.16) 0%, transparent 38%);
}

/* Animated sweeping light sheen across ranked user card */
.user-info-card[data-rank]::after {
  content: '';
  position: absolute;
  top: -30%;
  left: -95%;
  width: 58%;
  height: 165%;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, 0.16) 50%, transparent 80%);
  transform: skewX(-18deg);
  animation: rankCardGleam 4.4s ease-in-out infinite;
}

@keyframes rankCardGleam {
  0%, 58% { left: -95%; opacity: 0; }
  72% { opacity: 1; }
  100% { left: 155%; opacity: 0; }
}

.user-info-card[data-rank] .curr-cell,
.user-info-card[data-rank] .user-inv-chip,
.user-info-card[data-rank] .user-rank-progress-wrap {
  background: rgba(10, 14, 24, 0.54);
  border-color: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* 1. QUARTZ (0–2 deals) — Frosted Silver Crystal */
[data-rank="quartz"].user-info-card {
  background-image:
    radial-gradient(circle at 88% 12%, rgba(226, 232, 240, 0.24) 0%, transparent 52%),
    linear-gradient(145deg, #272e3d 0%, #171c26 65%, #1e2432 100%),
    linear-gradient(135deg, #f1f5f9 0%, #64748b 45%, #cbd5e1 100%);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.36), 0 0 18px rgba(148, 163, 184, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}
[data-rank="quartz"] .user-avatar {
  border: 2.5px solid #e2e8f0;
  background: linear-gradient(145deg, #475569, #1e293b);
  box-shadow: 0 0 16px rgba(203, 213, 225, 0.45);
}
[data-rank="quartz"] .user-rank-badge {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.34), rgba(71, 85, 105, 0.45));
  border-color: rgba(226, 232, 240, 0.6);
  color: #f8fafc;
}
[data-rank="quartz"] .rank-progress-fill {
  background: linear-gradient(90deg, #94a3b8 0%, #f8fafc 100%);
}

/* 2. TOPAZ (3–9 deals) — Radiant Imperial Amber Gold */
[data-rank="topaz"].user-info-card {
  background-image:
    radial-gradient(circle at 86% 12%, rgba(251, 191, 36, 0.42) 0%, rgba(217, 119, 6, 0.12) 48%, transparent 72%),
    linear-gradient(145deg, #3b260d 0%, #1c1510 58%, #31200c 100%),
    linear-gradient(135deg, #fef08a 0%, #d97706 42%, #fbbf24 75%, #92400e 100%);
  box-shadow: 0 12px 32px rgba(245, 158, 11, 0.28), 0 0 24px rgba(251, 191, 36, 0.2), inset 0 1px 0 rgba(254, 240, 138, 0.35);
}
[data-rank="topaz"] .user-avatar {
  border: 2.5px solid #fde047;
  background: linear-gradient(145deg, #b45309, #451a03);
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.68);
}
[data-rank="topaz"] .user-rank-badge {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.42), rgba(146, 64, 14, 0.56));
  border-color: rgba(253, 224, 71, 0.72);
  color: #fef9c3;
}
[data-rank="topaz"] .rank-progress-fill {
  background: linear-gradient(90deg, #f59e0b 0%, #fef08a 100%);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.65);
}

/* 3. SAPPHIRE (10–24 deals) — Electric Royal Sapphire */
[data-rank="sapphire"].user-info-card {
  background-image:
    radial-gradient(circle at 86% 10%, rgba(56, 189, 248, 0.44) 0%, rgba(37, 99, 235, 0.2) 48%, transparent 74%),
    linear-gradient(145deg, #102a68 0%, #0e162b 58%, #152b5e 100%),
    linear-gradient(135deg, #bae6fd 0%, #2563eb 42%, #38bdf8 74%, #1e3a8a 100%);
  box-shadow: 0 12px 34px rgba(37, 99, 235, 0.36), 0 0 26px rgba(59, 130, 246, 0.26), inset 0 1px 0 rgba(186, 230, 253, 0.4);
}
[data-rank="sapphire"] .user-avatar {
  border: 2.5px solid #7dd3fc;
  background: linear-gradient(145deg, #2563eb, #0f172a);
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.72);
}
[data-rank="sapphire"] .user-rank-badge {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.46), rgba(30, 58, 138, 0.64));
  border-color: rgba(147, 197, 253, 0.78);
  color: #eff6ff;
}
[data-rank="sapphire"] .rank-progress-fill {
  background: linear-gradient(90deg, #3b82f6 0%, #7dd3fc 100%);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.75);
}

/* 4. EMERALD (25–49 deals) — Glowing Imperial Emerald */
[data-rank="emerald"].user-info-card {
  background-image:
    radial-gradient(circle at 86% 12%, rgba(52, 211, 153, 0.42) 0%, rgba(5, 150, 105, 0.18) 48%, transparent 74%),
    linear-gradient(145deg, #093b2e 0%, #0b1918 58%, #0c352a 100%),
    linear-gradient(135deg, #a7f3d0 0%, #059669 44%, #34d399 74%, #064e3b 100%);
  box-shadow: 0 12px 34px rgba(16, 185, 129, 0.34), 0 0 26px rgba(52, 211, 153, 0.24), inset 0 1px 0 rgba(167, 243, 208, 0.38);
}
[data-rank="emerald"] .user-avatar {
  border: 2.5px solid #6ee7b7;
  background: linear-gradient(145deg, #059669, #022c22);
  box-shadow: 0 0 22px rgba(52, 211, 153, 0.72);
}
[data-rank="emerald"] .user-rank-badge {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.44), rgba(6, 78, 59, 0.62));
  border-color: rgba(110, 231, 183, 0.75);
  color: #ecfdf5;
}
[data-rank="emerald"] .rank-progress-fill {
  background: linear-gradient(90deg, #10b981 0%, #6ee7b7 100%);
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.75);
}

/* 5. RUBY (50–99 deals) — Blazing Pigeon-Blood Ruby */
[data-rank="ruby"].user-info-card {
  background-image:
    radial-gradient(circle at 86% 12%, rgba(251, 113, 133, 0.44) 0%, rgba(225, 29, 72, 0.18) 48%, transparent 74%),
    linear-gradient(145deg, #4f0e25 0%, #1c0c14 58%, #410d20 100%),
    linear-gradient(135deg, #fecdd3 0%, #e11d48 42%, #fb7185 75%, #881337 100%);
  box-shadow: 0 12px 34px rgba(244, 63, 94, 0.36), 0 0 26px rgba(251, 113, 133, 0.26), inset 0 1px 0 rgba(254, 205, 211, 0.38);
}
[data-rank="ruby"] .user-avatar {
  border: 2.5px solid #fda4af;
  background: linear-gradient(145deg, #e11d48, #4c0519);
  box-shadow: 0 0 22px rgba(244, 63, 94, 0.75);
}
[data-rank="ruby"] .user-rank-badge {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.45), rgba(136, 19, 55, 0.65));
  border-color: rgba(253, 164, 175, 0.78);
  color: #fff1f2;
}
[data-rank="ruby"] .rank-progress-fill {
  background: linear-gradient(90deg, #f43f5e 0%, #fda4af 100%);
  box-shadow: 0 0 12px rgba(251, 113, 133, 0.75);
}

/* 6. BLACK DIAMOND (100+ deals) — Black Edition Prismatic Obsidian */
[data-rank="black-diamond"].user-info-card {
  background-image:
    radial-gradient(circle at 86% 10%, rgba(147, 197, 253, 0.34) 0%, rgba(167, 139, 250, 0.14) 44%, transparent 72%),
    linear-gradient(145deg, #06080d 0%, #121725 48%, #040509 100%),
    linear-gradient(135deg, #ffffff 0%, #60a5fa 26%, #c084fc 52%, #38bdf8 76%, #f8fafc 100%);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.72), 0 0 32px rgba(96, 165, 250, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.42);
}
[data-rank="black-diamond"].user-info-card::after {
  background: linear-gradient(105deg, transparent 15%, rgba(147, 197, 253, 0.22) 45%, rgba(255, 255, 255, 0.34) 50%, rgba(192, 132, 252, 0.22) 55%, transparent 85%);
  animation-duration: 3.1s;
}
[data-rank="black-diamond"] .user-avatar {
  border: 2.5px solid #ffffff;
  background: linear-gradient(145deg, #334155 0%, #020617 100%);
  box-shadow: 0 0 24px rgba(147, 197, 253, 0.8), 0 0 8px #ffffff;
}
[data-rank="black-diamond"] .user-rank-badge {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #090d16 100%);
  border-color: rgba(255, 255, 255, 0.78);
  color: #ffffff;
  box-shadow: 0 0 18px rgba(147, 197, 253, 0.55);
}
[data-rank="black-diamond"] .rank-progress-fill {
  background: linear-gradient(90deg, #94a3b8 0%, #ffffff 45%, #60a5fa 75%, #c084fc 100%);
  box-shadow: 0 0 14px rgba(192, 132, 252, 0.7);
}

/* Ranked style preview inside #ranksModal rows too */
.rank-tier-row[data-rank] {
  border: 1.5px solid transparent;
  background-origin: border-box;
  background-clip: padding-box, border-box;
}
.rank-tier-row[data-rank="quartz"] {
  background-image: linear-gradient(145deg, #252b39, #171b24), linear-gradient(135deg, #cbd5e1, #475569);
}
.rank-tier-row[data-rank="topaz"] {
  background-image: linear-gradient(145deg, #35230e, #1a1410), linear-gradient(135deg, #fde047, #b45309);
}
.rank-tier-row[data-rank="sapphire"] {
  background-image: linear-gradient(145deg, #132c68, #0f172b), linear-gradient(135deg, #7dd3fc, #1d4ed8);
}
.rank-tier-row[data-rank="emerald"] {
  background-image: linear-gradient(145deg, #0a362a, #0c1817), linear-gradient(135deg, #6ee7b7, #047857);
}
.rank-tier-row[data-rank="ruby"] {
  background-image: linear-gradient(145deg, #470f23, #190d14), linear-gradient(135deg, #fda4af, #be123c);
}
.rank-tier-row[data-rank="black-diamond"] {
  background-image: linear-gradient(145deg, #090c14, #141b2d), linear-gradient(135deg, #ffffff, #60a5fa, #c084fc);
}

/* Ranks List inside Modal */
.ranks-modal-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 2px;
}

.rank-tier-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(22, 27, 38, 0.88);
  position: relative;
  overflow: hidden;
}

.rank-tier-row.current {
  box-shadow: 0 0 0 1.5px #3b82f6, 0 8px 24px rgba(37, 99, 235, 0.2);
}

.rank-tier-gem {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.09) 0%, rgba(15, 23, 42, 0.45) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.rank-tier-gem .gem-3d-svg {
  animation: gemFloatGlow 3.6s ease-in-out infinite;
}

@keyframes gemFloatGlow {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-2px) scale(1.04); }
}

.rank-tier-meta {
  flex: 1;
  min-width: 0;
}

.rank-tier-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.rank-tier-name {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
}

.rank-tier-status {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.22);
  color: #93c5fd;
}

.rank-tier-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.rank-tier-req {
  text-align: right;
  font-size: 12px;
  font-weight: 800;
  color: #e2e8f0;
  white-space: nowrap;
}

.rank-tier-req small {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  color: #60a5fa;
}

/* ==========================================
   WALLET HUB TAB (Ввод / Вывод / История)
   ========================================== */
.wallet-hero-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 15px;
  margin-bottom: 10px;
  border-radius: 17px;
  background: linear-gradient(135deg, rgba(24, 38, 68, 0.78) 0%, rgba(13, 18, 29, 0.94) 100%);
  border: 1px solid rgba(96, 165, 250, 0.24);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.wallet-hero-kicker {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.7px;
  color: #93c5fd;
  margin-bottom: 5px;
}

.wallet-hero-bal-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.wallet-hero-amount {
  font-size: 25px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.4px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.wallet-hero-connect {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(96, 165, 250, 0.28);
  color: #dbeafe;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.wallet-hero-connect:hover {
  background: rgba(59, 130, 246, 0.25);
  border-color: rgba(147, 197, 253, 0.52);
}

.wallet-connect-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
}

.wallet-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 12px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  align-self: flex-start;
  transition: background 0.15s ease;
}

.wallet-back-btn:hover {
  background: rgba(59, 130, 246, 0.16);
  color: #ffffff;
}

.wallet-section-panel {
  background: rgba(20, 25, 36, 0.88);
  border: 1px solid rgba(147, 197, 253, 0.12);
  border-radius: 17px;
  overflow: hidden;
  margin-bottom: 10px;
}

.wallet-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.wallet-panel-title {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #94a3b8;
}

.wallet-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
}

.wallet-quick-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 8px;
  border-radius: 14px;
  background: rgba(15, 20, 30, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #e2e8f0;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.18s ease, background 0.18s ease;
}

.wallet-quick-tile:hover {
  background: rgba(30, 41, 64, 0.78);
  border-color: rgba(96, 165, 250, 0.42);
  color: #ffffff;
}

.wallet-quick-tile:active {
  transform: scale(0.96);
}

.wallet-quick-tile.is-accent {
  background: linear-gradient(155deg, rgba(37, 99, 235, 0.24) 0%, rgba(15, 23, 42, 0.85) 100%);
  border-color: rgba(59, 130, 246, 0.45);
  color: #ffffff;
}

.wallet-tile-ico {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #dbeafe;
}

.wallet-quick-tile.is-accent .wallet-tile-ico {
  color: #60a5fa;
}

.wallet-tile-label {
  font-size: 12.5px;
  font-weight: 700;
}

.wallet-hist-filters {
  display: flex;
  align-items: center;
  gap: 4px;
}

.wallet-hist-chip {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.wallet-hist-chip.active {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(96, 165, 250, 0.55);
  color: #ffffff;
}

.wallet-history-list {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wallet-hist-date {
  font-size: 12.5px;
  font-weight: 700;
  color: #cbd5e1;
  margin-top: 2px;
}

.wallet-tx-card {
  background: rgba(14, 18, 27, 0.86);
  border: 1px solid rgba(147, 197, 253, 0.1);
  border-radius: 14px;
  overflow: hidden;
}

.wallet-tx-top {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
}

.wallet-tx-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wallet-tx-icon.is-deposit {
  background: rgba(34, 197, 94, 0.13);
  border-color: rgba(74, 222, 128, 0.28);
  color: #4ade80;
}

.wallet-tx-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.wallet-tx-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wallet-tx-kind {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.wallet-tx-status-col {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.wallet-tx-status {
  font-size: 11.5px;
  font-weight: 700;
  color: #22c55e;
}

.wallet-tx-time {
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.wallet-tx-amt {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.wallet-tx-amt.is-plus {
  color: #4ade80;
}

.wallet-tx-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.015);
  font-size: 11px;
  color: var(--text-muted);
}

.wallet-tx-meta-pair {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.wallet-tx-meta-pair span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-tx-sep {
  color: rgba(255, 255, 255, 0.14);
}

.wallet-copy-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s ease;
}

.wallet-copy-btn:hover {
  color: #60a5fa;
}

/* ==========================================
   DEPOSIT & WITHDRAW SHEETS (Native Clean UI)
   ========================================== */
.modal-sheet.wallet-action-sheet {
  background: #131720;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 22px;
}

.wallet-sheet-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wallet-sheet-title .gramm-logo-svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.wallet-sheet-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 4px;
}

.wallet-sheet-summary {
  background: #191e29;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.wallet-sheet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13.5px;
}

.wallet-sheet-key {
  color: #8e98a8;
  font-weight: 500;
}

.wallet-sheet-val {
  color: #f1f5f9;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.wallet-sheet-val.status-connected {
  color: #4ade80;
}

.wallet-sheet-val.status-disconnected {
  color: #94a3b8;
}

.wallet-sheet-accent {
  color: #60a5fa;
  font-weight: 700;
}

.wallet-sheet-muted {
  color: #94a3b8;
  font-weight: 500;
}

.wallet-sheet-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
}

.wallet-sheet-total {
  font-size: 14.5px;
}

.wallet-sheet-total-key {
  color: #ffffff;
  font-weight: 700;
}

.wallet-sheet-total-val {
  color: #60a5fa;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.wallet-sheet-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #94a3b8;
}

.wallet-field-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 14px;
}

.wallet-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px;
}

.wallet-field-label {
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
}

.wallet-text-action {
  background: transparent;
  border: none;
  padding: 0;
  color: #60a5fa;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.wallet-text-action.is-empty {
  color: #94a3b8;
}

.wallet-input-box {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 14px;
  background: #191e29;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  transition: border-color 0.16s ease;
}

.wallet-input-box:focus-within {
  border-color: #3b82f6;
}

.wallet-input-gem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wallet-input-gem .gramm-logo-svg {
  width: 18px;
  height: 18px;
}

.wallet-text-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: #f8fafc;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13.5px;
  font-weight: 500;
}

.wallet-text-input::placeholder {
  color: #64748b;
  font-family: inherit;
}

.wallet-num-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 19px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}

.wallet-num-input::-webkit-outer-spin-button,
.wallet-num-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.wallet-num-input::placeholder {
  color: #64748b;
}

.wallet-inline-btn {
  padding: 6px 11px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.14);
  border: none;
  color: #60a5fa;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.wallet-inline-btn:hover,
.wallet-inline-btn.active {
  background: rgba(59, 130, 246, 0.28);
  color: #ffffff;
}

.wallet-unit-tag {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.withdraw-status-note {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 500;
  color: #f87171;
  line-height: 1.35;
}

.wallet-field-group.is-error .wallet-input-box {
  border-color: rgba(248, 113, 113, 0.65);
}

.wallet-submit-btn {
  width: 100%;
  height: 48px;
  margin-top: 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  box-shadow: none;
}

.wallet-disconnect-link {
  color: #f43f5e;
  margin: 2px auto 0;
  text-align: center;
  width: 100%;
}


/* Organized TON Deposit Modal */
.deposit-copy-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.deposit-copy-pill:hover {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(59, 130, 246, 0.4);
}

.deposit-copy-pill.is-memo {
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.12);
}

.deposit-secondary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.deposit-alt-btn {
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.deposit-alt-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.deposit-alt-btn.is-check {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
}

.deposit-live-status {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.28);
  color: #bfdbfe;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

/* Custom NFT Withdraw Confirmation Modal */
.nft-withdraw-preview-box {
  width: 88px;
  height: 88px;
  margin: 4px auto 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 45%, #2b3b55, #18202b);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.nft-withdraw-preview-img {
  width: 68px;
  height: 68px;
  object-fit: contain;
}

.nft-withdraw-confirm-text {
  margin: 0 0 18px;
  text-align: center;
  color: #f8fafc;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}

.nft-withdraw-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.nft-withdraw-btn-cancel {
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease;
}

.nft-withdraw-btn-cancel:hover {
  background: rgba(255, 255, 255, 0.11);
}

.nft-withdraw-btn-confirm {
  margin-top: 0 !important;
  width: 100%;
}
