:root {
  --bg: #07070d;
  --bg-2: #0d0d17;
  --bg-3: #131322;
  --panel: #171728;
  --panel-2: #1e1e33;
  --line: #2a2a44;
  --line-2: #3a3a5e;
  --ink: #eef0ff;
  --ink-dim: #9ea3c9;
  --ink-mute: #6b7099;
  --wind: #22e56b;
  --flow: #a855f7;
  --inferno: #ff8c1a;
  --shimmer: #22d3ee;
  --umbra: #b91c1c;
  --rare: #5aa2ff;
  --epic: #c66bff;
  --legendary: #ffb84d;
  --radius: 14px;
  --shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.7);
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body {
  background:
    radial-gradient(
      1200px 800px at 10% -10%,
      rgba(34, 229, 255, 0.06),
      transparent 60%
    ),
    radial-gradient(
      1000px 700px at 110% 10%,
      rgba(200, 93, 255, 0.05),
      transparent 60%
    ),
    radial-gradient(
      900px 600px at 50% 120%,
      rgba(255, 90, 77, 0.04),
      transparent 60%
    ),
    var(--bg);
  min-height: 100vh;
}
a {
  color: var(--wind);
  text-decoration: none;
}
h1,
h2,
h3,
h4 {
  font-family: "Rajdhani", sans-serif;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0;
}
code,
.mono {
  font-family: "JetBrains Mono", monospace;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(7, 7, 13, 0.85);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 22px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Rajdhani", sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.brand:hover .brand-name {
  opacity: 0.8;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: conic-gradient(
    from 220deg,
    var(--wind),
    var(--shimmer),
    var(--inferno),
    var(--flow),
    var(--wind)
  );
  box-shadow:
    0 0 20px rgba(34, 229, 255, 0.35),
    inset 0 0 12px rgba(0, 0, 0, 0.4);
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 5px;
  background: var(--bg);
}
.brand-name {
  background: linear-gradient(90deg, #fff, #a5b0ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-sub {
  color: var(--ink-mute);
  font-size: 11px;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-left: 2px;
}
.nav {
  display: flex;
  gap: 2px;
  margin-left: auto;
}
.nav a {
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--ink-dim);
  font-family: "Rajdhani", sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all 0.15s;
}
.nav a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}
.nav a.active {
  color: var(--wind);
  background: rgba(34, 229, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(34, 229, 255, 0.25);
}

.hero {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 22px 18px;
}
.hero h1 {
  font-size: 38px;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #fff 0%, #b5c0ff 60%, var(--wind) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .sub {
  color: var(--ink-dim);
  margin-top: 6px;
  font-size: 14px;
}
.hero .count {
  color: var(--ink-mute);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  margin-top: 14px;
}
.hero .count b {
  color: var(--wind);
}

.filters {
  max-width: 1400px;
  margin: 0 auto;
  padding: 6px 22px 22px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: end;
}
.filters-left {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: flex-end;
}
.fgroup {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.flabel {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-family: "JetBrains Mono", monospace;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink-dim);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.chip:hover {
  background: var(--panel-2);
  color: var(--ink);
  border-color: var(--line-2);
}
.chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.chip[data-active="1"] {
  color: var(--ink);
  border-color: currentColor;
}
.chip.wind[data-active="1"] {
  background: rgba(34, 229, 107, 0.12);
  color: var(--wind);
  box-shadow: 0 0 12px rgba(34, 229, 107, 0.2);
}
.chip.flow[data-active="1"] {
  background: rgba(168, 85, 247, 0.12);
  color: var(--flow);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.2);
}
.chip.inferno[data-active="1"] {
  background: rgba(255, 140, 26, 0.12);
  color: var(--inferno);
  box-shadow: 0 0 12px rgba(255, 140, 26, 0.2);
}
.chip.shimmer[data-active="1"] {
  background: rgba(34, 211, 238, 0.12);
  color: var(--shimmer);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.2);
}
.chip.umbra[data-active="1"] {
  background: rgba(185, 28, 28, 0.16);
  color: var(--umbra);
  box-shadow: 0 0 12px rgba(185, 28, 28, 0.25);
}
.chip.role[data-active="1"],
.chip.rarity[data-active="1"] {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}
.search-wrap {
  position: relative;
  min-width: 280px;
}
.search {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: "Inter", sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}
.search:focus {
  border-color: var(--wind);
  box-shadow: 0 0 0 3px rgba(34, 229, 255, 0.08);
}
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.5;
  pointer-events: none;
}
.sort {
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: "Inter", sans-serif;
  font-size: 13px;
  cursor: pointer;
}
.reset-btn {
  padding: 6px 12px;
  border-radius: 8px;
  background: transparent;
  border: 1px dashed var(--line-2);
  color: var(--ink-mute);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  cursor: pointer;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.reset-btn:hover {
  color: var(--ink);
  border-color: var(--ink-mute);
}

.grid-wrap {
  width: 100%;
  padding: 6px 22px 60px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.card {
  position: relative;
  background: linear-gradient(
    180deg,
    var(--_bgTop, #0d0d17),
    var(--_bgBottom, #07070d)
  );
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 0.18s,
    border-color 0.18s,
    box-shadow 0.18s;
  display: flex;
  flex-direction: column;
  content-visibility: auto;
  contain-intrinsic-size: auto 340px;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--_accent, var(--line-2));
  box-shadow: 0 12px 30px -12px var(--_glow);
}
.card-portrait {
  aspect-ratio: 1/1;
  position: relative;
  overflow: hidden;
  background: transparent;
}
.card-portrait img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  padding: 4px;
}
.card-portrait svg {
  width: 100%;
  height: 100%;
  display: block;
}
.badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-start;
  z-index: 2;
}
.rarity-tag {
  padding: 3px 9px;
  border-radius: 6px;
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line-2);
  color: var(--ink);
}
.rarity-tag.legendary {
  color: var(--legendary);
  border-color: var(--legendary);
}
.rarity-tag.epic {
  color: var(--epic);
  border-color: var(--epic);
}
.rarity-tag.rare {
  color: var(--rare);
  border-color: var(--rare);
}
.rarity-tag.meta {
  background: linear-gradient(
    90deg,
    rgba(255, 211, 107, 0.92),
    rgba(255, 107, 184, 0.92),
    rgba(107, 176, 255, 0.92)
  );
  color: #141414;
  border-color: transparent;
}
.rarity-tag.umbra {
  background: linear-gradient(
    90deg,
    rgba(138, 107, 255, 0.25),
    rgba(90, 60, 180, 0.25)
  );
  color: #c9b8ff;
  border-color: var(--umbra);
}
.element-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  border: 1px solid var(--_accent);
  display: grid;
  place-items: center;
  color: var(--_accent);
  box-shadow: 0 0 12px var(--_glow);
  z-index: 2;
}
.element-tag svg {
  width: 28px;
  height: 28px;
}
.card-body {
  padding: 13px 15px 15px;
  border-top: 1px solid var(--line);
  background: var(--panel);
  position: relative;
  z-index: 1;
  border-radius: 0 0 var(--radius) var(--radius);
}
.card-name {
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.card-divine {
  font-size: 12px;
  color: var(--_accent);
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.05em;
  margin-top: 1px;
}
.card-meta {
  margin-top: 9px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--ink-mute);
  font-family: "JetBrains Mono", monospace;
}
.card-meta span {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--bg-2);
  border: 1px solid var(--line);
}

.modal-back {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(3, 3, 10, 0.78);
  backdrop-filter: blur(10px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 30px 20px;
  overflow-y: auto;
}
.modal-back.open {
  display: flex;
}
.modal {
  width: 100%;
  max-width: 1100px;
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line-2);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
  animation: slideUp 0.25s ease;
}
@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--line-2);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.15s;
}
.modal-close:hover {
  background: var(--inferno);
  border-color: var(--inferno);
  color: #fff;
}
.modal-header {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 0;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 720px) {
  .modal-header {
    grid-template-columns: 1fr;
  }
}
.modal-portrait {
  min-height: 360px;
  background: radial-gradient(
    circle at 50% 35%,
    var(--_bgTop, #222),
    var(--_bgBottom, #0a0a12)
  );
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-portrait img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: 420px;
}
.modal-portrait svg {
  width: 100%;
  height: 100%;
}
.modal-info {
  padding: 24px 28px;
}
.modal-info .divine {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--_accent);
}
.modal-info h2 {
  font-size: 38px;
  margin: 2px 0 10px;
  font-weight: 700;
}
.modal-info .lore {
  color: var(--ink-dim);
  margin: 14px 0;
  font-size: 14px;
  line-height: 1.6;
}
.modal-info .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.modal-info .tag {
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--ink-dim);
}
.modal-info .tag.element {
  color: var(--_accent);
  border-color: var(--_accent);
}
.modal-info .tag.legendary {
  color: var(--legendary);
  border-color: var(--legendary);
}
.modal-info .tag.epic {
  color: var(--epic);
  border-color: var(--epic);
}
.modal-info .tag.rare {
  color: var(--rare);
  border-color: var(--rare);
}
.modal-info .tag.meta {
  background: linear-gradient(90deg, #ffd36b, #ff6bb8, #6bb0ff);
  color: #141414;
  border-color: transparent;
}
.modal-info .tag.umbra {
  color: #c9b8ff;
  border-color: var(--umbra);
}

.modal-tabs {
  display: flex;
  gap: 2px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  overflow-x: auto;
}
.tab {
  padding: 12px 16px;
  background: transparent;
  border: none;
  color: var(--ink-mute);
  font-family: "Rajdhani", sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
}
.tab:hover {
  color: var(--ink);
}
.tab.active {
  color: var(--_accent);
  border-bottom-color: var(--_accent);
}
.tab-panels {
  padding: 24px 28px 32px;
}
.panel {
  display: none;
}
.panel.active {
  display: block;
  animation: fade 0.2s ease;
}
@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.ability {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 14px;
  background: var(--bg-2);
}
.ability-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.ability-badge {
  padding: 3px 9px;
  border-radius: 5px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--panel);
  color: var(--ink-mute);
  border: 1px solid var(--line-2);
}
.ability-badge.basic {
  color: var(--wind);
  border-color: var(--wind);
}
.ability-badge.active {
  color: var(--flow);
  border-color: var(--flow);
}
.ability-badge.ultimate {
  color: var(--inferno);
  border-color: var(--inferno);
}
.ability-badge.passive {
  color: var(--shimmer);
  border-color: var(--shimmer);
}
.ability-name {
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
}
.ability-cd {
  margin-left: auto;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--ink-mute);
  padding: 3px 8px;
  background: var(--panel);
  border-radius: 5px;
  border: 1px solid var(--line);
}
.ability-desc {
  color: var(--ink-dim);
  font-size: 13.5px;
  line-height: 1.55;
  margin-bottom: 12px;
}
.upgrades {
  margin-top: 10px;
}
.upgrades-title {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-family: "JetBrains Mono", monospace;
  margin-bottom: 8px;
}
.upgrade {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 7px 0;
  border-top: 1px dashed var(--line);
}
.upgrade-lvl {
  flex-shrink: 0;
  width: 70px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--_accent);
  font-weight: 500;
  padding-top: 1px;
}
.upgrade-eff {
  font-size: 13px;
  color: var(--ink-dim);
}
.ability-asc {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--bg-3);
  border-left: 3px solid var(--_accent);
  border-radius: 0 6px 6px 0;
  font-size: 12.5px;
  color: var(--ink-dim);
}
.ability-asc b {
  color: var(--_accent);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 3px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.stat {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-label {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-family: "JetBrains Mono", monospace;
}
.stat-value {
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: var(--ink);
}
.subhead {
  color: var(--ink-dim);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 24px 0 12px;
  font-family: "JetBrains Mono", monospace;
}
.subhead:first-child {
  margin-top: 0;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}
.prof {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 13px;
}
.prof-label {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-family: "JetBrains Mono", monospace;
  margin-bottom: 3px;
}
.prof-value {
  color: var(--ink);
  font-size: 14px;
}

.lore-chapter {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 14px;
  background: var(--bg-2);
}
.lore-chapter-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}
.lore-num {
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--_accent);
  flex-shrink: 0;
}
.lore-title {
  font-family: "Rajdhani", sans-serif;
  font-weight: 600;
  font-size: 18px;
  color: var(--ink);
}
.lore-unlock {
  font-size: 11px;
  font-style: italic;
  color: var(--ink-mute);
  margin-bottom: 10px;
  font-family: "JetBrains Mono", monospace;
}
.lore-body {
  color: var(--ink-dim);
  font-size: 13.5px;
  line-height: 1.65;
  white-space: pre-wrap;
}
.journal-box {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
}
.journal-body {
  color: var(--ink-dim);
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  font-family: "JetBrains Mono", monospace;
}

.set-row {
  display: grid;
  grid-template-columns: 130px 1fr 1fr;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.set-row:first-of-type {
  border-top: none;
}
.set-label {
  font-family: "Rajdhani", sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--_accent);
}
.set-item {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}
.set-item-name {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 4px;
}
.set-item-bonus {
  font-size: 12px;
  color: var(--ink-dim);
  line-height: 1.4;
}
.related-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.related-item {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 13px;
  font-size: 13px;
  color: var(--ink-dim);
}

.placeholder-note {
  margin-top: 20px;
  padding: 16px 20px;
  background: var(--bg-2);
  border: 1px dashed var(--line-2);
  border-radius: 10px;
  color: var(--ink-mute);
  font-family: "JetBrains Mono", monospace;
  font-size: 12.5px;
  line-height: 1.6;
}
.placeholder-note b {
  color: var(--_accent);
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--ink-mute);
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
}
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
::-webkit-scrollbar-track {
  background: var(--bg-2);
}
::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: 6px;
  border: 2px solid var(--bg-2);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--ink-mute);
}
.btn-auth {
  margin-left: 12px;
  padding: 8px 16px;
  border-radius: 8px;
  background: rgba(34, 229, 107, 0.12);
  border: 1px solid var(--wind);
  color: var(--wind);
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-auth:hover {
  background: rgba(34, 229, 107, 0.25);
}
.btn-download {
  padding: 8px 16px;
  border-radius: 8px;
  background: rgba(34, 229, 107, 0.1);
  border: 1px solid var(--wind);
  color: var(--wind);
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-download:hover {
  background: rgba(34, 229, 107, 0.22);
}
.user-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 12px;
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 12px;
}
#userEmail {
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-avatar-btn {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--line);
  background: var(--bg-2);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.user-avatar-btn:hover {
  border-color: var(--wind);
}
.user-avatar-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.user-avatar-btn span {
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  font-size: 32px;
  color: var(--ink-mute);
}
.avpick-modal-back {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgba(3, 3, 10, 0.85);
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
}
.avpick-modal-back.open {
  display: flex;
}
.avpick-box {
  width: min(560px, 92vw);
  max-height: 80vh;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  display: flex;
  flex-direction: column;
}
.avpick-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  color: var(--ink-mute);
  font-size: 18px;
  cursor: pointer;
}
.avpick-box h3 {
  font-family: "Rajdhani", sans-serif;
  font-size: 20px;
  margin-bottom: 14px;
}
.avpick-box input {
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: "Inter", sans-serif;
  font-size: 13px;
  outline: none;
  margin-bottom: 14px;
}
.avpick-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  overflow-y: auto;
  padding-right: 4px;
}
.avpick-item {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s;
}
.avpick-item:hover {
  border-color: var(--wind);
}
.avpick-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.btn-logout {
  padding: 4px 10px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--ink-mute);
  font-size: 11px;
  cursor: pointer;
  font-family: "JetBrains Mono", monospace;
}
.btn-logout:hover {
  border-color: var(--inferno);
  color: var(--inferno);
}
/* ---- MA COLLECTION ---- */
#pageCollection {
  display: none;
  max-width: none;
  width: 100%;
  margin: 0 auto;
  padding: 28px 32px 60px;
  box-sizing: border-box;
}
#pageCollection.on {
  display: block;
}
.coll-header {
  margin-bottom: 24px;
}
.coll-header h1 {
  font-family: "Rajdhani", sans-serif;
  font-size: 36px;
  font-weight: 700;
  background: linear-gradient(90deg, #fff, #a5b0ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.coll-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.coll-stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 18px;
  font-family: "JetBrains Mono", monospace;
}
.coll-stat-val {
  font-family: "Rajdhani", sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--wind);
}
.coll-stat-lbl {
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 2px;
}
.coll-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  align-items: center;
}
.coll-filter-btn {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink-dim);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: "JetBrains Mono", monospace;
}
.coll-filter-btn:hover {
  background: var(--panel-2);
}
.coll-filter-btn.on {
  background: rgba(34, 229, 107, 0.1);
  border-color: var(--wind);
  color: var(--wind);
}
.coll-search {
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: "Inter", sans-serif;
  font-size: 13px;
  outline: none;
  min-width: 220px;
}
.coll-search:focus {
  border-color: var(--wind);
}
.coll-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.coll-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.coll-table th {
  padding: 14px 18px;
  text-align: left;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-mute);
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.coll-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.coll-table tr:last-child td {
  border-bottom: none;
}
.coll-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}
.ct-name {
  font-family: "Rajdhani", sans-serif;
  font-weight: 600;
  font-size: 19px;
}
.ct-avatar {
  width: 116px;
  height: 116px;
  border-radius: 14px;
  object-fit: cover;
  display: block;
  background: var(--bg-2);
}
.ct-avatar-wrap {
  width: 126px;
  text-align: center;
}
/* Tri colonnes */
.coll-table th.sortable {
  cursor: pointer;
  user-select: none;
}
.coll-table th.sortable:hover {
  color: var(--ink);
}
.coll-table th .sort-arrow {
  margin-left: 4px;
  opacity: 0.4;
  font-size: 10px;
}
.coll-table th.sort-asc .sort-arrow::after {
  content: "▲";
  opacity: 1;
}
.coll-table th.sort-desc .sort-arrow::after {
  content: "▼";
  opacity: 1;
}
/* Vue résonance (tier) */
.res-view {
  display: none;
}
.res-view.on {
  display: block;
}
.res-tier {
  display: flex;
  gap: 14px;
  margin-bottom: 14px;
  align-items: stretch;
}

/* Onglets vue */
.coll-view-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: var(--bg-2);
  border-radius: 8px;
  padding: 4px;
  width: fit-content;
}
.coll-view-tab {
  padding: 7px 18px;
  border: none;
  background: transparent;
  color: var(--ink-mute);
  font-family: "Rajdhani", sans-serif;
  font-weight: 600;
  font-size: 13px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}
.coll-view-tab.on {
  background: var(--panel);
  color: var(--ink);
}
.ct-divine {
  font-size: 11px;
  color: var(--ink-mute);
  font-family: "JetBrains Mono", monospace;
}
.ct-el {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
}
.ct-el img {
  width: 16px;
  height: 16px;
}
.ct-rar {
  padding: 2px 8px;
  border-radius: 5px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  display: inline-block;
  margin: 2px 4px 2px 0;
}
.ct-rar.legendary {
  color: var(--legendary);
  border: 1px solid var(--legendary);
}
.ct-rar.epic {
  color: #a855f7;
  border: 1px solid #a855f7;
}
.ct-rar.rare {
  color: #60a5fa;
  border: 1px solid #60a5fa;
}
.ct-rar.meta {
  background: linear-gradient(90deg, #ffd36b, #ff6bb8, #6bb0ff);
  color: #141414;
  border: none;
}
.owned-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.owned-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--wind);
  cursor: pointer;
}
.lvl-input,
.res-select {
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  outline: none;
  width: 70px;
  transition: border-color 0.15s;
}
.lvl-input:focus,
.res-select:focus {
  border-color: var(--wind);
}
.res-select {
  width: 80px;
}
.not-logged {
  text-align: center;
  padding: 80px 20px;
  color: var(--ink-mute);
  font-family: "JetBrains Mono", monospace;
}
.not-logged button {
  margin-top: 16px;
  padding: 10px 24px;
  border-radius: 8px;
  background: rgba(34, 229, 107, 0.12);
  border: 1px solid var(--wind);
  color: var(--wind);
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}
.progress-bar-wrap {
  background: var(--bg-2);
  border-radius: 999px;
  height: 8px;
  width: 120px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
}
.progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--wind), #a5b0ff);
  transition: width 0.3s;
}
.auth-modal-back {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(3, 3, 10, 0.85);
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
}
.auth-modal-back.open {
  display: flex;
}
/* Tier List */
#pageTierList {
  display: none;
  max-width: none;
  width: 100%;
  margin: 0 auto;
  padding: 28px 32px 60px;
  box-sizing: border-box;
}
#pageTierList.on {
  display: block;
}
.tl-new-btn {
  padding: 12px 22px;
  border-radius: 10px;
  background: rgba(34, 229, 107, 0.12);
  border: 1px solid var(--wind);
  color: var(--wind);
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  margin-bottom: 22px;
}
.tl-saved-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.tl-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  align-items: center;
}
.tl-strip-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all 0.15s;
  font-family: "Rajdhani", sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-dim);
}
.tl-strip-chip:hover {
  border-color: var(--wind);
}
.tl-strip-chip.on {
  background: rgba(34, 229, 107, 0.12);
  border-color: var(--wind);
  color: var(--ink);
}
.tl-strip-chip .tl-kind-badge {
  font-size: 9px;
  padding: 2px 7px;
}
.tl-strip-new {
  padding: 8px 16px;
  border-radius: 999px;
  background: transparent;
  border: 1px dashed var(--line);
  color: var(--ink-mute);
  cursor: pointer;
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.15s;
}
.tl-strip-new:hover {
  border-color: var(--wind);
  color: var(--wind);
}
.tl-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition:
    transform 0.15s,
    border-color 0.15s;
}
.tl-card:hover {
  transform: translateY(-2px);
  border-color: var(--wind);
}
.tl-card-title {
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 8px;
}
.tl-card-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--ink-mute);
}
.tl-kind-badge {
  padding: 3px 10px;
  border-radius: 999px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--line);
}
.tl-kind-badge.pve {
  color: var(--wind);
  border-color: var(--wind);
}
.tl-kind-badge.pvp {
  color: #ff6b8a;
  border-color: #ff6b8a;
}
.tl-create-box,
.tl-edit-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
}
.tl-create-box h3 {
  font-family: "Rajdhani", sans-serif;
  font-size: 22px;
  margin-bottom: 18px;
}
.tl-field {
  margin-bottom: 16px;
}
.tl-field label {
  display: block;
  font-size: 12px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  font-family: "JetBrains Mono", monospace;
}
.tl-field input[type="text"],
.tl-field input[type="number"] {
  width: 100%;
  max-width: 340px;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: "Inter", sans-serif;
  font-size: 14px;
  outline: none;
}
.tl-field input:focus {
  border-color: var(--wind);
}
.tl-kind-choice {
  display: flex;
  gap: 8px;
}
.tl-kind-btn {
  padding: 8px 20px;
  border-radius: 8px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--ink-mute);
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  cursor: pointer;
}
.tl-kind-btn.on {
  background: rgba(34, 229, 107, 0.12);
  border-color: var(--wind);
  color: var(--wind);
}
.tl-create-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.tl-btn-primary {
  padding: 10px 22px;
  border-radius: 8px;
  background: rgba(34, 229, 107, 0.15);
  border: 1px solid var(--wind);
  color: var(--wind);
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  cursor: pointer;
}
.tl-btn-secondary {
  padding: 10px 18px;
  border-radius: 8px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: "Rajdhani", sans-serif;
  font-weight: 600;
  cursor: pointer;
}
.tl-btn-danger {
  padding: 8px 16px;
  border-radius: 8px;
  background: rgba(255, 107, 138, 0.1);
  border: 1px solid #ff6b8a;
  color: #ff6b8a;
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  cursor: pointer;
  margin-left: auto;
}
.tl-edit-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.tl-edit-title-input {
  font-family: "Rajdhani", sans-serif;
  font-size: 22px;
  font-weight: 700;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--ink);
  outline: none;
  flex: 1;
  min-width: 180px;
}
.tl-edit-title-input:focus {
  border-bottom-color: var(--wind);
}
.tl-tier-row {
  display: flex;
  gap: 14px;
  margin-bottom: 12px;
  align-items: flex-start;
}
.tl-remove-line-btn {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--ink-mute);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s;
}
.tl-remove-line-btn:hover {
  border-color: #ff6b8a;
  color: #ff6b8a;
}
.tl-tier-label-input {
  width: 120px;
  flex-shrink: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  font-size: 16px;
  outline: none;
}
.tl-tier-label-input:focus {
  border-color: var(--wind);
}
.tl-tier-drop {
  flex: 1;
  min-height: 84px;
  background: var(--bg-2);
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.tl-tier-drop.drag-over {
  border-color: var(--wind);
  background: rgba(34, 229, 107, 0.06);
}
.drag-ghost {
  position: fixed !important;
  margin: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.9;
  transform: scale(1.06);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  border-radius: 8px;
  overflow: hidden;
}
.drag-source-active {
  opacity: 0.35;
  pointer-events: none;
}
.tl-tier-esper,
.tl-picker-esper,
.tb-slot.filled {
  -webkit-user-drag: none;
  user-select: none;
  touch-action: none;
}
.tl-tier-esper img,
.tl-picker-esper img,
.tb-slot img,
.tb-stat-thumb img {
  -webkit-user-drag: none;
  pointer-events: none;
}
.tl-add-line-btn {
  margin-top: 8px;
  padding: 9px 18px;
  border-radius: 8px;
  background: var(--bg-2);
  border: 1px dashed var(--line);
  color: var(--ink-mute);
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  width: 100%;
}
.tl-add-line-btn:hover {
  border-color: var(--wind);
  color: var(--wind);
}
.tl-tier-esper {
  position: relative;
  width: 78px;
  height: 78px;
  border-radius: 8px;
  overflow: hidden;
  cursor: grab;
  border: 1px solid var(--line);
}
.tl-tier-esper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tl-tier-esper .tl-no-avatar {
  width: 100%;
  height: 100%;
  background: var(--bg-2);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: "Rajdhani", sans-serif;
  font-size: 9px;
  font-weight: 600;
  color: var(--ink-mute);
  line-height: 1.1;
  padding: 2px;
  overflow: hidden;
  word-break: break-word;
}
.tl-tier-esper .tl-remove {
  position: absolute;
  top: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 10px;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 0 0 0 6px;
}
.tl-picker {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.tl-picker input {
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: "Inter", sans-serif;
  font-size: 13px;
  outline: none;
  width: 100%;
  max-width: 320px;
  margin-bottom: 12px;
}
.tl-picker-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}
#resPickerGrid.drag-over {
  outline: 2px solid var(--inferno);
  outline-offset: 2px;
  border-radius: 8px;
}
.tl-picker-esper {
  width: 78px;
  height: 78px;
  border-radius: 10px;
  overflow: hidden;
  cursor: grab;
  border: 1px solid var(--line);
  transition: border-color 0.15s;
}
.tl-picker-esper:hover {
  border-color: var(--wind);
}
.tl-picker-esper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tl-picker-esper .tl-no-avatar {
  width: 100%;
  height: 100%;
  background: var(--bg-2);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: "Rajdhani", sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-mute);
  line-height: 1.15;
  padding: 3px;
  overflow: hidden;
  word-break: break-word;
}
.tl-edit-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.tl-tiers-col {
  flex: 1;
  min-width: 0;
}
.tl-kind-toggle-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}
.tl-picker-col {
  width: 340px;
  flex-shrink: 0;
}
.tl-picker-sticky {
  position: sticky;
  top: 20px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}
.tl-picker-title {
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 10px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.tl-picker-sticky input {
  width: 100%;
  max-width: none;
  margin-bottom: 10px;
}
.tl-picker-sticky .tl-picker-grid {
  max-height: calc(100vh - 220px);
  gap: 8px;
}
.tl-picker-rar-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.tl-picker-rar-btn {
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink-dim);
  font-size: 11px;
  cursor: pointer;
  font-family: "JetBrains Mono", monospace;
  transition: all 0.15s;
}
.tl-picker-rar-btn:hover {
  background: var(--panel-2);
}
.tl-picker-rar-btn.on {
  background: rgba(34, 229, 107, 0.1);
  border-color: var(--wind);
  color: var(--wind);
}
@media (max-width: 900px) {
  .tl-edit-layout {
    flex-direction: column;
  }
  .tl-picker-col {
    width: 100%;
  }
  .tl-picker-sticky {
    position: static;
  }
}
/* Team Builder */
#pageTeamBuilder {
  display: none;
  max-width: none;
  width: 100%;
  margin: 0 auto;
  padding: 28px 32px 60px;
  box-sizing: border-box;
}
#pageTeamBuilder.on {
  display: block;
}
.tb-wave {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 18px;
}
.tb-wave-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.tb-wave-label {
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  font-size: 18px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--ink);
  outline: none;
  flex: 1;
}
.tb-wave-label:focus {
  border-bottom-color: var(--wind);
}
.tb-wave-power {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--ink-mute);
}
.tb-slots {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.tb-slot {
  width: 96px;
  height: 96px;
  border-radius: 10px;
  border: 1px dashed var(--line);
  background: var(--panel);
  position: relative;
  transition:
    border-color 0.15s,
    background 0.15s;
  overflow: hidden;
}
.tb-slot.drag-over {
  border-color: var(--wind);
  background: rgba(34, 229, 107, 0.06);
}
.tb-slot.filled {
  border-style: solid;
  cursor: grab;
}
.tb-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tb-slot .tl-no-avatar {
  width: 100%;
  height: 100%;
}
.tb-slot-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-mute);
  font-size: 22px;
}
.tb-slot .tl-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 11px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 5px;
}
.tb-slot-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 9px;
  text-align: center;
  padding: 2px 3px;
  font-family: "Rajdhani", sans-serif;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tb-stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.tb-stats-table th {
  text-align: left;
  padding: 4px 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  border-bottom: 1px solid var(--line);
}
.tb-stats-table td {
  padding: 5px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.tb-stat-name {
  font-family: "Rajdhani", sans-serif;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.tb-stat-thumb {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}
.tb-stat-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tb-stat-thumb .tl-no-avatar {
  width: 100%;
  height: 100%;
  font-size: 6px;
}
.tb-bar-wrap {
  background: var(--bg-2);
  border-radius: 999px;
  height: 8px;
  width: 100%;
  min-width: 70px;
  overflow: hidden;
}
.tb-bar {
  height: 100%;
  border-radius: 999px;
}
.tb-bar.hp {
  background: linear-gradient(90deg, #22e56b, #7be38a);
}
.tb-bar.atk {
  background: linear-gradient(90deg, #ff6b6b, #ff9b6b);
}
.tb-bar.def {
  background: linear-gradient(90deg, #60a5fa, #8bc4ff);
}
.tb-bar.spd {
  background: linear-gradient(90deg, #ffd36b, #ffe89b);
}
.tb-bar-val {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--ink-mute);
  white-space: nowrap;
  padding-left: 6px;
}
.tl-save-status {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--ink-mute);
  margin-left: 8px;
}
.auth-box {
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  padding: 36px 40px;
  width: 100%;
  max-width: 420px;
  position: relative;
}
.auth-box h3 {
  font-family: "Rajdhani", sans-serif;
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 6px;
  background: linear-gradient(90deg, #fff, #a5b0ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auth-box p {
  color: var(--ink-mute);
  font-size: 13px;
  margin: 0 0 24px;
  font-family: "JetBrains Mono", monospace;
}
.auth-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: var(--bg-2);
  border-radius: 8px;
  padding: 4px;
}
.auth-tab {
  flex: 1;
  padding: 8px;
  border: none;
  background: transparent;
  color: var(--ink-mute);
  font-family: "Rajdhani", sans-serif;
  font-weight: 600;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}
.auth-tab.on {
  background: var(--panel-2);
  color: var(--ink);
}
.auth-field {
  margin-bottom: 14px;
}
.auth-field label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-family: "JetBrains Mono", monospace;
  margin-bottom: 6px;
}
.auth-field input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: "Inter", sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}
.auth-field input:focus {
  border-color: var(--wind);
}
.auth-submit {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  background: linear-gradient(
    90deg,
    rgba(34, 229, 107, 0.2),
    rgba(34, 229, 107, 0.1)
  );
  border: 1px solid var(--wind);
  color: var(--wind);
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.06em;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.15s;
}
.auth-submit:hover {
  background: rgba(34, 229, 107, 0.3);
}
.auth-msg {
  font-size: 12.5px;
  font-family: "JetBrains Mono", monospace;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  display: none;
}
.auth-msg.err {
  background: rgba(255, 90, 77, 0.1);
  border: 1px solid var(--inferno);
  color: var(--inferno);
  display: block;
}
.auth-msg.ok {
  background: rgba(34, 229, 107, 0.1);
  border: 1px solid var(--wind);
  color: var(--wind);
  display: block;
}
.auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--line-2);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.auth-close:hover {
  background: var(--inferno);
  border-color: var(--inferno);
}
#authPseudoField {
  display: none;
}
#userEmail {
  cursor: pointer;
}
.pseudo-modal-back {
  position: fixed;
  inset: 0;
  z-index: 260;
  background: rgba(3, 3, 10, 0.85);
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
}
.pseudo-modal-back.open {
  display: flex;
}
.pseudo-box {
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  padding: 32px 36px;
  width: 100%;
  max-width: 380px;
  position: relative;
}
.pseudo-box h3 {
  font-family: "Rajdhani", sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px;
  background: linear-gradient(90deg, #fff, #a5b0ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.pseudo-box p {
  color: var(--ink-mute);
  font-size: 13px;
  margin: 0 0 18px;
  font-family: "JetBrains Mono", monospace;
}
.pseudo-box input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: "Inter", sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}
.pseudo-box input:focus {
  border-color: var(--wind);
}
.pseudo-msg {
  font-size: 12.5px;
  font-family: "JetBrains Mono", monospace;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  display: none;
}
.pseudo-msg.err {
  background: rgba(255, 90, 77, 0.1);
  border: 1px solid var(--inferno);
  color: var(--inferno);
  display: block;
}
.pseudo-msg.ok {
  background: rgba(34, 229, 107, 0.1);
  border: 1px solid var(--wind);
  color: var(--wind);
  display: block;
}
.pseudo-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.pseudo-skip {
  flex: 1;
  padding: 11px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-mute);
  font-family: "Rajdhani", sans-serif;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.pseudo-skip:hover {
  border-color: var(--ink-mute);
}
.pseudo-save {
  flex: 1;
  padding: 11px;
  border-radius: 8px;
  background: linear-gradient(
    90deg,
    rgba(34, 229, 107, 0.2),
    rgba(34, 229, 107, 0.1)
  );
  border: 1px solid var(--wind);
  color: var(--wind);
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  cursor: pointer;
}
.pseudo-save:hover {
  background: rgba(34, 229, 107, 0.3);
}
.card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10px;
  gap: 5px;
  z-index: 3;
  pointer-events: none;
}
.card-overlay.active {
  pointer-events: auto;
}
.owned-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line-2);
  color: var(--ink-mute);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
  width: fit-content;
}
.owned-btn.owned {
  background: rgba(34, 229, 107, 0.15);
  border-color: var(--wind);
  color: var(--wind);
}
.owned-btn .dot-own {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-2);
  flex-shrink: 0;
  transition: background 0.15s;
}
.owned-btn.owned .dot-own {
  background: var(--wind);
}
.res-row {
  display: flex;
  gap: 4px;
  align-items: center;
}
.res-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--line-2);
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s;
  flex-shrink: 0;
}
.res-dot.lit {
  background: #ffb84d;
  border-color: #ffb84d;
  box-shadow: 0 0 6px rgba(255, 184, 77, 0.6);
}
.res-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--ink-mute);
  margin-left: 2px;
}
