@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css');

:root {
  --art-bg-void: #050616;
  --art-bg-deep: #0a0d24;
  --art-bg-surface: #10142e;
  --art-bg-card: rgba(14, 18, 42, 0.78);
  --art-bg-card-hover: rgba(20, 26, 60, 0.88);
  --art-glass-border: rgba(255, 255, 255, 0.08);
  --art-glass-border-hi: rgba(255, 255, 255, 0.18);
  --art-text: #e8ecf3;
  --art-text-dim: #9ba3b4;
  --art-text-mute: #6b7280;
  --art-accent: #8b9eff;
  --art-accent-2: #c084fc;
  --art-gold: #f4c44e;
  --art-gold-glow: rgba(244, 196, 78, 0.45);

  --art-grade-epic: #af52de;
  --art-grade-epic-glow: rgba(175, 82, 222, 0.55);
  --art-grade-mystic: #ff2d55;
  --art-grade-mystic-glow: rgba(255, 45, 85, 0.55);
  --art-grade-primal: #00e6d2;
  --art-grade-primal-glow: rgba(0, 230, 210, 0.55);

  --art-font: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.art-overlay, .art-overlay * {
  font-family: var(--art-font);
  box-sizing: border-box;
}

.art-overlay {
  position: fixed; inset: 0;
  background: rgba(2, 4, 12, 0.85);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.art-overlay.active { opacity: 1; pointer-events: auto; }
.art-overlay.active .art-panel { transform: translateY(0) scale(1); opacity: 1; }

.art-panel {
  position: relative;
  width: 100%; max-width: 1180px;
  max-height: 92vh; max-height: 92dvh;
  background:
    radial-gradient(ellipse 800px 400px at 30% 0%, rgba(139, 158, 255, 0.08), transparent 70%),
    radial-gradient(ellipse 600px 600px at 80% 100%, rgba(192, 132, 252, 0.06), transparent 70%),
    linear-gradient(175deg, #0c1030 0%, #08091e 50%, #0a0c28 100%);
  border: 1px solid var(--art-glass-border);
  border-radius: 20px;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.7),
    0 0 140px rgba(139, 158, 255, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
  display: flex; flex-direction: column;
  transform: translateY(28px) scale(0.96); opacity: 0;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}
.art-panel::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--art-grade-epic) 25%,
    var(--art-grade-mystic) 50%,
    var(--art-grade-primal) 75%,
    transparent 100%);
  opacity: 0.7; z-index: 2;
}
.art-panel::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 500px 300px at 20% 10%, rgba(139, 158, 255, 0.05), transparent),
    radial-gradient(ellipse 400px 400px at 80% 80%, rgba(255, 45, 85, 0.04), transparent);
  pointer-events: none; z-index: 0;
}
.art-panel > * { position: relative; z-index: 1; }

.art-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 28px 18px;
  border-bottom: 1px solid var(--art-glass-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
}
.art-header-left { display: flex; align-items: center; gap: 14px; }
.art-header-icon {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(139, 158, 255, 0.18), rgba(192, 132, 252, 0.12));
  border: 1px solid rgba(139, 158, 255, 0.3);
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(139, 158, 255, 0.2);
}
.art-title {
  font-size: 22px; font-weight: 800; letter-spacing: 0.2px;
  background: linear-gradient(120deg, #fff 30%, #c4b5fd 70%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.art-progress-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--art-glass-border);
  border-radius: 999px;
  font-size: 12px; font-weight: 600; color: var(--art-text-dim);
}
.art-progress-pill .art-progress-num {
  color: var(--art-gold);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.art-header-right { display: flex; align-items: center; gap: 12px; }
.art-dust-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: linear-gradient(135deg, rgba(139, 158, 255, 0.15), rgba(192, 132, 252, 0.08));
  border: 1px solid rgba(139, 158, 255, 0.3);
  border-radius: 10px;
  font-size: 13px; font-weight: 700; color: #fff;
  box-shadow: 0 0 24px rgba(139, 158, 255, 0.18) inset;
}
.art-dust-badge svg { width: 18px; height: 18px; }
.art-dust-badge .art-dust-num { font-variant-numeric: tabular-nums; }

.art-close-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--art-glass-border);
  border-radius: 10px;
  cursor: pointer; color: var(--art-text-dim);
  transition: all 0.2s ease;
}
.art-close-btn:hover {
  background: rgba(255, 45, 85, 0.15);
  border-color: rgba(255, 45, 85, 0.3);
  color: #ff8fa3;
}

.art-body {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
  padding: 22px 28px;
  overflow: hidden;
  flex: 1;
}

.art-section {
  display: flex; flex-direction: column;
  background: var(--art-bg-card);
  border: 1px solid var(--art-glass-border);
  border-radius: 14px;
  overflow: hidden;
}

.art-section-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--art-glass-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent);
}
.art-section-title {
  font-size: 13px; font-weight: 700; color: var(--art-text);
  letter-spacing: 0.5px; text-transform: uppercase;
}
.art-section-sub {
  font-size: 11px; color: var(--art-text-mute); font-weight: 500;
}

.art-filter-tabs {
  display: flex; gap: 4px;
  padding: 12px 16px 0;
}
.art-filter-tab {
  padding: 6px 12px;
  font-size: 12px; font-weight: 600;
  background: transparent; border: none; cursor: pointer;
  color: var(--art-text-dim);
  border-radius: 8px;
  transition: all 0.2s ease;
}
.art-filter-tab:hover { color: var(--art-text); background: rgba(255, 255, 255, 0.04); }
.art-filter-tab.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(139, 158, 255, 0.2), rgba(192, 132, 252, 0.12));
  box-shadow: inset 0 0 0 1px rgba(139, 158, 255, 0.3);
}

.art-grid-wrap {
  flex: 1; overflow-y: auto;
  padding: 12px 16px 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 158, 255, 0.3) transparent;
}
.art-grid-wrap::-webkit-scrollbar { width: 8px; }
.art-grid-wrap::-webkit-scrollbar-thumb {
  background: rgba(139, 158, 255, 0.3);
  border-radius: 4px;
}
.art-grid-wrap::-webkit-scrollbar-track { background: transparent; }

.art-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.art-series-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.art-series-header {
  display: flex; align-items: center; gap: 10px;
  padding: 0 2px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--art-text-dim);
}
.art-series-header::before,
.art-series-header::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--art-glass-border-hi), transparent);
}
.art-series-header .art-series-icon {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(139, 158, 255, 0.3));
}
.art-series-header .art-series-icon svg,
.art-series-header .art-series-icon .art-icon-img {
  width: 100%; height: 100%;
  object-fit: contain;
}
.art-series-header .art-series-label {
  white-space: nowrap;
  background: linear-gradient(90deg, #c4b5fd, #fff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.art-series-header .art-series-count {
  font-size: 10px;
  color: var(--art-text-mute);
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: none;
  padding: 1px 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--art-glass-border);
  border-radius: 999px;
}

.art-series-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}

.art-card {
  position: relative;
  aspect-ratio: 1 / 1;
  background: rgba(8, 10, 24, 0.7);
  border: 1.5px solid var(--art-glass-border);
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
              border-color 0.2s ease,
              box-shadow 0.3s ease;
  overflow: hidden;
}
.art-card:hover {
  transform: translateY(-4px) scale(1.03);
  border-color: rgba(255, 255, 255, 0.2);
}
.art-card.selected {
  border-color: var(--art-gold);
  box-shadow: 0 0 0 1px var(--art-gold), 0 8px 24px var(--art-gold-glow);
}
.art-card.equipped::after {
  content: "✓";
  position: absolute; top: 4px; right: 4px;
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  font-size: 12px; font-weight: 800;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.5);
  z-index: 3;
}
.art-card.locked {
  filter: grayscale(0.95) brightness(0.4);
  border-style: dashed;
  cursor: pointer;
}
.art-card.locked:hover {
  filter: grayscale(0.7) brightness(0.55);
}
.art-card.locked.selected {
  filter: grayscale(0.4) brightness(0.7);
  border-style: solid;
}
.art-card.bulk-mode { cursor: pointer; }
.art-card.bulk-selected {
  border-color: #ff8fa3;
  box-shadow: 0 0 0 2px #ff8fa3, 0 6px 20px rgba(255, 143, 163, 0.4);
}
.art-card.bulk-selected::before {
  content: "";
  position: absolute; inset: 0;
  background: rgba(255, 45, 85, 0.12);
  z-index: 2;
}

.art-card.grade-Epic {
  border: 2px solid rgba(175, 82, 222, 0.75);
  background: linear-gradient(165deg, #1a0a30 0%, #240d44 100%);
  box-shadow: 0 0 22px rgba(175, 82, 222, 0.35);
}
.art-card.grade-Epic:hover {
  border-color: #c084fc;
  box-shadow: 0 10px 32px rgba(175, 82, 222, 0.6);
}

.art-card.grade-Mystic {
  border: 2px solid rgba(255, 45, 85, 0.80);
  background: linear-gradient(165deg, #220812 0%, #2e0a18 100%);
  box-shadow: 0 0 24px rgba(255, 45, 85, 0.40);
}
.art-card.grade-Mystic:hover {
  border-color: #ff6688;
  box-shadow: 0 10px 34px rgba(255, 45, 85, 0.65);
}

.art-card.grade-Primal {
  border: 2px solid transparent;
  background:
    linear-gradient(165deg, #06202c 0%, #150a30 100%) padding-box,
    linear-gradient(135deg, #00e6d2 0%, #a35ddf 50%, #ffc85a 100%) border-box;
  box-shadow:
    0 0 30px rgba(0, 230, 210, 0.42),
    0 0 16px rgba(163, 93, 223, 0.32);
}
.art-card.grade-Primal:hover {
  box-shadow:
    0 12px 40px rgba(0, 230, 210, 0.60),
    0 0 24px rgba(163, 93, 223, 0.45),
    0 0 16px rgba(255, 200, 90, 0.30);
}

.art-card-icon {
  position: absolute; inset: 3px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9px;
  overflow: hidden;
}
.art-card-icon svg,
.art-card-icon .art-icon-img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
  transition: transform 0.3s ease;
}
.art-card.grade-Epic .art-card-icon::after,
.art-card.grade-Mystic .art-card-icon::after,
.art-card.grade-Primal .art-card-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
}
.art-card.grade-Epic .art-card-icon::after {
  background:
    radial-gradient(ellipse 100% 60% at 50% 100%, rgba(175, 82, 222, 0.55), transparent 70%),
    radial-gradient(ellipse 100% 50% at 50% 0%, rgba(175, 82, 222, 0.35), transparent 70%);
  box-shadow: inset 0 0 0 1px rgba(175, 82, 222, 0.4), inset 0 0 22px rgba(175, 82, 222, 0.40);
  mix-blend-mode: screen;
}
.art-card.grade-Mystic .art-card-icon::after {
  background:
    radial-gradient(ellipse 100% 60% at 50% 100%, rgba(255, 45, 85, 0.60), transparent 70%),
    radial-gradient(ellipse 100% 50% at 50% 0%, rgba(255, 45, 85, 0.40), transparent 70%);
  box-shadow: inset 0 0 0 1px rgba(255, 45, 85, 0.45), inset 0 0 24px rgba(255, 45, 85, 0.45);
  mix-blend-mode: screen;
}
.art-card.grade-Primal .art-card-icon::after {
  background:
    radial-gradient(ellipse 100% 60% at 50% 100%, rgba(0, 230, 210, 0.55), transparent 70%),
    radial-gradient(ellipse 60% 40% at 20% 10%, rgba(163, 93, 223, 0.40), transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 10%, rgba(255, 200, 90, 0.30), transparent 70%);
  box-shadow:
    inset 0 0 0 1.5px rgba(0, 230, 210, 0.50),
    inset 0 0 28px rgba(0, 230, 210, 0.40),
    inset 0 0 14px rgba(163, 93, 223, 0.30);
  mix-blend-mode: screen;
}
.art-card:hover .art-card-icon svg,
.art-card:hover .art-card-icon .art-icon-img { transform: scale(1.08); }
.art-icon-missing { opacity: 0.35; }

.art-card-level {
  position: absolute; bottom: 4px; left: 4px;
  padding: 2px 7px;
  background: linear-gradient(135deg, #00e6d2, #5cf2e2);
  color: #02141a;
  font-size: 10px; font-weight: 900;
  border: 1px solid rgba(0, 0, 0, 0.5);
  border-radius: 999px;
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.5);
  box-shadow: 0 2px 8px rgba(0, 230, 210, 0.6);
  letter-spacing: 0.2px;
  z-index: 4;
}

.art-slot-level {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  padding: 1px 7px;
  background: linear-gradient(135deg, #00e6d2, #5cf2e2);
  color: #02141a;
  font-size: 10px; font-weight: 900;
  border: 1px solid rgba(0, 0, 0, 0.4);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 230, 210, 0.7);
  z-index: 5;
  letter-spacing: 0.2px;
  white-space: nowrap;
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.5);
}

.art-card-grade-tag {
  position: absolute; top: 4px; left: 4px;
  width: 8px; height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
}
.art-card.grade-Epic .art-card-grade-tag { background: var(--art-grade-epic); color: var(--art-grade-epic); }
.art-card.grade-Mystic .art-card-grade-tag { background: var(--art-grade-mystic); color: var(--art-grade-mystic); }
.art-card.grade-Primal .art-card-grade-tag { background: var(--art-grade-primal); color: var(--art-grade-primal); }

.art-card-empty-icon {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255, 255, 255, 0.15);
  font-size: 32px;
  font-weight: 100;
}

.art-loadout {
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.art-slot-row {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  align-items: center;
}
.art-slot {
  position: relative;
  aspect-ratio: 1 / 1;
  background: rgba(8, 10, 24, 0.6);
  border: 1.5px dashed rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  overflow: hidden;
}
.art-slot:hover { border-color: var(--art-gold); }
.art-slot.filled {
  border-style: solid;
  border-width: 2px;
  background: rgba(8, 10, 24, 0.7);
}
.art-slot.drag-over {
  border-color: var(--art-gold);
  background: rgba(244, 196, 78, 0.1);
  box-shadow: 0 0 20px var(--art-gold-glow);
  transform: scale(1.05);
}
.art-slot.filled.grade-Epic { border-color: var(--art-grade-epic); box-shadow: inset 0 0 24px rgba(175, 82, 222, 0.18); }
.art-slot.filled.grade-Mystic { border-color: var(--art-grade-mystic); box-shadow: inset 0 0 24px rgba(255, 45, 85, 0.18); }
.art-slot.filled.grade-Primal {
  border-color: var(--art-grade-primal);
  box-shadow: inset 0 0 28px rgba(0, 230, 210, 0.22);
  animation: artSlotPrimalGlow 3s ease-in-out infinite;
}
@keyframes artSlotPrimalGlow {
  0%, 100% { box-shadow: inset 0 0 24px rgba(0, 230, 210, 0.18), 0 0 0 0 rgba(0, 230, 210, 0); }
  50% { box-shadow: inset 0 0 30px rgba(0, 230, 210, 0.3), 0 0 24px rgba(0, 230, 210, 0.35); }
}

.art-slot-empty-text {
  font-size: 11px; color: var(--art-text-mute);
  font-weight: 600; letter-spacing: 0.5px;
}
.art-slot-icon {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: inherit;
  overflow: hidden;
}
.art-slot-icon svg,
.art-slot-icon .art-icon-img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.6));
}
.art-slot-unequip-btn {
  position: absolute; top: 3px; right: 3px;
  width: 18px; height: 18px;
  background: rgba(255, 45, 85, 0.85);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 12px; font-weight: 700;
  cursor: pointer;
  display: none;
  align-items: center; justify-content: center;
  z-index: 5;
  line-height: 1;
}
.art-slot.filled:hover .art-slot-unequip-btn { display: flex; }
.art-slot-unequip-btn:hover { background: #ff2d55; transform: scale(1.1); }

.art-slot-info {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px;
  color: var(--art-text-dim);
}
.art-slot-info .art-slot-label {
  font-weight: 700; color: var(--art-text-mute);
  text-transform: uppercase; letter-spacing: 0.5px; font-size: 10px;
}
.art-slot-info .art-slot-name {
  font-size: 14px; font-weight: 700; color: var(--art-text);
}
.art-slot-info .art-slot-effect {
  font-size: 11px; color: var(--art-text-dim);
  line-height: 1.4;
}
.art-slot-info .art-slot-empty-label {
  font-size: 11px; color: var(--art-text-mute);
  font-style: italic;
}

.art-summary {
  padding: 12px 16px;
  background: rgba(8, 10, 24, 0.5);
  border-top: 1px solid var(--art-glass-border);
}
.art-summary-title {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--art-text-mute);
  margin-bottom: 8px;
}
.art-summary-list {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px; color: var(--art-text);
}
.art-summary-row {
  display: flex; justify-content: space-between;
  font-variant-numeric: tabular-nums;
}
.art-summary-row .art-summary-key { color: var(--art-text-dim); }
.art-summary-row .art-summary-val {
  color: var(--art-gold); font-weight: 700;
}
.art-summary-empty {
  font-size: 11px; color: var(--art-text-mute);
  font-style: italic;
  text-align: center;
  padding: 6px 0;
}

.art-detail {
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  flex: 1;
  overflow-y: auto;
}
.art-detail-empty {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  color: var(--art-text-mute); font-size: 13px; font-style: italic;
}
.art-detail-card {
  display: flex; gap: 14px;
  padding: 14px;
  background: rgba(8, 10, 24, 0.6);
  border: 1px solid var(--art-glass-border);
  border-radius: 12px;
}
.art-detail-card.grade-Epic { box-shadow: inset 0 0 30px rgba(175, 82, 222, 0.12); border-color: rgba(175, 82, 222, 0.35); }
.art-detail-card.grade-Mystic { box-shadow: inset 0 0 30px rgba(255, 45, 85, 0.14); border-color: rgba(255, 45, 85, 0.4); }
.art-detail-card.grade-Primal { box-shadow: inset 0 0 36px rgba(0, 230, 210, 0.16); border-color: rgba(0, 230, 210, 0.45); }

.art-detail-icon {
  width: 100px; height: 100px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  border: 1px solid var(--art-glass-border);
}
.art-detail-icon {
  overflow: hidden;
}
.art-detail-icon svg,
.art-detail-icon .art-icon-img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 11px;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.7));
}

.art-detail-info { flex: 1; min-width: 0; }
.art-detail-name {
  font-size: 18px; font-weight: 800;
  color: var(--art-text);
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
.art-detail-card.grade-Epic .art-detail-name { color: var(--art-grade-epic); text-shadow: 0 0 12px var(--art-grade-epic-glow); }
.art-detail-card.grade-Mystic .art-detail-name { color: var(--art-grade-mystic); text-shadow: 0 0 12px var(--art-grade-mystic-glow); }
.art-detail-card.grade-Primal .art-detail-name { color: var(--art-grade-primal); text-shadow: 0 0 12px var(--art-grade-primal-glow); }

.art-detail-tags {
  display: flex; gap: 6px; margin-top: 6px;
}
.art-detail-tag {
  font-size: 10px; font-weight: 700;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--art-glass-border);
  border-radius: 999px;
  color: var(--art-text-dim);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.art-detail-tag.tag-grade-Epic { border-color: var(--art-grade-epic); color: var(--art-grade-epic); }
.art-detail-tag.tag-grade-Mystic { border-color: var(--art-grade-mystic); color: var(--art-grade-mystic); }
.art-detail-tag.tag-grade-Primal { border-color: var(--art-grade-primal); color: var(--art-grade-primal); }

.art-detail-effect {
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(244, 196, 78, 0.06);
  border-left: 2px solid var(--art-gold);
  border-radius: 6px;
  font-size: 13px; font-weight: 600;
  color: var(--art-text);
}
.art-detail-flavor {
  margin-top: 10px;
  font-size: 12px; color: var(--art-text-dim);
  font-style: italic; line-height: 1.6;
  padding-left: 10px;
  border-left: 1px solid var(--art-glass-border);
}

.art-upgrade-section {
  padding: 14px;
  background: linear-gradient(135deg, rgba(0, 230, 210, 0.08), rgba(139, 158, 255, 0.05));
  border: 1px solid rgba(0, 230, 210, 0.25);
  border-radius: 12px;
}
.art-upgrade-section.v2 {
  padding: 16px 18px;
  background:
    radial-gradient(ellipse at top right, rgba(0, 230, 210, 0.10), transparent 60%),
    linear-gradient(165deg, rgba(8, 22, 38, 0.95), rgba(20, 8, 40, 0.95));
  border: 1px solid transparent;
  background-clip: padding-box;
  position: relative;
  box-shadow: 0 0 20px rgba(0, 230, 210, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.art-upgrade-section.v2::before {
  content: "";
  position: absolute; inset: 0;
  padding: 1px;
  border-radius: 12px;
  background: linear-gradient(135deg, #00e6d2 0%, #a35ddf 50%, #ffc85a 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
  opacity: 0.55;
}
.art-upgrade-section.v2 .art-upgrade-head {
  margin-bottom: 12px;
}
.art-upgrade-section.v2 .art-upgrade-title {
  font-size: 12px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase;
  background: linear-gradient(90deg, #5cf2e2, #c4b5fd);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.art-upgrade-section.v2 .art-upgrade-level {
  font-size: 14px; font-variant-numeric: tabular-nums; font-weight: 900;
  display: flex; align-items: baseline; gap: 3px;
}
.art-upgrade-lv-current {
  font-size: 20px;
  background: linear-gradient(135deg, #00e6d2, #5cf2e2);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  text-shadow: 0 0 12px rgba(0,230,210,0.35);
}
.art-upgrade-lv-sep { color: rgba(255,255,255,0.3); font-weight: 600; font-size: 14px; }
.art-upgrade-lv-max { color: rgba(255,255,255,0.55); font-size: 14px; font-weight: 700; }
.art-upgrade-max {
  font-size: 13px; font-weight: 800; letter-spacing: 0.8px; padding: 4px 10px;
  background: linear-gradient(135deg, #ffc85a, #ff9530);
  color: #2a1500; border-radius: 6px;
  box-shadow: 0 0 12px rgba(255,200,90,0.35);
}

.art-upgrade-pips {
  display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px;
  margin-bottom: 14px;
}
.art-upgrade-pip {
  height: 8px; border-radius: 3px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.3s ease;
}
.art-upgrade-pip.filled {
  background: linear-gradient(90deg, #00e6d2, #5cf2e2);
  border-color: #5cf2e2;
  box-shadow: 0 0 6px rgba(0, 230, 210, 0.5);
}
.art-upgrade-pip.next {
  background: rgba(0, 230, 210, 0.18);
  border-color: rgba(0, 230, 210, 0.55);
  animation: artPipNextPulse 1.6s ease-in-out infinite;
}
@keyframes artPipNextPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 230, 210, 0); }
  50% { box-shadow: 0 0 10px 2px rgba(0, 230, 210, 0.45); }
}

.art-upgrade-cost-card {
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.30);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
}
.art-upgrade-cost-card.ok {
  border-color: rgba(34, 197, 94, 0.45);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(0, 0, 0, 0.3));
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.15);
}
.art-upgrade-cost-card.lack {
  border-color: rgba(255, 100, 100, 0.40);
  background: linear-gradient(135deg, rgba(255, 100, 100, 0.06), rgba(0, 0, 0, 0.3));
}
.art-upgrade-cost-card-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
  font-size: 11px;
  letter-spacing: 0.5px;
}
.art-upgrade-cost-card-label {
  font-weight: 700; color: rgba(255, 255, 255, 0.65); text-transform: uppercase;
}
.art-upgrade-cost-card-status .ok-tag {
  color: #4ade80; font-weight: 800;
  padding: 3px 8px; border-radius: 4px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
}
.art-upgrade-cost-card-status .lack-tag {
  color: #ff8fa3; font-weight: 800;
  padding: 3px 8px; border-radius: 4px;
  background: rgba(255, 100, 100, 0.10);
  border: 1px solid rgba(255, 100, 100, 0.4);
}
.art-upgrade-cost-card-body { display: flex; flex-direction: column; gap: 8px; }
.art-upgrade-cost-row {
  display: flex; align-items: center; gap: 10px;
}
.art-upgrade-cost-icon {
  flex-shrink: 0;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(244, 196, 78, 0.35);
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(244, 196, 78, 0.15);
}
.art-upgrade-cost-info { flex: 1; min-width: 0; }
.art-upgrade-cost-info-key {
  font-size: 11px; color: rgba(255, 255, 255, 0.55); font-weight: 600;
  margin-bottom: 2px;
}
.art-upgrade-cost-info-vals {
  display: flex; align-items: baseline; gap: 6px;
  font-variant-numeric: tabular-nums;
}
.art-upgrade-cost-have-val {
  font-size: 17px; font-weight: 900;
  text-shadow: 0 0 8px currentColor;
}
.art-upgrade-cost-have-val.ok { color: #86efac; text-shadow: 0 0 10px rgba(74, 222, 128, 0.5); }
.art-upgrade-cost-have-val.lack { color: #ff8fa3; text-shadow: 0 0 10px rgba(255, 143, 163, 0.4); }
.art-upgrade-cost-slash {
  font-size: 14px; color: rgba(255, 255, 255, 0.3); font-weight: 600;
}
.art-upgrade-cost-need-val {
  font-size: 14px; font-weight: 700; color: rgba(255, 255, 255, 0.75);
}
.art-upgrade-cost-bar {
  height: 5px; border-radius: 3px;
  background: rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.art-upgrade-cost-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffc85a, #ff9530);
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(255, 200, 90, 0.5);
  transition: width 0.4s ease;
}
.art-upgrade-cost-card.ok .art-upgrade-cost-bar-fill {
  background: linear-gradient(90deg, #4ade80, #22c55e);
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
}

.art-eff-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 6px 0 10px;
}
.art-eff-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px;
  padding: 7px 12px;
  background: linear-gradient(135deg, rgba(0, 230, 210, 0.08), rgba(139, 158, 255, 0.05));
  border: 1px solid rgba(0, 230, 210, 0.20);
  border-radius: 8px;
  font-size: 13px;
}
.art-eff-key { color: rgba(255, 255, 255, 0.70); font-weight: 600; }
.art-eff-val {
  font-weight: 800; font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, #00e6d2, #5cf2e2);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  text-shadow: 0 0 10px rgba(0, 230, 210, 0.35);
}

.art-upgrade-compare {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 200, 90, 0.06), rgba(163, 93, 223, 0.04));
  border: 1px solid rgba(255, 200, 90, 0.25);
}
.art-upgrade-compare-title {
  font-size: 11px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase;
  color: #ffc85a;
  margin-bottom: 6px;
}
.art-eff-diff-list {
  display: flex; flex-direction: column; gap: 4px;
}
.art-eff-diff-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.art-eff-diff-key { color: rgba(255, 255, 255, 0.65); font-weight: 600; }
.art-eff-diff-cur {
  color: rgba(255, 255, 255, 0.55);
  font-weight: 700;
}
.art-eff-diff-arrow {
  color: rgba(255, 200, 90, 0.85);
  font-weight: 800;
  font-size: 13px;
}
.art-eff-diff-nxt {
  color: #ffc85a;
  font-weight: 800;
  text-shadow: 0 0 8px rgba(255, 200, 90, 0.4);
}

.art-upgrade-cost-card-body .art-upgrade-cost-row {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 12px;
}
.art-upgrade-cost-key-col {
  font-size: 13px; font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
}
.art-upgrade-cost-pair {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.art-upgrade-cost-pair-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
}
.art-upgrade-cost-pair-label {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.art-upgrade-cost-pair-value {
  font-size: 15px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.art-upgrade-cost-pair-value.owned.ok {
  color: #86efac;
  text-shadow: 0 0 8px rgba(74, 222, 128, 0.45);
}
.art-upgrade-cost-pair-value.owned.lack {
  color: #ff8fa3;
  text-shadow: 0 0 8px rgba(255, 143, 163, 0.4);
}
.art-upgrade-cost-pair-value.required {
  color: rgba(255, 255, 255, 0.85);
}

.art-upgrade-maxed-msg {
  text-align: center;
  padding: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #ffc85a;
  background: linear-gradient(135deg, rgba(255, 200, 90, 0.10), rgba(255, 149, 48, 0.06));
  border: 1px solid rgba(255, 200, 90, 0.35);
  border-radius: 10px;
  letter-spacing: 0.6px;
}
.art-upgrade-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 8px;
}
.art-upgrade-head .art-upgrade-title {
  font-size: 13px; font-weight: 700; color: var(--art-text);
}
.art-upgrade-head .art-upgrade-level {
  font-size: 12px; color: var(--art-grade-primal);
  font-weight: 800; font-variant-numeric: tabular-nums;
}
.art-upgrade-progress {
  height: 6px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}
.art-upgrade-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--art-grade-primal), #5cf2e2);
  box-shadow: 0 0 12px rgba(0, 230, 210, 0.6);
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.art-upgrade-cost {
  font-size: 11px; color: var(--art-text-dim);
  margin-bottom: 10px;
}
.art-upgrade-cost .art-upgrade-cost-val {
  color: var(--art-gold); font-weight: 700;
}

.art-action-row {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.art-btn {
  flex: 1;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(139, 158, 255, 0.18), rgba(192, 132, 252, 0.12));
  border: 1px solid rgba(139, 158, 255, 0.35);
  border-radius: 10px;
  color: var(--art-text);
  font-size: 13px; font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--art-font);
}
.art-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(139, 158, 255, 0.3), rgba(192, 132, 252, 0.2));
  border-color: rgba(139, 158, 255, 0.55);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(139, 158, 255, 0.25);
}
.art-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.art-btn-equip {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(16, 185, 129, 0.12));
  border-color: rgba(34, 197, 94, 0.4);
  color: #86efac;
}
.art-btn-equip:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.32), rgba(16, 185, 129, 0.22));
  border-color: rgba(34, 197, 94, 0.6);
  box-shadow: 0 6px 18px rgba(34, 197, 94, 0.25);
}

.art-btn-decompose {
  background: linear-gradient(135deg, rgba(255, 143, 163, 0.16), rgba(255, 45, 85, 0.1));
  border-color: rgba(255, 143, 163, 0.35);
  color: #ffb4c2;
}
.art-btn-decompose:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(255, 143, 163, 0.28), rgba(255, 45, 85, 0.2));
  border-color: rgba(255, 143, 163, 0.55);
  box-shadow: 0 6px 18px rgba(255, 45, 85, 0.25);
}

.art-btn-upgrade {
  background: linear-gradient(135deg, rgba(0, 230, 210, 0.22), rgba(91, 191, 255, 0.14));
  border-color: rgba(0, 230, 210, 0.45);
  color: #5cf2e2;
}
.art-btn-upgrade:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(0, 230, 210, 0.36), rgba(91, 191, 255, 0.24));
  border-color: rgba(0, 230, 210, 0.7);
  box-shadow: 0 6px 24px rgba(0, 230, 210, 0.4);
}

.art-bulk-bar {
  position: sticky; bottom: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px;
  background: linear-gradient(180deg, rgba(8, 10, 24, 0.85), rgba(2, 4, 12, 0.95));
  border-top: 1px solid var(--art-glass-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.art-bulk-info {
  font-size: 12px; color: var(--art-text-dim);
}
.art-bulk-info .art-bulk-count { color: var(--art-text); font-weight: 700; }
.art-bulk-actions { display: flex; gap: 6px; }
.art-bulk-btn {
  padding: 7px 12px;
  font-size: 12px; font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid var(--art-glass-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--art-text);
  transition: all 0.2s ease;
}
.art-bulk-btn:hover { background: rgba(255, 255, 255, 0.08); }
.art-bulk-btn.danger {
  background: linear-gradient(135deg, rgba(255, 45, 85, 0.2), rgba(255, 45, 85, 0.1));
  border-color: rgba(255, 45, 85, 0.35);
  color: #ff8fa3;
}
.art-bulk-btn.danger:hover {
  background: linear-gradient(135deg, rgba(255, 45, 85, 0.32), rgba(255, 45, 85, 0.18));
  border-color: rgba(255, 45, 85, 0.55);
}

.art-toast {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -45%) scale(0.94);
  min-width: 200px; max-width: 80vw;
  padding: 16px 28px;
  background: linear-gradient(135deg, rgba(12, 16, 36, 0.96), rgba(24, 30, 70, 0.88));
  border: 1.5px solid var(--art-glass-border-hi);
  border-radius: 14px;
  color: var(--art-text);
  font-size: 15px; font-weight: 700;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 80px rgba(139, 158, 255, 0.25);
  z-index: 11000;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  letter-spacing: 0.2px;
}
.art-toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); pointer-events: auto; }
.art-toast.success { border-color: rgba(34, 197, 94, 0.55); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 80px rgba(34, 197, 94, 0.3); color: #d8f5e2; }
.art-toast.error { border-color: rgba(255, 45, 85, 0.55); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 80px rgba(255, 45, 85, 0.32); color: #ffd5dd; }

.art-upgrade-cost-line {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: baseline;
  padding: 4px 0;
  font-variant-numeric: tabular-nums;
}
.art-upgrade-cost-line + .art-upgrade-cost-line {
  border-top: 1px dashed var(--art-glass-border);
}
.art-upgrade-cost-key {
  font-size: 11px;
  color: var(--art-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.art-upgrade-cost-need {
  font-size: 14px;
  font-weight: 800;
  color: var(--art-gold);
  text-align: right;
}
.art-upgrade-cost-have {
  font-size: 11px;
  font-weight: 600;
  color: var(--art-text-mute);
}
.art-upgrade-cost-have.ok { color: #86efac; }
.art-upgrade-cost-have.lack { color: #ff8fa3; }

@media (max-width: 900px) {
  .art-body { grid-template-columns: 1fr; }
  .art-panel { max-width: 96vw; }
}

.artifact-launch-wrap {
  display: flex; justify-content: center;
  margin: 4px 0 2px;
}
.artifact-launch-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(192, 132, 252, 0.18), rgba(0, 230, 210, 0.12));
  border: 1px solid rgba(192, 132, 252, 0.4);
  border-radius: 999px;
  color: #e8ecf3;
  font-size: 12px; font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 0 18px rgba(192, 132, 252, 0.08), 0 4px 14px rgba(0, 0, 0, 0.25);
  position: relative; overflow: hidden;
  letter-spacing: 0.3px;
}
.artifact-launch-btn::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.18) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}
.artifact-launch-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(192, 132, 252, 0.7);
  box-shadow: inset 0 0 22px rgba(192, 132, 252, 0.15), 0 8px 22px rgba(192, 132, 252, 0.32);
}
.artifact-launch-btn:hover::before { transform: translateX(100%); }
.artifact-launch-btn .alb-icon { display: inline-flex; flex-shrink: 0; }
.artifact-launch-btn .alb-label { letter-spacing: 0.4px; }

.artifact-socket-wrap {
  position: relative;
  display: inline-flex;
  align-items: center; justify-content: center;
  flex-shrink: 0;
}
.artifact-socket-svg,
.artifact-socket-img {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  overflow: hidden;
}
.artifact-socket-svg svg,
.artifact-socket-img .art-icon-img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}
.artifact-socket-lv {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 8px;
  background: linear-gradient(135deg, #00e6d2, #5cf2e2);
  color: #02141a;
  font-size: 10px; font-weight: 900;
  border: 1.5px solid rgba(0, 0, 0, 0.5);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 230, 210, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  z-index: 5;
  letter-spacing: 0.3px;
  white-space: nowrap;
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.4);
}
.artifact-socket.unlocked {
  position: relative;
  background: rgba(8, 10, 24, 0.65);
  border: 2px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.artifact-socket.artifact-socket-grade-Epic {
  border-color: rgba(175, 82, 222, 0.55);
  box-shadow: 0 0 12px rgba(175, 82, 222, 0.32), inset 0 0 18px rgba(175, 82, 222, 0.18);
}
.artifact-socket.artifact-socket-grade-Mystic {
  border-color: rgba(255, 45, 85, 0.6);
  box-shadow: 0 0 12px rgba(255, 45, 85, 0.36), inset 0 0 18px rgba(255, 45, 85, 0.2);
}
.artifact-socket.artifact-socket-grade-Primal {
  border-color: rgba(0, 230, 210, 0.65);
  box-shadow: 0 0 14px rgba(0, 230, 210, 0.42), inset 0 0 22px rgba(0, 230, 210, 0.22);
  animation: artifactSocketPrimalPulse 3s ease-in-out infinite;
}
@keyframes artifactSocketPrimalPulse {
  0%, 100% { box-shadow: 0 0 12px rgba(0, 230, 210, 0.32), inset 0 0 18px rgba(0, 230, 210, 0.18); }
  50% { box-shadow: 0 0 22px rgba(0, 230, 210, 0.55), inset 0 0 26px rgba(0, 230, 210, 0.3); }
}

/* === Mobile artifacts === */
.art-overlay.art-mobile { padding: 0; align-items: stretch; background: rgba(0,0,0,0.85); backdrop-filter: blur(8px); }
.art-overlay.art-mobile .art-panel { display: none; }
.art-m-panel { width: 100%; height: 100vh; height: 100dvh; background: linear-gradient(180deg, #0c1030, #08091e); display: flex; flex-direction: column; transform: none !important; opacity: 1 !important; }

.art-overlay.art-mobile .art-m-header { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: linear-gradient(180deg, rgba(12,16,48,0.95), rgba(8,9,30,0.85)); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(255,255,255,0.06); position: sticky; top: 0; z-index: 10; }
.art-m-back { width: 36px; height: 36px; padding: 0; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12); border-radius: 8px; color: #cbd5e1; font-size: 24px; font-weight: 700; cursor: pointer; line-height: 1; }
.art-m-back:active { background: rgba(255,68,102,0.18); color: #ff7a8e; }
.art-m-title-block { flex: 1; min-width: 0; }
.art-m-title { font-size: 16px; font-weight: 800; color: #e7eaf3; line-height: 1.2; background: linear-gradient(120deg, #fff 30%, #c4b5fd 70%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.art-m-sub { font-size: 11px; color: #c4b5fd; margin-top: 2px; font-weight: 700; }
.art-m-sub .art-progress-num { color: var(--art-gold, #f4c44e); }

.art-m-tabbar { display: flex; gap: 6px; padding: 10px 12px; background: rgba(8,9,30,0.6); border-bottom: 1px solid rgba(255,255,255,0.05); position: sticky; top: 56px; z-index: 9; overflow-x: auto; scrollbar-width: none; }
.art-m-tabbar::-webkit-scrollbar { display: none; }
.art-m-tab { flex: 1; min-width: max-content; padding: 10px 14px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 999px; color: #aab4c6; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: all 0.15s; }
.art-m-tab.active { background: linear-gradient(135deg, rgba(192,132,252,0.32), rgba(139,158,255,0.18)); border-color: rgba(192,132,252,0.6); color: #fff; box-shadow: 0 3px 12px rgba(192,132,252,0.3); }

.art-m-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px 12px; }
.art-m-tab-content { display: none; }
.art-m-tab-content.active { display: block; animation: artMobTabFade 0.2s ease-out; }
@keyframes artMobTabFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Loadout tab — slots + detail flow naturally, body scrolls when overflow */
.art-overlay.art-mobile .art-m-tab-content[data-mtab="loadout"] { display: none; flex-direction: column; gap: 12px; }
.art-overlay.art-mobile .art-m-tab-content[data-mtab="loadout"].active { display: flex; }
.art-m-loadout-grid { display: flex; flex-direction: column; gap: 8px; padding: 10px; background: linear-gradient(135deg, rgba(192,132,252,0.08), rgba(139,158,255,0.04)); border: 1px solid rgba(192,132,252,0.22); border-radius: 14px; }
.art-m-loadout-grid .art-m-slot { min-height: 80px; }
.art-m-slot { position: relative; display: grid; grid-template-columns: 80px 1fr; gap: 12px; align-items: center; width: 100%; padding: 12px; background: rgba(0,0,0,0.4); border: 2px solid rgba(255,255,255,0.1); border-radius: 12px; cursor: pointer; transition: transform 0.12s, box-shadow 0.15s; text-align: left; }
.art-m-slot:active { transform: scale(0.98); }
.art-m-slot.filled { background: linear-gradient(135deg, rgba(0,0,0,0.5), rgba(192,132,252,0.06)); }
.art-m-slot.filled.grade-Epic { border-color: var(--art-grade-epic, #af52de); box-shadow: 0 0 12px rgba(175,82,222,0.35); }
.art-m-slot.filled.grade-Mystic { border-color: var(--art-grade-mystic, #ff2d55); box-shadow: 0 0 12px rgba(255,45,85,0.4); }
.art-m-slot.filled.grade-Primal { border-color: var(--art-grade-primal, #00e6d2); box-shadow: 0 0 14px rgba(0,230,210,0.45); }
.art-m-slot-iconbox { position: relative; width: 80px; height: 80px; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.35); border-radius: 10px; border: 1px solid rgba(255,255,255,0.08); }
.art-m-slot-num { position: absolute; top: 4px; left: 4px; font-size: 10px; font-weight: 800; color: #9aa3b3; background: rgba(0,0,0,0.7); padding: 2px 5px; border-radius: 6px; line-height: 1; z-index: 2; }
.art-m-slot-icon { width: 90%; height: 90%; display: flex; align-items: center; justify-content: center; }
.art-m-slot-icon svg, .art-m-slot-icon img { width: 100%; height: 100%; object-fit: contain; }
.art-m-slot-empty-icon { font-size: 36px; color: rgba(255,255,255,0.2); font-weight: 200; line-height: 1; }
.art-m-slot-level { position: absolute; bottom: 4px; right: 4px; background: linear-gradient(135deg, #00e6d2, #00a896); color: #002a26; font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 8px; box-shadow: 0 2px 6px rgba(0,230,210,0.45); z-index: 2; }
.art-m-slot-textbox { min-width: 0; display: flex; flex-direction: column; gap: 4px; padding-right: 36px; }
.art-m-slot-name { font-size: 14px; color: #e7eaf3; font-weight: 800; line-height: 1.25; }
.art-m-slot-name-empty { color: #6a7385; font-weight: 600; }
.art-m-slot-effect { font-size: 11px; color: #c4b5fd; line-height: 1.35; word-break: keep-all; }
.art-m-slot-effect-empty { color: #6a7385; font-style: italic; }
.art-m-slot-unequip { position: absolute; top: 50%; right: 10px; transform: translateY(-50%); width: 28px; height: 28px; background: rgba(255,68,102,0.75); color: #fff; border: 0; border-radius: 50%; font-size: 15px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; line-height: 1; }
.art-m-slot-unequip:active { background: #ff4466; transform: translateY(-50%) scale(0.92); }

/* Detail panel — show full renderDetail content (upgrade/cost/etc) */
.art-m-detail { padding: 14px; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; min-height: 120px; }
.art-m-detail-empty { padding: 30px 16px; text-align: center; color: #6a7385; font-size: 13px; }
.art-m-detail .art-detail-empty { padding: 24px; text-align: center; color: #6a7385; font-size: 13px; }
.art-m-detail .art-detail-card { display: flex; flex-direction: column; gap: 12px; padding: 0; background: transparent; border: none; box-shadow: none; }
.art-m-detail .art-detail-icon { width: 80px; height: 80px; margin: 0 auto; }
.art-m-detail .art-detail-info { width: 100%; }
.art-m-detail .art-detail-name { font-size: 16px; text-align: center; }
.art-m-detail .art-detail-tags { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.art-m-detail .art-detail-effect, .art-m-detail .art-detail-effects-line { font-size: 13px; line-height: 1.5; padding: 10px; background: rgba(0,0,0,0.35); border-radius: 8px; }
.art-m-detail .art-detail-flavor { font-size: 11px; font-style: italic; opacity: 0.7; margin-top: 8px; text-align: center; padding: 8px; border-left: 2px solid rgba(192,132,252,0.4); }

/* Upgrade section inside detail */
.art-m-detail .art-upgrade-section { margin-top: 14px; padding: 14px; background: linear-gradient(135deg, rgba(0,230,210,0.08), rgba(0,230,210,0.02)); border: 1px solid rgba(0,230,210,0.22); border-radius: 12px; }
.art-m-detail .art-upgrade-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.art-m-detail .art-upgrade-title { font-size: 13px; font-weight: 800; color: #4ee8d8; }
.art-m-detail .art-upgrade-level { font-size: 13px; font-weight: 700; }
.art-m-detail .art-upgrade-lv-current { color: #ffe082; }
.art-m-detail .art-upgrade-lv-sep { color: #6a7385; margin: 0 6px; }
.art-m-detail .art-upgrade-lv-max { color: #4ee8d8; }
.art-m-detail .art-upgrade-max { color: #4ee8d8; font-weight: 800; }
.art-m-detail .art-upgrade-pips { display: flex; gap: 3px; margin-bottom: 12px; flex-wrap: wrap; }
.art-m-detail .art-upgrade-pip { flex: 1; min-width: 8px; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); }
.art-m-detail .art-upgrade-pip.filled { background: linear-gradient(90deg, #4ee8d8, #00a896); border-color: transparent; }
.art-m-detail .art-upgrade-pip.next { background: rgba(0,230,210,0.18); border-color: rgba(0,230,210,0.5); box-shadow: 0 0 6px rgba(0,230,210,0.5); animation: artPipPulse 1.4s ease-in-out infinite; }
@keyframes artPipPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.55; } }
.art-m-detail .art-upgrade-compare { margin-bottom: 12px; padding: 10px; background: rgba(0,0,0,0.3); border-radius: 8px; }
.art-m-detail .art-upgrade-compare-title { font-size: 12px; color: #aab4c6; margin-bottom: 8px; font-weight: 700; }
.art-m-detail .art-upgrade-cost-card { padding: 12px; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; }
.art-m-detail .art-upgrade-cost-card.ok { border-color: rgba(74,222,128,0.4); background: rgba(74,222,128,0.06); }
.art-m-detail .art-upgrade-cost-card.lack { border-color: rgba(255,68,102,0.4); background: rgba(255,68,102,0.05); }
.art-m-detail .art-upgrade-cost-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.art-m-detail .art-upgrade-cost-card-label { font-size: 12px; font-weight: 700; color: #cbd5e1; }
.art-m-detail .ok-tag { color: #86efac; font-weight: 700; font-size: 11px; }
.art-m-detail .lack-tag { color: #ff7a8e; font-weight: 700; font-size: 11px; }
.art-m-detail .art-upgrade-cost-card-body { }
.art-m-detail .art-upgrade-cost-row { display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: center; }
.art-m-detail .art-upgrade-cost-icon { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; }
.art-m-detail .art-upgrade-cost-key-col { display: none; }
.art-m-detail .art-upgrade-cost-pair { display: flex; flex-direction: column; gap: 3px; }
.art-m-detail .art-upgrade-cost-pair-line { display: flex; justify-content: space-between; font-size: 12px; }
.art-m-detail .art-upgrade-cost-pair-label { color: #9aa3b3; }
.art-m-detail .art-upgrade-cost-pair-value { font-weight: 800; color: #fff; }
.art-m-detail .art-upgrade-cost-pair-value.required { color: #ffd95a; }
.art-m-detail .art-upgrade-cost-pair-value.ok { color: #86efac; }
.art-m-detail .art-upgrade-cost-pair-value.lack { color: #ff7a8e; }
.art-m-detail .art-upgrade-cost-bar { height: 6px; background: rgba(0,0,0,0.4); border-radius: 3px; margin-top: 8px; overflow: hidden; }
.art-m-detail .art-upgrade-cost-bar-fill { height: 100%; background: linear-gradient(90deg, #4ee8d8, #ffd95a); transition: width 0.3s; }
.art-m-detail .art-upgrade-maxed-msg { padding: 14px; text-align: center; color: #4ee8d8; font-weight: 700; font-size: 13px; }

/* Action row — bottom-most buttons. Hide equip (S?) button (loadout tab always equipped) */
.art-m-detail .art-action-row { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.art-m-detail .art-action-row .art-btn { width: 100%; padding: 14px; border-radius: 12px; font-size: 14px; font-weight: 800; border: 0; cursor: pointer; }
.art-m-detail .art-action-row .art-btn[data-action="unequip"] { background: linear-gradient(135deg, #ff4466, #c8254a); color: #fff; box-shadow: 0 6px 18px rgba(255,68,102,0.35); }
.art-m-detail .art-action-row .art-btn[data-action="upgrade"] { background: linear-gradient(135deg, #4ee8d8, #00a896); color: #002a26; box-shadow: 0 6px 18px rgba(0,230,210,0.35); }
.art-m-detail .art-action-row .art-btn[data-action="upgrade"]:disabled { background: rgba(255,255,255,0.08); color: #6a7385; box-shadow: none; cursor: not-allowed; }
.art-m-detail .art-action-row .art-btn[data-action="equip"] { display: none; }

/* Inventory tab */
.art-m-filter-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-bottom: 10px; padding: 0 2px 2px; }
.art-m-filter-tabs::-webkit-scrollbar { display: none; }
.art-m-filter-tabs .art-filter-tab { flex-shrink: 0; padding: 8px 14px; font-size: 12px; white-space: nowrap; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 999px; }
.art-m-filter-tabs .art-filter-tab.active { background: linear-gradient(135deg, rgba(139,158,255,0.25), rgba(192,132,252,0.12)); border-color: rgba(139,158,255,0.45); color: #fff; }
.art-m-inv-count { font-size: 11px; color: #9aa3b3; margin-bottom: 10px; padding: 0 4px; }
.art-overlay.art-mobile .art-grid { display: flex; flex-direction: column; gap: 16px; padding: 0; }
.art-overlay.art-mobile .art-series-group { display: flex; flex-direction: column; gap: 8px; }
.art-overlay.art-mobile .art-series-header { padding: 6px 8px; font-size: 12px; color: #c4b5fd; font-weight: 700; letter-spacing: 0.4px; display: flex; align-items: center; gap: 8px; }
.art-overlay.art-mobile .art-series-header::before, .art-overlay.art-mobile .art-series-header::after { display: none; }
.art-overlay.art-mobile .art-series-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.art-overlay.art-mobile .art-card { padding: 6px; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.art-overlay.art-mobile .art-card-icon { width: 100%; height: 100%; max-width: none; margin: 0; display: flex; align-items: center; justify-content: center; }
.art-overlay.art-mobile .art-card-icon svg, .art-overlay.art-mobile .art-card-icon img { width: 100%; height: 100%; object-fit: contain; }
.art-overlay.art-mobile .art-card-level { font-size: 10px; padding: 1px 5px; bottom: 4px; right: 4px; }
.art-overlay.art-mobile .art-card-grade-tag { display: none; }
.art-m-bulk-bar { padding: 10px 12px; background: rgba(0,0,0,0.25); border: 1px solid rgba(255,255,255,0.06); border-radius: 10px; font-size: 12px; color: #cbd5e1; margin-top: 12px; text-align: center; }

/* Effects tab */
.art-m-summary-title { font-size: 16px; font-weight: 800; color: #e7eaf3; margin-bottom: 14px; padding: 0 4px; }
.art-overlay.art-mobile .art-summary-list { display: flex; flex-direction: column; gap: 8px; }
.art-overlay.art-mobile .art-summary-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: linear-gradient(135deg, rgba(192,132,252,0.12), rgba(139,158,255,0.04)); border: 1px solid rgba(192,132,252,0.25); border-radius: 12px; }
.art-overlay.art-mobile .art-summary-key { font-size: 13px; color: #cbd5e1; font-weight: 600; }
.art-overlay.art-mobile .art-summary-val { font-size: 16px; font-weight: 800; color: #ffe082; }
.art-overlay.art-mobile .art-summary-empty { padding: 36px; text-align: center; color: #6a7385; font-size: 13px; }

/* Mobile equip bottom sheet */
.art-m-sheet-overlay { position: fixed; inset: 0; z-index: 100001; background: rgba(0,0,0,0); display: flex; align-items: flex-end; justify-content: center; transition: background 0.25s; }
.art-m-sheet-overlay.open { background: rgba(0,0,0,0.6); }
.art-m-sheet { width: 100%; max-height: 88vh; background: linear-gradient(180deg, #131a2e, #0c1030); border-radius: 18px 18px 0 0; transform: translateY(100%); transition: transform 0.28s cubic-bezier(0.34, 1.4, 0.64, 1); display: flex; flex-direction: column; box-shadow: 0 -20px 60px rgba(0,0,0,0.6); }
.art-m-sheet-overlay.open .art-m-sheet { transform: translateY(0); }
.art-m-sheet-header { position: relative; padding: 6px 14px 10px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.art-m-sheet-handle { width: 42px; height: 4px; background: rgba(255,255,255,0.22); border-radius: 2px; margin: 4px auto 8px; }
.art-m-sheet-close { position: absolute; top: 8px; right: 10px; background: transparent; border: 0; color: #cbd5e1; width: 32px; height: 32px; border-radius: 8px; font-size: 22px; cursor: pointer; }
.art-m-sheet-body { flex: 1; overflow-y: auto; padding: 14px 16px; -webkit-overflow-scrolling: touch; }

.art-m-eq-card { position: relative; padding: 16px; border-radius: 14px; background: rgba(0,0,0,0.35); border: 2px solid rgba(255,255,255,0.1); text-align: center; }
.art-m-eq-slot-label { position: absolute; top: 10px; left: 12px; font-size: 11px; font-weight: 800; color: #c4b5fd; background: rgba(0,0,0,0.5); padding: 3px 8px; border-radius: 6px; letter-spacing: 0.3px; }
.art-m-eq-card.grade-Epic { border-color: var(--art-grade-epic, #af52de); box-shadow: 0 0 20px rgba(175,82,222,0.35); }
.art-m-eq-card.grade-Mystic { border-color: var(--art-grade-mystic, #ff2d55); box-shadow: 0 0 20px rgba(255,45,85,0.4); }
.art-m-eq-card.grade-Primal { border-color: var(--art-grade-primal, #00e6d2); box-shadow: 0 0 22px rgba(0,230,210,0.45); }
.art-m-eq-icon { width: 88px; height: 88px; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; }
.art-m-eq-icon svg, .art-m-eq-icon img { width: 100%; height: 100%; object-fit: contain; }
.art-m-eq-name { font-size: 17px; font-weight: 800; color: #fff; margin-bottom: 8px; }
.art-m-eq-tags { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.art-m-eq-tag { padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); color: #cbd5e1; }
.art-m-eq-tag.grade-Epic { background: rgba(175,82,222,0.18); border-color: rgba(175,82,222,0.45); color: #d8a8f0; }
.art-m-eq-tag.grade-Mystic { background: rgba(255,45,85,0.18); border-color: rgba(255,45,85,0.45); color: #ff7a8e; }
.art-m-eq-tag.grade-Primal { background: rgba(0,230,210,0.18); border-color: rgba(0,230,210,0.45); color: #4ee8d8; }
.art-m-eq-tag.locked { background: rgba(255,255,255,0.04); color: #888; }
.art-m-eq-effect { font-size: 13px; line-height: 1.5; padding: 10px 12px; background: rgba(0,0,0,0.3); border-radius: 8px; text-align: left; margin-bottom: 8px; }
.art-m-eq-flavor { font-size: 11px; color: rgba(255,255,255,0.5); font-style: italic; padding: 8px; border-left: 2px solid rgba(192,132,252,0.4); text-align: left; }

.art-m-pick-title { font-size: 14px; font-weight: 800; color: #c4b5fd; margin: 18px 0 10px; text-align: center; }
.art-m-slot-pick-list { display: flex; flex-direction: column; gap: 8px; }
.art-m-slot-pick { display: flex; align-items: center; gap: 12px; padding: 14px 14px; background: rgba(255,255,255,0.04); border: 2px solid rgba(255,255,255,0.1); border-radius: 12px; cursor: pointer; transition: transform 0.12s; text-align: left; }
.art-m-slot-pick:active { transform: scale(0.98); }
.art-m-slot-pick.filled.grade-Epic { border-color: rgba(175,82,222,0.4); }
.art-m-slot-pick.filled.grade-Mystic { border-color: rgba(255,45,85,0.4); }
.art-m-slot-pick.filled.grade-Primal { border-color: rgba(0,230,210,0.4); }
.art-m-slot-pick-num { width: 32px; height: 32px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, rgba(139,158,255,0.25), rgba(192,132,252,0.12)); border: 1px solid rgba(139,158,255,0.4); border-radius: 50%; color: #c4b5fd; font-weight: 800; font-size: 14px; }
.art-m-slot-pick-info { flex: 1; font-size: 14px; color: #e7eaf3; font-weight: 700; }
.art-m-slot-pick.empty .art-m-slot-pick-info { color: #6a7385; font-weight: 500; font-style: italic; }

.art-m-equipped-info { padding: 14px; margin: 16px 0 12px; background: rgba(0,230,210,0.1); border: 1px solid rgba(0,230,210,0.3); border-radius: 10px; color: #4ee8d8; font-size: 13px; font-weight: 700; text-align: center; }
.art-m-action-btn { width: 100%; padding: 16px; border-radius: 12px; border: 0; font-size: 15px; font-weight: 800; cursor: pointer; }
.art-m-unequip-btn { background: linear-gradient(135deg, #ff4466, #c8254a); color: #fff; box-shadow: 0 6px 18px rgba(255,68,102,0.35); }
.art-m-unequip-btn:active { transform: scale(0.98); }

@media (max-width: 480px) {
  .art-m-loadout-grid .art-m-slot { min-height: 70px; padding: 10px; gap: 10px; grid-template-columns: 64px 1fr; }
  .art-m-slot-iconbox { width: 64px; height: 64px; }
}

