@font-face {
      font-family: "BF Headline Narrow";
      src: url("fonts/BF_HEADLINE_NARROW-BOLD.ttf") format("truetype");
      font-weight: 700;
      font-style: normal;
      font-display: swap;
}

/* --- Strip view (main2.html) additions --- */
.strip-page {
  width: min(1300px, 100%);
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  isolation: isolate;
}

.strip-page::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 18%, rgba(0, 229, 255, 0.07), transparent 28%),
    radial-gradient(circle at 82% 12%, rgba(0, 229, 255, 0.06), transparent 32%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 22px);
  opacity: 0.45;
  z-index: -1;
}

.strip-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 4px;
}

.strip-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
}

.strip-title-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 420px;
  min-width: 260px;
}

.strip-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
}

.strip-search-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  position: relative;
}

.strip-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.strip-search {
  flex: 1 1 340px;
  min-height: 40px;
  min-width: 320px;
  max-width: 380px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(80, 120, 140, 0.35);
  background: rgba(10, 16, 21, 0.82);
  color: var(--text);
  font-size: 16px;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  line-height: normal;
  box-sizing: border-box;
}

.strip-search::placeholder {
  color: var(--text-muted);
}

.strip-search:focus {
  outline: none;
  border-color: rgba(0, 229, 255, 0.8);
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.2);
  background: rgba(12, 18, 24, 0.95);
}

.strip-search-help-btn {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(80, 120, 140, 0.45);
  background: rgba(12, 18, 24, 0.92);
  color: #dfe6ed;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
}

.strip-search-help-btn:hover,
.strip-search-help-btn:focus-visible {
  border-color: rgba(0, 229, 255, 0.75);
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.2);
  color: #fff;
  outline: none;
}

.strip-search-help-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: max-content;
  min-width: 320px;
  max-width: min(90vw, 640px);
  border: 1px solid rgba(80, 120, 140, 0.35);
  background: rgba(10, 16, 21, 0.98);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.55), 0 6px 18px rgba(0, 229, 255, 0.12), 0 0 0 1px rgba(0, 229, 255, 0.08);
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  z-index: 1200;
}

.help-button {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 2000;
  border: 1px solid rgba(80, 120, 140, 0.45);
  background: linear-gradient(145deg, rgba(0, 229, 255, 0.14), rgba(8, 14, 20, 0.95));
  color: #e5f1fb;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 229, 255, 0.12);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.help-button:hover,
.help-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(0, 229, 255, 0.8);
  box-shadow: 0 12px 28px rgba(0, 229, 255, 0.18), 0 0 0 1px rgba(0, 229, 255, 0.3);
  outline: none;
}

.help-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(0, 229, 255, 0.08), transparent 35%), rgba(4, 8, 12, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 3000;
}

.help-overlay[hidden] {
  display: none;
}

.help-panel {
  width: min(960px, 90vw);
  max-height: 90vh;
  overflow: auto;
  background: rgba(10, 16, 21, 0.98);
  border: 1px solid rgba(80, 120, 140, 0.45);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 229, 255, 0.12);
  border-radius: 16px;
  padding: 18px 20px;
}

.help-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.help-panel-header h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #e5f1fb;
}

.help-close {
  border: 1px solid rgba(80, 120, 140, 0.5);
  background: rgba(12, 18, 24, 0.9);
  color: #e5f1fb;
  border-radius: 10px;
  width: 34px;
  height: 34px;
  font-size: 18px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.help-close:hover,
.help-close:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(0, 229, 255, 0.8);
  outline: none;
}

.help-panel-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: rgba(210, 224, 234, 0.92);
  font-size: 14px;
  line-height: 1.6;
}

.help-lead {
  margin: 0;
  color: rgba(235, 243, 252, 0.95);
}

.help-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: rgba(190, 205, 218, 0.95);
}

.help-list li {
  list-style: disc;
}

.help-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.help-section + .help-section {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(60, 80, 96, 0.35);
}

.help-section-title {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12px;
  color: #e5f1fb;
}

.help-label {
  color: rgba(210, 224, 234, 0.92);
  font-weight: 700;
}

.help-subtext {
  color: rgba(170, 188, 202, 0.9);
  font-size: 13px;
  margin-top: 3px;
}

.help-rank-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  margin-right: 4px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.1em;
  font-weight: 800;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.35);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.help-rank-chip.rank-meta {
  background: linear-gradient(140deg, #ffdba0 0%, #ff9a3c 50%, #ff3c1d 100%);
  box-shadow: 0 0 10px rgba(255, 70, 26, 0.45);
}

.help-rank-chip.rank-a { background: linear-gradient(140deg, #f7e6ff 0%, #c47dff 45%, #7a2eff 100%); }
.help-rank-chip.rank-b { background: linear-gradient(140deg, #d8ecff 0%, #6bb7ff 55%, #1c75c7 100%); }
.help-rank-chip.rank-c { background: linear-gradient(140deg, #d8f7e2 0%, #6dd88f 55%, #1d8f3e 100%); }
.help-rank-chip.rank-d { background: linear-gradient(140deg, #f4f4f6 0%, #c8ccd2 55%, #868d96 100%); }
.help-rank-chip.rank-f { background: linear-gradient(140deg, #cfd2d6 0%, #8a8f98 55%, #3e444c 100%); }

.help-fav-star {
  color: var(--accent);
  font-weight: 800;
  margin-right: 4px;
}

.help-range-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  margin-right: 4px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.1em;
  font-weight: 800;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.35);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.help-range-chip.range-1 { background: linear-gradient(135deg, #ffe57a 0%, #f7c148 45%, #7c4200 100%); }
.help-range-chip.range-2 { background: linear-gradient(135deg, #f0f4f8 0%, #bfc7cc 55%, #3b4750 100%); }
.help-range-chip.range-3 { background: linear-gradient(135deg, #f3b26e 0%, #cd7f32 60%, #3a1a08 100%); }
.help-range-chip.range-4 { background: linear-gradient(135deg, #7c96ab 0%, #4a6273 65%, #101820 100%); }

.help-links {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.github-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(80, 120, 140, 0.5);
  background: rgba(12, 18, 24, 0.92);
  color: #e5f1fb;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: border-color var(--transition), background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.github-link:hover,
.github-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(0, 229, 255, 0.8);
  box-shadow: 0 10px 24px rgba(0, 229, 255, 0.14);
  outline: none;
}

.github-icon {
  width: 18px;
  height: 18px;
}

.help-link-note {
  color: rgba(190, 205, 218, 0.95);
  font-size: 13px;
}

.strip-search-help-panel ul {
  margin: 6px 0 0;
  padding-left: 16px;
  color: var(--text-muted);
}

.search-tip-label {
  color: rgba(210, 224, 234, 0.92);
  font-weight: 700;
}

.strip-search-help-panel li + li {
  margin-top: 4px;
}

.strip-search-help-title {
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e6f0f7;
}
.search-input-shell {
  position: relative;
  flex: 1 1 340px;
  min-width: 0;
  display: flex;
  align-items: center;
}
.search-input-shell .strip-search {
  width: 100%;
  padding-right: 56px;
}
.strip-search::-webkit-search-cancel-button {
  appearance: none;
  display: none;
}
.strip-search::-ms-clear {
  display: none;
}
.strip-search {
  -webkit-appearance: none;
  appearance: none;
}
.strip-search-clear {
  position: absolute;
  right: 34px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(80, 120, 140, 0.5);
  background: rgba(12, 18, 24, 0.9);
  color: #e5f1fb;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: border-color var(--transition), background var(--transition), color var(--transition), box-shadow var(--transition);
}
.strip-search-clear:not([hidden]):hover,
.strip-search-clear:not([hidden]):focus-visible {
  border-color: rgba(0, 229, 255, 0.7);
  color: #fff;
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.12);
  outline: none;
}
.search-shortcut-hint {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(180, 200, 214, 0.65);
  border: 1px solid rgba(80, 120, 140, 0.45);
  background: rgba(8, 12, 16, 0.9);
  padding: 3px 6px;
  border-radius: 8px;
  pointer-events: none;
}
.strip-search-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.search-tokens {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-height: 30px;
}
.search-token-placeholder {
  color: var(--text-muted);
  font-size: 12px;
}
.search-chip {
  border-radius: 999px;
  border: 1px solid rgba(80, 120, 140, 0.5);
  background: rgba(12, 18, 24, 0.9);
  color: #e5f1fb;
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.search-chip:hover,
.search-chip:focus-visible {
  border-color: rgba(0, 229, 255, 0.6);
  background: rgba(0, 229, 255, 0.08);
  box-shadow: 0 8px 18px rgba(0, 229, 255, 0.12);
  outline: none;
  transform: translateY(-1px);
}
.search-chip .chip-close {
  font-weight: 800;
  font-size: 14px;
  line-height: 1;
}
.search-chip-tier { color: #ffb347; }
.search-chip-type-rank { color: #ffd166; }
.search-chip-level { color: var(--accent); }
.search-chip-wildcard { color: #6bb7ff; }
.search-meta-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.search-count {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .strip-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .strip-search-row {
    width: 100%;
  }

  .strip-search {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
  }
  .search-input-shell {
    flex: 1 1 auto;
  }

  .strip-header-top {
    align-items: stretch;
    flex-wrap: wrap;
  }
}

@media (max-width: 960px) {
  .strip-header-top {
    flex-wrap: wrap;
  }
}

.strip-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.weapon-strip {
  display: flex;
  flex-direction: column;
  background: rgba(10, 16, 21, 0.62);
  border: 1px solid rgba(80, 120, 140, 0.18);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
  position: relative;
  isolation: isolate;
}

.weapon-strip:hover,
.weapon-strip:focus-within {
  border-color: rgba(0, 229, 255, 0.32);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 229, 255, 0.14);
  transform: translateY(-1px);
}

.strip-top {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 48px;
  align-items: stretch;
  width: 100%;
}

.weapon-strip::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.55), transparent);
  pointer-events: none;
}

.weapon-strip.is-favorite {
  border-color: rgba(0, 229, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.22), 0 16px 36px rgba(0, 229, 255, 0.14);
}

.rank-endcap {
  border-right: 1px solid rgba(80, 120, 140, 0.24);
  display: flex;
  flex-direction: column;
  align-self: stretch;
  width: 44px;
}

.fav-endcap {
  border-left: 1px solid rgba(80, 120, 140, 0.24);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0b1117;
  width: 48px;
  position: relative;
  overflow: hidden;
}

.rank-top {
  --rank-shimmer-speed: 4.4s;
  --range-shimmer-opacity: 0.45;
  box-sizing: border-box;
  flex: 1 1 auto;
  padding: 8px 6px 8px 4px;
  align-items: center;
  justify-content: center;
  height: 100%;
  white-space: nowrap;
  line-height: 1.1;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0.1em;
  font-weight: 800;
  font-size: 13px;
  color: #fff;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.75);
  border-bottom: 1px solid rgba(80, 120, 140, 0.28);
  background: rgba(14, 20, 26, 0.92);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.rank-top .rank-text {
  display: inline-block;
  transform: translateX(-4px);
}

.rank-top::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 15%, rgba(255, 255, 255, 0.4) 45%, transparent 70%);
  opacity: 0.25;
  transform: translateX(-130%) rotate(10deg);
  animation: chipShimmer var(--rank-shimmer-speed, 5s) ease-in-out infinite;
  pointer-events: none;
}

.rank-top::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.55;
  filter: blur(8px);
  background: radial-gradient(circle at 40% 30%, rgba(255, 255, 255, 0.2), transparent 60%);
}

:root.reduce-animations .rank-top::after,
:root.reduce-animations .rank-top::before {
  animation: none !important;
  opacity: 0 !important;
}

:root.reduce-animations .side-nav,
:root.reduce-animations .side-nav-item,
:root.reduce-animations .side-nav-list {
  transition: none !important;
}

:root.reduce-animations .rank-top {
  animation: none !important;
  box-shadow: none !important;
}

.rank-endcap.tier-s .rank-top,
.rank-endcap.tier-meta .rank-top {
  /* META / legendary: loud orange-red */
  background: linear-gradient(140deg, #ffdba0 0%, #ff9a3c 50%, #ff3c1d 100%);
  --range-shimmer-opacity: 0.85;
  --rank-shimmer-speed: 3.6s;
  box-shadow:
    0 0 22px rgba(255, 138, 49, 0.95),
    0 0 54px rgba(255, 70, 26, 0.75),
    inset 0 2px 10px rgba(255, 255, 255, 0.42);
  animation: tierMetaPulse 1.1s ease-in-out infinite alternate;
}

.rank-endcap.tier-a .rank-top {
  /* Epic: purple, less glow than META */
  background: linear-gradient(140deg, #f7e6ff 0%, #c47dff 45%, #7a2eff 100%);
  --range-shimmer-opacity: 0.65;
  --rank-shimmer-speed: 4.6s;
  box-shadow:
    0 0 18px rgba(148, 96, 255, 0.55),
    0 0 30px rgba(122, 46, 255, 0.38);
}

.rank-endcap.tier-b .rank-top {
  /* Rare: blue */
  background: linear-gradient(140deg, #d8ecff 0%, #6bb7ff 55%, #1c75c7 100%);
  --range-shimmer-opacity: 0.5;
  --rank-shimmer-speed: 5.2s;
  box-shadow:
    0 0 14px rgba(72, 183, 255, 0.45),
    0 0 24px rgba(28, 117, 199, 0.3);
}

.rank-endcap.tier-c .rank-top {
  /* Uncommon: green */
  background: linear-gradient(140deg, #d8f7e2 0%, #6dd88f 55%, #1d8f3e 100%);
  --range-shimmer-opacity: 0.4;
  --rank-shimmer-speed: 5.6s;
  box-shadow:
    0 0 12px rgba(109, 216, 143, 0.42),
    0 0 20px rgba(29, 143, 62, 0.22);
}

.rank-endcap.tier-d .rank-top {
  /* Common: soft white/grey */
  background: linear-gradient(140deg, #f4f4f6 0%, #c8ccd2 55%, #868d96 100%);
  --range-shimmer-opacity: 0.2;
  --rank-shimmer-speed: 6.2s;
  box-shadow:
    0 0 10px rgba(134, 141, 150, 0.35),
    0 0 16px rgba(70, 78, 88, 0.2);
}

.rank-endcap.tier-f .rank-top {
  /* Junk: dull grey */
  background: linear-gradient(140deg, #cfd2d6 0%, #8a8f98 55%, #3e444c 100%);
  --range-shimmer-opacity: 0.1;
  --rank-shimmer-speed: 7s;
  box-shadow:
    0 0 6px rgba(40, 44, 50, 0.45),
    0 0 14px rgba(18, 20, 24, 0.25);
}

.strip-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  border-bottom: 1px solid rgba(80, 120, 140, 0.2);
  background: linear-gradient(180deg, rgba(12, 18, 24, 0.75), rgba(8, 12, 16, 0.85));
}

.strip-summary:hover {
  background: rgba(14, 20, 26, 0.7);
  border-bottom-color: rgba(0, 229, 255, 0.2);
}

:root.reduce-animations .strip-summary,
:root.reduce-animations .weapon-strip,
:root.reduce-animations .strip-detail,
:root.reduce-animations .favorite-btn,
:root.reduce-animations .tab,
:root.reduce-animations .attachment-chip,
:root.reduce-animations .ui-scale-slider,
:root.reduce-animations .mastery-slider {
  transition: none !important;
}
:root.reduce-animations .options-gear,
:root.reduce-animations .options-floating-gear {
  transition: none !important;
  transform: none !important;
}

.summary-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.summary-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.summary-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.summary-name {
  font-family: var(--font-headline);
  font-size: clamp(18px, 3vw, 24px);
  letter-spacing: 0.02em;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
}

.summary-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 13px;
}

.summary-level {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.summary-level-block {
  display: flex;
  align-items: center;
  gap: 10px;
}

.summary-level-block .summary-level-stepper {
  display: inline-flex;
  align-items: center;
  flex-direction: row;
  gap: 8px;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.summary-level-block .summary-level-stepper .summary-level-down {
  order: 0;
}

.summary-level-block .summary-level-stepper .summary-level-up {
  order: 1;
}

.summary-level-label {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
  color: #e5f1fb;
  cursor: pointer;
}

.summary-level-prefix {
  color: var(--text-muted);
}
.mastery-level-label {
  cursor: pointer;
}

.summary-level-stepper .level-button {
  width: 30px;
  min-width: 30px;
  aspect-ratio: 1;
  font-size: 14px;
  padding: 0;
}

.summary-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.summary-level-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(70, 90, 108, 0.6);
  background: rgba(12, 18, 24, 0.8);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.summary-thumb {
  position: relative;
  min-width: 120px;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(70, 90, 108, 0.6);
  background: rgba(12, 18, 24, 0.8);
}

.summary-thumb img {
  max-height: 40px;
  width: auto;
  display: block;
}

.summary-thumb.placeholder img {
  display: none;
}

.summary-thumb-ph {
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.summary-thumb .summary-thumb-ph {
  display: none;
}

.summary-thumb.placeholder .summary-thumb-ph {
  display: inline;
}


.favorite-btn {
  width: 100%;
  height: 100%;
  border-radius: 0;
  border: none;
  background: transparent;
  color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  cursor: pointer;
}

.favorite-btn .fav-icon {
  font-size: 18px;
  line-height: 1;
  opacity: 1;
  color: #fff;
  text-shadow: 0 0 6px rgba(0, 229, 255, 0.25);
}

.favorite-btn[aria-pressed="true"] {
  color: #fff;
  background: transparent;
}

.strip-drop-placeholder {
  border: 1px dashed rgba(0, 229, 255, 0.4);
  background: rgba(0, 229, 255, 0.08);
  border-radius: 14px;
  margin: 0 2px;
}

.weapon-strip.dragging {
  opacity: 0.82;
  transform: translateY(-2px);
}

.strip-list.drag-active .weapon-strip:hover:not(.dragging) {
  border-color: rgba(80, 120, 140, 0.32);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
}

.favorite-btn[aria-pressed="true"] .fav-icon {
  opacity: 1;
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.7), 0 0 16px rgba(0, 229, 255, 0.42);
}

.fav-endcap .favorite-btn[aria-pressed="false"] {
  border-color: transparent;
  background: #0b1117;
  color: #dfe7ef;
  box-shadow: none;
}
.fav-endcap .favorite-btn[aria-pressed="false"] .fav-icon {
  text-shadow: 0 0 2px rgba(0, 229, 255, 0.14);
}

.weapon-strip.is-favorite .fav-endcap {
  background: linear-gradient(140deg, #00c8ff 0%, #0091ff 100%);
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.58), 0 0 26px rgba(0, 229, 255, 0.42);
}

.weapon-strip.is-favorite .fav-endcap .fav-icon {
  text-shadow: 0 0 12px rgba(0, 229, 255, 0.78), 0 0 20px rgba(0, 229, 255, 0.5);
}

.weapon-strip.is-favorite .fav-endcap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.4) 50%, transparent 75%);
  opacity: 0.25;
  transform: translateX(-130%) rotate(10deg);
  animation: chipShimmer 4.4s ease-in-out infinite;
  pointer-events: none;
}

:root.reduce-animations .weapon-strip.is-favorite .fav-endcap::after {
  animation: none !important;
  opacity: 0 !important;
}

.tr-pill {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 229, 255, 0.45);
  background: rgba(0, 229, 255, 0.12);
  color: #dffaff;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
}

.strip-main {
  display: flex;
  flex-direction: column;
}

.strip-detail {
  padding: 14px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: linear-gradient(180deg, rgba(12, 18, 24, 0.72), rgba(8, 12, 16, 0.9));
  border-top: 1px solid rgba(80, 120, 140, 0.2);
}

.strip-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(80, 120, 140, 0.3);
}

.strip-tabs .tab {
  border: 1px solid rgba(70, 90, 108, 0.6);
  background: rgba(16, 24, 30, 0.92);
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: 9px 9px 0 0;
  cursor: pointer;
  transition: all var(--transition);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.strip-tabs .tab.is-active {
  color: var(--text);
  border-color: rgba(0, 229, 255, 0.55);
  background: linear-gradient(180deg, rgba(0, 229, 255, 0.12), rgba(12, 18, 24, 0.9));
  box-shadow: 0 -4px 18px rgba(0, 229, 255, 0.12);
}

.tab-panels {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.tab-panel[data-panel="mastery"] {
  display: none;
}

.tab-panel[data-panel="mastery"].is-active {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.builds-grid,
.attachments-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.builds-tabs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.builds-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.build-card,
.attachment-card,
.note-card {
  background: rgba(14, 20, 26, 0.92);
  border: 1px solid rgba(60, 90, 110, 0.7);
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.attachments-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.attachments-title .build-label {
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 11px;
}

.build-card h4,
.attachment-card h4,
.note-card h4 {
  margin: 0;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #dfe6ed;
  font-size: 12px;
}

.attachment-type-card {
  background: rgba(14, 20, 26, 0.9);
  border: 1px solid rgba(60, 90, 110, 0.65);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.attachment-type-title {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #dfe6ed;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(70, 100, 120, 0.35);
}

.attachment-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.attachment-item {
  border: 1px solid rgba(45, 70, 90, 0.6);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(10, 16, 22, 0.92);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.attachment-item .item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.attachment-item.attachment-unlocked {
  border-color: rgba(0, 229, 255, 0.7);
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.3), 0 4px 14px rgba(0, 229, 255, 0.16);
  background: linear-gradient(180deg, rgba(10, 18, 25, 0.94), rgba(10, 18, 25, 0.86));
}

.attachment-item.attachment-unlocked .item-name {
  color: var(--accent);
}

.attachment-item.attachment-locked {
  opacity: 0.78;
  border-color: rgba(60, 80, 90, 0.45);
  background: rgba(8, 12, 16, 0.9);
}

.attachment-item.attachment-locked .item-name {
  color: rgba(150, 164, 178, 0.9);
}

.attachment-item .item-name {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e5f1fb;
}

.attachment-item .item-ap {
  font-family: var(--font-mono);
}

.attachment-item .item-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

.attachment-item .item-lock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 6px;
  border-radius: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.attachment-item .item-lock.unlocked {
  background: rgba(0, 229, 255, 0.12);
  color: var(--accent);
  border: 1px solid rgba(0, 229, 255, 0.4);
}

.attachment-item .item-lock.locked {
  background: rgba(80, 90, 100, 0.14);
  color: rgba(200, 210, 220, 0.8);
  border: 1px solid rgba(80, 90, 100, 0.35);
}

.attachment-item .item-unlock {
  letter-spacing: 0.05em;
}

.attachments-grid .ap-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.attachments-grid .ap-icon img {
  width: 14px;
  height: 14px;
  transform: translateY(-1px);
}

.build-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chipline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(70, 90, 108, 0.6);
  background: rgba(22, 30, 37, 0.9);
  letter-spacing: 0.04em;
  font-weight: 600;
}

.attachment-chip .ap {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 11px;
}

.note-text {
  color: rgba(210, 224, 234, 0.92);
  font-size: 13px;
  line-height: 1.5;
}

.note-callout {
  color: var(--accent);
  font-weight: 700;
}

.mastery-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  background: linear-gradient(180deg, rgba(8, 12, 16, 0.95), rgba(6, 10, 14, 0.92));
  border: 1px solid rgba(0, 229, 255, 0.28);
  border-radius: 12px;
  padding: 12px;
}

.mastery-top {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: stretch;
  padding: 12px;
  border: 1px solid rgba(0, 229, 255, 0.28);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(8, 12, 16, 0.95), rgba(6, 10, 14, 0.92));
}

.mastery-top .mastery-bar {
  flex: 1 1 320px;
}

.mastery-ap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 229, 255, 0.18);
  border-radius: 12px;
  background: rgba(6, 10, 14, 0.9);
}

.mastery-ap .ap-readout {
  font-size: 12px;
  letter-spacing: 0.1em;
}

.mastery-ap-meter .ap-meter {
  gap: 4px;
}

.mastery-ap-meter .ap-cell {
  width: 14px;
  height: 14px;
}

.mastery-bar .summary-level {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #dfe6ed;
}

.mastery-progress {
  display: none;
}

.mastery-progress .fill {
  display: none;
}

.mastery-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.mastery-block {
  background: rgba(8, 12, 16, 0.92);
  border: 1px solid rgba(0, 229, 255, 0.22);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mastery-block .block-title {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-size: 12px;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.timeline-row {
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(10, 14, 18, 0.9);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.timeline-row .level-tag {
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  color: var(--accent);
}

.change-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.type-group {
  border-top: 1px solid rgba(70, 90, 108, 0.4);
  padding-top: 8px;
  margin-top: 6px;
}

@media (max-width: 720px) {
  .weapon-strip {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .summary-thumb {
    min-width: 90px;
  }
}

    @font-face {
      font-family: "BF Sub Headline";
      src: url("fonts/BF_SUB_HEADLINE_BOLD.ttf") format("truetype");
      font-weight: 700;
      font-style: normal;
      font-display: swap;
    }

    @font-face {
      font-family: "BF Text";
      src: url("fonts/BF_TEXT_REGULAR.ttf") format("truetype");
      font-weight: 400;
      font-style: normal;
      font-display: swap;
    }

    @font-face {
      font-family: "BF Mono";
      src: url("fonts/BF_MONO_BOOK.ttf") format("truetype");
      font-weight: 400;
      font-style: normal;
      font-display: swap;
    }

    :root {
      color-scheme: dark;
      --bg: #05090d;
      --panel: #0f161c;
      --panel-border: #1c252f;
      --accent: #00e5ff; /* BF6-style cyan */
      --accent-soft: rgba(0, 229, 255, 0.16);
      --ally: #00d1ff; /* Ally blue (refined) */
      --ally-soft: rgba(0, 209, 255, 0.18);
      --enemy: #ff3b3b; /* Enemy red (refined) */
      --enemy-soft: rgba(255, 59, 59, 0.2);
      --text: #f5f8fa;
      --text-muted: #95a3b1;
      --danger: #ff6b6b;
      --card-padding: 12px;
      --indent: 36px;
      --card-radius: 7px;
      --transition: 160ms ease;
      --shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
      --font-headline: "BF Headline Narrow", "Futura ND", "Futura", "Helvetica Neue", Arial, sans-serif;
      --font-subhead: "BF Sub Headline", "Futura ND", "Futura", "Helvetica Neue", Arial, sans-serif;
      --font-body: "BF Text", "Futura ND", "Futura", "Helvetica Neue", Arial, sans-serif;
      --font-mono: "BF Mono", "Consolas", "SFMono-Regular", "Roboto Mono", Menlo, monospace;
      --font: var(--font-body);
      --ui-scale: 1; /* 1.0 = 100% */
      --level-slider-fill: 0%;
      --tier-chip-font-size: 12px;
      --tier-chip-padding-y: 4px;
      --tier-chip-padding-x: 8px;
      --tier-chip-radius: 999px;
      --tier-chip-stroke: 0.55px;
      --tier-chip-stroke-meta: 1.25px;
      --tier-chip-transition: 200ms ease;
    }

    * {
      box-sizing: border-box;
    }

    @keyframes metaInnerPulse {
      0%,
      100% {
        opacity: 0.7;
        transform: scale(0.96);
      }
      50% {
        opacity: 1;
        transform: scale(1.05);
      }
    }

    @keyframes metaRingPulse {
      0%,
      100% {
        opacity: 0.55;
        transform: scale(0.98);
      }
      50% {
        opacity: 1;
        transform: scale(1.05);
      }
    }

    @keyframes metaFlare {
      0% {
        opacity: 0.75;
        transform: translateY(5px) scaleY(0.88);
      }
      50% {
        opacity: 1;
        transform: translateY(-4px) scaleY(1.08);
      }
      100% {
        opacity: 0.75;
        transform: translateY(5px) scaleY(0.88);
      }
    }

    @keyframes metaEmbers {
      0% {
        background-position: 0% 0%, 60% 20%, 0% 0%, 0% 0%;
      }
      50% {
        background-position: 20% 40%, 80% 50%, 20% 10%, 0% 0%;
      }
      100% {
        background-position: 0% 0%, 60% 20%, 40% 20%, 0% 0%;
      }
    }

    /* Tier chip animation helpers */
    @keyframes tierMetaPulse {
      0% {
        box-shadow:
          0 0 12px rgba(255, 175, 64, 0.65),
          0 0 28px rgba(255, 140, 0, 0.35),
          inset 0 0 4px rgba(255, 255, 255, 0.35);
        filter: brightness(1);
      }
      100% {
        box-shadow:
          0 0 18px rgba(255, 196, 110, 0.9),
          0 0 42px rgba(255, 94, 0, 0.55),
          inset 0 0 10px rgba(255, 255, 255, 0.45);
        filter: brightness(1.08);
      }
    }

    @keyframes tierMetaFlare {
      0% {
        transform: scale(0.85) translateY(8%);
        opacity: 0.8;
      }
      100% {
        transform: scale(1.05) translateY(-8%);
        opacity: 0.4;
      }
    }

    @keyframes tierShimmer {
      0% {
        transform: translateX(-120%);
      }
      100% {
        transform: translateX(140%);
      }
    }


    .sr-only {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }

    /* Ensure hidden elements do not render */
    [hidden] { display: none !important; }

    body {
      margin: 0;
      background: radial-gradient(1000px 600px at 80% -100px, rgba(0, 229, 255, 0.12), transparent 60%),
        linear-gradient(180deg, rgba(10, 18, 25, 0.9) 0%, rgba(5, 9, 13, 0.96) 60%, rgba(5, 9, 13, 1) 100%),
        var(--bg);
      color: var(--text);
      font-family: var(--font-body);
      font-size: calc(16px * var(--ui-scale));
      line-height: 1.5;
      min-height: 100vh;
      display: flex;
      justify-content: center;
      padding: clamp(16px, 4vw, 32px);
      overflow-x: auto;
    }

    button,
    input,
    select,
    textarea {
      font-family: var(--font-body);
    }

    :focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }

    .weapon-drop-placeholder,
    .chip,
    .meta-chip,
    .level-pill,
    .favorite-toggle,
    .collapse-toggle,
    .collapse-box,
    .drag-handle,
    .build-tab,
    .filter-heading,
    .type-filter-item,
    .options-title,
    .option-heading,
    .debug-command-row label,
    .debug-card-title,
    .side-nav-item,
    .side-nav-type,
    .attachments-header h2,
    .ap-readout,
    .card-meta,
    .changes-panel h3,
    .recommended-panel h3,
    .recommended-empty,
    .change-heading,
    .changes-empty {
      font-family: var(--font-subhead);
    }

    .ui-scale-value,
    .level-display,
    .ap-inline,
    .card-level,
    .ap-readout .ap-value {
      font-family: var(--font-mono);
    }

    .layout-grid {
      width: min(1400px, 100%);
      display: grid;
      grid-template-columns: minmax(220px, 260px) minmax(0, 1fr) minmax(220px, 280px);
      grid-template-areas: "nav main options";
      gap: 24px;
      align-items: start;
      transform: scale(var(--ui-scale));
      transform-origin: top center;
      will-change: transform;
    }

    .layout-grid.options-hidden {
      grid-template-columns: minmax(220px, 260px) minmax(0, 1fr) 0;
    }

    .app-shell {
      grid-area: main;
      min-width: 0;
    }

    .app {
      width: 100%;
      background: rgba(8, 12, 16, 0.55);
      border: 1px solid rgba(120, 160, 180, 0.14);
      border-radius: 16px;
      padding: 20px 24px;
      box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
      -webkit-backdrop-filter: blur(10px);
      backdrop-filter: blur(10px);
      display: flex;
      flex-direction: column;
      gap: 24px;
      position: relative;
    }

    .app::before {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      opacity: 0.08;
      background-image: 
        repeating-linear-gradient(90deg, rgba(180, 200, 220, 0.12) 0 1px, transparent 1px 24px),
        repeating-linear-gradient(0deg, rgba(180, 200, 220, 0.10) 0 1px, transparent 1px 24px);
      -webkit-mask-image: radial-gradient(80% 60% at 50% 10%, black, transparent 80%);
      mask-image: radial-gradient(80% 60% at 50% 10%, black, transparent 80%);
    }

    .page-header {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .page-title {
      font-size: clamp(24px, 4vw, 32px);
      font-weight: 700;
      letter-spacing: 0.02em;
      margin: 0;
      font-family: var(--font-headline);
    }

    .page-subtitle {
      font-size: 14px;
      color: var(--text-muted);
      margin: 0;
      max-width: 660px;
    }

    .weapon-card:hover {
      border-color: rgba(0, 229, 255, 0.25);
      box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
      background: rgba(10, 16, 21, 0.62);
      z-index: 300;
    }

    .weapon-card:focus-within {
      z-index: 300;
    }

    .weapon-card.tooltip-active {
      z-index: 1200;
    }

    .drag-active .weapon-card:hover:not(.dragging) {
      border-color: rgba(80, 120, 140, 0.18);
      box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
      background: rgba(10, 16, 21, 0.55);
    }

    @media (prefers-reduced-motion: reduce) {
      * { transition: none !important; }
    }

    :root.reduce-animations .meta-chip,
    :root.reduce-animations .meta-chip::before,
    :root.reduce-animations .meta-chip::after,
    :root.reduce-animations .chip,
    :root.reduce-animations .chip::before,
    :root.reduce-animations .chip::after,
    :root.reduce-animations .range-chip::after {
      animation: none !important;
    }

    :root.reduce-animations .meta-chip::before,
    :root.reduce-animations .meta-chip::after,
    :root.reduce-animations .chip::before,
    :root.reduce-animations .chip::after {
      content: none !important;
    }

    :root.reduce-animations .chip-flame-canvas {
      display: none !important;
    }

    :root.reduce-animations .debug-panel.visible {
      animation: none !important;
    }

    :root.reduce-animations .chip.tier-meta {
      background:
        radial-gradient(circle at 40% 25%, rgba(255, 255, 255, 0.45), transparent 55%),
        linear-gradient(130deg, #fff8db 0%, #ffdba0 38%, #ffb767 72%, #ff8a38 100%);
      box-shadow:
        inset 0 1px 4px rgba(255, 255, 255, 0.4),
        0 0 14px rgba(255, 180, 86, 0.5);
    }

    :root.reduce-animations .chip.tier-s {
      background:
        radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.55), transparent 60%),
        linear-gradient(120deg, #fff5c1 0%, #ffcd5a 28%, #ff8f00 62%, #ff5800 100%);
      box-shadow:
        0 0 20px rgba(255, 136, 0, 0.8),
        0 0 36px rgba(255, 90, 0, 0.65);
    }

    .weapon-card.favorite {
      border-color: rgba(0, 229, 255, 0.55);
      box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.25), 0 16px 36px rgba(0, 229, 255, 0.14);
      background: rgba(10, 16, 21, 0.66);
    }

    .weapon-drop-placeholder {
      border: 2px dashed rgba(0, 255, 255, 0.85);
      border-radius: 14px;
      padding: 28px;
      color: rgba(0, 255, 255, 0.9);
      text-transform: uppercase;
      letter-spacing: 0.08em;
      font-size: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: radial-gradient(circle, rgba(0, 229, 255, 0.22), rgba(0, 229, 255, 0.08));
      box-shadow: 0 0 26px rgba(0, 229, 255, 0.35);
      pointer-events: none;
    }

    .weapon-header {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 12px;
      cursor: grab;
      -webkit-user-select: none;
      user-select: none;
    }

    .weapon-header:active { cursor: grabbing; }

    .weapon-header-text {
      display: flex;
      flex-direction: column;
      gap: 2px;
      flex: 1 1 auto;
      min-width: 160px;
      position: relative;
      -webkit-user-select: none;
      user-select: none;
    }

    .weapon-visual {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-left: auto;
      flex: 0 0 auto;
    }

    .weapon-name {
      font-size: clamp(20px, 3.6vw, 26px);
      font-weight: 700;
      letter-spacing: 0.02em;
      font-family: var(--font-headline);
    }

    .weapon-image-wrap {
      flex: 0 0 auto;
      display: flex;
      align-items: center;
      justify-content: center;
      min-width: 110px;
      min-height: 38px;
    }

    .weapon-image {
      max-height: 38px;
      width: auto;
      border-radius: 6px;
      border: 1px solid rgba(60, 74, 85, 0.55);
      background: rgba(18, 26, 32, 0.88);
      object-fit: contain;
      box-shadow: 0 4px 10px rgba(0,0,0,0.25);
      display: block;
    }

    .weapon-image-ph {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 6px 10px;
      min-height: 38px;
      min-width: 110px;
      border-radius: 6px;
      border: 1px dotted rgba(120, 140, 156, 0.9);
      color: var(--text-muted);
      font-size: 12px;
      letter-spacing: 0.04em;
      background: rgba(18, 26, 32, 0.6);
      text-transform: none;
      -webkit-user-select: none;
      user-select: none;
    }

    .weapon-image-wrap.placeholder .weapon-image { display: none; }
    .weapon-image-wrap:not(.placeholder) .weapon-image-ph { display: none; }

    

    /* Meta chips under the weapon name */
    .weapon-meta-row {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-top: 2px;
      flex-wrap: wrap;
    }

    .chip-flame-wrap {
      position: relative;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 0;
      isolation: isolate;
    }

    .chip-flame-wrap .meta-chip,
    .chip-flame-wrap .chip {
      position: relative;
      z-index: 1;
    }

    .chip-flame-wrap .chip-flame-canvas {
      position: absolute;
      left: 50%;
      bottom: -10px;
      transform: translateX(-50%);
      pointer-events: none;
      opacity: 0;
      width: 0;
      height: 0;
      z-index: 0;
      transition: opacity 180ms ease;
      filter: drop-shadow(0 6px 10px rgba(255, 115, 50, 0.22));
    }

    .chip-flame-wrap.has-flame .chip-flame-canvas {
      opacity: 1;
    }

    /* Shared chip base: pill silhouette, uppercase text, high-contrast glow to keep text legible */
    .chip {
      --chip-stroke-width: var(--tier-chip-stroke);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: var(--tier-chip-padding-y) var(--tier-chip-padding-x);
      border-radius: var(--tier-chip-radius);
      font-size: var(--tier-chip-font-size);
      font-weight: 800;
      letter-spacing: 0.09em;
      text-transform: uppercase;
      color: #fff;
      background: rgba(32, 39, 45, 0.9);
      border: 1px solid rgba(255, 255, 255, 0.12);
      text-shadow:
        -1px -1px 2px rgba(0, 0, 0, 0.92),
        1px -1px 2px rgba(0, 0, 0, 0.92),
        -1px 1px 2px rgba(0, 0, 0, 0.92),
        1px 1px 2px rgba(0, 0, 0, 0.92),
        0 0 6px rgba(0, 0, 0, 0.88),
        0 0 14px rgba(0, 0, 0, 0.75);
      transition:
        transform var(--tier-chip-transition),
        box-shadow var(--tier-chip-transition),
        background var(--tier-chip-transition),
        filter var(--tier-chip-transition);
      position: relative;
      overflow: hidden;
      isolation: isolate;
      min-height: 24px;
    }

    .chip::after,
    .chip::before {
      pointer-events: none;
    }

    /* FIRE META tier (S Rank) - flame-drenched original Meta presentation */
    .chip.tier-s {
      --chip-stroke-width: var(--tier-chip-stroke-meta);
      background:
        radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.34), transparent 62%),
        linear-gradient(125deg, #fff4c6 0%, #ffc861 32%, #ff8a1f 65%, #ff4f1d 100%);
      border-color: rgba(255, 168, 60, 0.95);
      box-shadow:
        0 0 18px rgba(255, 180, 70, 0.85),
        0 0 42px rgba(255, 90, 0, 0.65);
      animation: tierMetaPulse 1.1s ease-in-out infinite alternate;
    }

    .chip.tier-s::before {
      /* Halo supporting the optional canvas flame overlay */
      content: "";
      position: absolute;
      inset: -40%;
      background: radial-gradient(circle, rgba(255, 222, 158, 0.95), rgba(255, 130, 16, 0.35), transparent 70%);
      filter: blur(10px);
      opacity: 0.55;
      z-index: -1;
      animation: tierMetaFlare 1s ease-in-out infinite alternate;
    }

    .chip.tier-s::after {
      /* Ember streak hugging the face */
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.65) 35%, transparent 65%);
      mix-blend-mode: screen;
      opacity: 0.4;
      animation: tierMetaFlare 1.4s ease-in-out infinite alternate;
    }

    .chip.tier-s:hover {
      transform: translateY(-1px) scale(1.07);
      box-shadow:
        0 0 26px rgba(255, 194, 104, 0.95),
        0 0 60px rgba(255, 102, 8, 0.8);
      filter: brightness(1.08);
      /* JS-driven flame/particle burst is triggered via hover on the parent wrapper */
    }

    /* META tier - radiant twin of S-tier without the embers */
    .chip.tier-meta {
      --chip-stroke-width: var(--tier-chip-stroke-meta);
      background:
        radial-gradient(circle at 42% 20%, rgba(255, 255, 255, 0.35), transparent 55%),
        linear-gradient(125deg, #fff4c6 0%, #ffc861 32%, #ff8a1f 65%, #ff4f1d 100%);
      border-color: rgba(255, 180, 86, 0.9);
      box-shadow:
        inset 0 2px 8px rgba(255, 255, 255, 0.5),
        0 0 18px rgba(255, 173, 88, 0.55),
        0 10px 26px rgba(255, 102, 8, 0.4);
      animation: tierMetaPulse 1.4s ease-in-out infinite alternate;
    }

    .chip.tier-meta::before {
      content: "";
      position: absolute;
      inset: -14%;
      background: radial-gradient(circle, rgba(255, 214, 153, 0.45), rgba(255, 138, 31, 0.15), transparent 70%);
      opacity: 0.55;
      filter: blur(6px);
    }

    .chip.tier-meta::after {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.75) 35%, transparent 70%);
      opacity: 0.6;
      animation: tierShimmer 1.9s linear infinite;
    }

    .chip.tier-meta:hover {
      transform: translateY(-1px) scale(1.05);
      box-shadow:
        inset 0 2px 8px rgba(255, 255, 255, 0.5),
        0 0 26px rgba(255, 194, 116, 0.75),
        0 16px 36px rgba(255, 112, 14, 0.45);
      filter: brightness(1.06);
    }

    /* A Tier — “Awesome!!”: violet prismatic enamel with bright glint + active shimmer */
    .chip.tier-a {
      background: linear-gradient(135deg, #fdf1ff 0%, #d095ff 35%, #a135ff 70%, #4e0dcd 100%);
      border-color: rgba(173, 123, 255, 0.85);
      box-shadow:
        0 0 20px rgba(146, 96, 255, 0.55),
        0 0 36px rgba(84, 34, 198, 0.45);
      animation: tierMetaPulse 1.6s ease-in-out infinite alternate;
    }

    .chip.tier-a::after {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(120deg, transparent 5%, rgba(255, 255, 255, 0.85) 40%, transparent 70%);
      animation: tierShimmer 1.8s linear infinite;
      opacity: 0.9;
    }

    .chip.tier-a:hover {
      box-shadow:
        0 0 26px rgba(146, 96, 255, 0.75),
        0 0 48px rgba(84, 34, 198, 0.65);
      filter: brightness(1.1);
      transform: translateY(-1px) scale(1.05);
    }

    .chip.tier-a:hover::after {
      animation-duration: 1.2s;
    }

    /* B Tier — “Great!”: energetic blue plating with tempered shine */
    .chip.tier-b {
      background: linear-gradient(140deg, #e7f5ff 0%, #9fd7ff 35%, #3a96ff 70%, #1c54ff 100%);
      border-color: rgba(69, 148, 255, 0.8);
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.55),
        0 0 14px rgba(84, 163, 255, 0.45);
    }

    .chip.tier-b::after {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(115deg, transparent 10%, rgba(255, 255, 255, 0.55) 45%, transparent 75%);
      opacity: 0.65;
      animation: tierShimmer 2.8s linear infinite;
    }

    .chip.tier-b:hover {
      transform: translateY(-1px) scale(1.03);
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.55),
        0 0 20px rgba(84, 163, 255, 0.6),
        0 10px 24px rgba(27, 73, 163, 0.35);
    }

    /* C Tier — “Good”: shimmering verdant plating */
    .chip.tier-c {
      background: linear-gradient(135deg, #e1ffe5 0%, #7fe0a3 40%, #2a8f55 85%);
      border-color: rgba(76, 185, 120, 0.72);
      box-shadow: 0 0 10px rgba(68, 161, 109, 0.35);
    }

    .chip.tier-c::after {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.35) 35%, transparent 70%);
      animation: tierShimmer 3s linear infinite;
      opacity: 0.55;
    }

    .chip.tier-c:hover {
      filter: brightness(1.05);
    }

    /* D Tier — “Ok”: white tempered badge with soft aura */
    .chip.tier-d {
      background: linear-gradient(135deg, #ffffff 0%, #f0f3f7 55%, #ced5dc 100%);
      border-color: rgba(235, 237, 240, 0.9);
      box-shadow:
        0 0 8px rgba(255, 255, 255, 0.6),
        0 0 16px rgba(255, 255, 255, 0.35);
    }

    .chip.tier-d:hover {
      filter: brightness(1.06);
      box-shadow:
        0 0 10px rgba(255, 255, 255, 0.75),
        0 0 20px rgba(206, 213, 220, 0.5);
    }

    /* F Tier — “F Tier”: dusty charcoal plate with almost no shine */
    .chip.tier-f {
      background: linear-gradient(135deg, #5c6166 0%, #3a3d41 70%, #2b2d30 100%);
      border-color: rgba(62, 66, 70, 0.7);
      box-shadow:
        inset 0 0 2px rgba(0, 0, 0, 0.4),
        inset 0 -4px 10px rgba(0, 0, 0, 0.35);
      filter: grayscale(0.15);
    }

    .chip.tier-f:hover {
      filter: grayscale(0.15) brightness(1.02);
    }

    @media (prefers-reduced-motion: reduce) {
      .chip {
        transition: none;
      }

      .chip.tier-s,
      .chip.tier-s::before,
      .chip.tier-s::after,
      .chip.tier-meta,
      .chip.tier-meta::before,
      .chip.tier-meta::after,
      .chip.tier-a::after,
      .chip.tier-b::after,
      .chip.tier-c::after {
        animation: none !important;
        filter: none;
      }
    }

    .meta-chip {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 4px 8px;
      border-radius: 999px;
      font-size: var(--tier-chip-font-size);
      font-weight: 800;
      letter-spacing: 0.09em;
      text-transform: uppercase;
      border: 1px solid rgba(60, 74, 85, 0.6);
      background: rgba(18, 26, 32, 0.88);
      color: #fff;
      -webkit-user-select: none;
      user-select: none;
      position: relative;
      overflow: hidden;
      z-index: 0;
      isolation: isolate;
      --chip-text-outline: rgba(0, 0, 0, 0.95);
      --chip-text-glow: 0 0 0 transparent;
      text-shadow:
        -1px -1px 2px rgba(0, 0, 0, 0.95),
        1px -1px 2px rgba(0, 0, 0, 0.95),
        -1px 1px 2px rgba(0, 0, 0, 0.95),
        1px 1px 2px rgba(0, 0, 0, 0.95),
        0 0 6px rgba(0, 0, 0, 0.9),
        0 0 14px rgba(0, 0, 0, 0.75),
        var(--chip-text-glow);
    }

    .level-pill {
      background: rgba(0, 229, 255, 0.12);
      color: var(--accent);
      border: 1px solid rgba(0, 229, 255, 0.35);
      border-radius: 999px;
      padding: 5px 12px;
      font-weight: 600;
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      white-space: nowrap;
    }

    /* Header chevron chip */
    .chevron-toggle {
      position: absolute;
      top: -2px;
      right: -2px;
      border: 1px solid rgba(60, 74, 85, 0.55);
      background: rgba(18, 26, 32, 0.88);
      color: var(--text);
      border-radius: 8px;
      padding: 2px 6px;
      font-size: 12px;
      line-height: 1;
      cursor: pointer;
      transform: rotate(90deg);
      transition: transform var(--transition);
      -webkit-user-select: none;
      user-select: none;
    }

    .weapon-card.collapsed .chevron-toggle {
      transform: rotate(0deg);
    }

    /* Header condensed controls row */
    .header-controls {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      margin-top: 4px;
    }

    .header-level {
      color: #00e5ff;
      text-shadow: 0 0 8px rgba(0, 229, 255, 0.35);
      font-weight: 700;
      letter-spacing: 0.08em;
      min-width: 64px;
      display: inline-flex;
      justify-content: flex-start;
    }

    .header-sep { opacity: 0.6; }

    .header-controls .level-slider {
      width: min(280px, 42vw);
    }

.mastery-slider-shell {
  position: relative;
  width: min(320px, 50vw);
  padding-bottom: 0;
  display: flex;
  align-items: center;
}

.mastery-slider-shell .level-slider {
  width: 100%;
}

.slider-ticks {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -12px;
  top: auto;
  height: 12px;
  pointer-events: none;
}

.slider-tick {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  width: 1px;
  height: 8px;
  background: rgba(0, 229, 255, 0.35);
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

    .slider-tick::after {
      content: attr(title);
      position: absolute;
      left: 50%;
      top: 12px;
      transform: translate(-50%, 0);
      white-space: nowrap;
    }

    .slider-tick--minor {
      height: 6px;
      background: rgba(0, 229, 255, 0.2);
    }

    .slider-tick--minor::after {
      content: none;
    }

    .header-level-wrap {
      display: flex;
      flex-direction: column;
      gap: 6px;
      align-items: flex-end;
      min-width: 170px;
    }

    .header-level-row {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .header-slider-row { width: 100%; }

    .header-level-wrap .level-slider {
      width: clamp(160px, 26vw, 220px);
    }

    .level-stepper {
      display: flex;
      flex-direction: column;
      gap: 6px;
      padding: 4px;
      border-radius: 12px;
      border: 1px solid rgba(0, 229, 255, 0.35);
      background:
        linear-gradient(145deg, rgba(0, 229, 255, 0.08), rgba(8, 14, 20, 0.9));
      box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.02),
        0 8px 18px rgba(0, 0, 0, 0.35);
    }

    .level-stepper .level-button {
      width: 30px;
      min-width: 30px;
      aspect-ratio: 1;
      font-size: 14px;
      padding: 0;
    }

    /* Hide header level pill; no collapsed indicator */
    .weapon-card .level-pill { display: none !important; }

    .favorite-toggle,
    .collapse-toggle,
    .collapse-box,
    .drag-handle {
      border: 1px solid rgba(60, 74, 85, 0.55);
      background: rgba(18, 26, 32, 0.88);
      color: var(--text);
      border-radius: 10px;
      padding: 6px 10px;
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      transition: background var(--transition), border-color var(--transition), color var(--transition);
    }

    .drag-handle { cursor: grab; display: none !important; }

    .weapon-card[data-active-build]:not([data-active-build="mastery"]) .level-pill,
    .weapon-card[data-active-build]:not([data-active-build="mastery"]) .weapon-body .level-controls {
      display: none !important;
    }

    .weapon-card[data-active-build]:not([data-active-build="mastery"]) .header-controls .level-button,
    .weapon-card[data-active-build]:not([data-active-build="mastery"]) .header-controls .level-slider,
    .weapon-card[data-active-build]:not([data-active-build="mastery"]) .header-level-wrap,
    .weapon-card[data-active-build]:not([data-active-build="mastery"]) .header-slider-row,
    .weapon-card[data-active-build]:not([data-active-build="mastery"]) .level-stepper,
    .weapon-card[data-active-build]:not([data-active-build="mastery"]) .header-level,
    .weapon-card[data-active-build]:not([data-active-build="mastery"]) .header-sep {
      display: none !important;
    }

    /* Hide legacy UI controls/labels when using header row */
    .collapse-toggle { display: none !important; }
    .favorite-toggle .favorite-text { display: none !important; }
    .build-tabs {
      display: flex;
      flex-direction: column;
      gap: 4px;
      padding: 2px 0;
    }

    .build-tablist {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      align-items: center;
    }

    .build-tab {
      border-radius: 999px;
      border: 1px solid rgba(120, 160, 180, 0.45);
      background: rgba(8, 12, 16, 0.8);
      color: inherit;
      font-size: 12px;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      padding: 4px 12px;
      cursor: pointer;
      transition: border-color var(--transition), background var(--transition);
    }

    .build-tab.active,
    .build-tab:hover {
      border-color: rgba(0, 229, 255, 0.55);
      background: rgba(0, 229, 255, 0.12);
    }

.strip-page .build-card,
.strip-page .recommended-panel {
  display: flex !important;
}

    .drag-handle:active { cursor: grabbing; }

    .filter-section {
      border: 1px solid rgba(120, 160, 180, 0.35);
      border-radius: 12px;
      padding: 10px;
      background: rgba(10, 16, 21, 0.75);
    }

    .filter-heading {
      font-size: 13px;
      letter-spacing: 0.15em;
      text-transform: uppercase;
      color: rgba(177, 191, 203, 0.95);
      margin-bottom: 8px;
    }

    .type-filter-list {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .type-filter-item {
      border: 1px solid rgba(120, 160, 180, 0.35);
      border-radius: 8px;
      padding: 6px 10px;
      font-size: 13px;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      background: rgba(8, 12, 16, 0.85);
      cursor: pointer;
      transition: background var(--transition), border-color var(--transition);
      text-align: left;
    }

    .type-filter-item.active {
      border-color: rgba(0, 229, 255, 0.7);
      background: rgba(0, 229, 255, 0.12);
    }

.favorites-empty-card {
  border: 1px dashed rgba(0, 229, 255, 0.4);
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.08), rgba(0, 229, 255, 0.02));
  border-radius: 14px;
  padding: 18px;
      margin: 10px;
      box-shadow: inset 0 0 0 1px rgba(0, 229, 255, 0.12), 0 12px 28px rgba(0, 0, 0, 0.35);
      display: flex;
      flex-direction: column;
      gap: 10px;
      text-align: center;
      color: var(--text);
    }

    .favorites-empty-title {
      font-size: 16px;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      margin: 0;
    }

    .favorites-empty-body {
      margin: 0;
      color: var(--text-muted);
    }

.favorites-empty-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.favorite-toggle.favorite-demo {
  min-width: 0;
  padding: 8px 12px;
  gap: 8px;
  border-style: dashed;
}

.mini-instructions {
  margin: 4px 0 0;
  color: var(--text-muted);
}

    .favorite-toggle.favorite-demo .favorite-text {
      display: inline !important;
      font-size: 13px;
      letter-spacing: 0.04em;
    }

    .favorite-toggle.favorite-demo .favorite-icon {
      font-size: 18px;
      line-height: 1;
    }

    .return-link {
      border: 1px solid rgba(0, 229, 255, 0.5);
      background: rgba(0, 229, 255, 0.12);
      padding: 6px 12px;
      border-radius: 999px;
      color: var(--accent);
      cursor: pointer;
      font-weight: 800;
      letter-spacing: 0.08em;
      text-decoration: none;
      transition: background var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition);
      box-shadow:
        0 0 0 1px rgba(0, 229, 255, 0.12),
        0 10px 30px rgba(0, 229, 255, 0.1);
    }

    .return-link:hover,
    .return-link:focus-visible {
      color: #6df1ff;
      background: rgba(0, 229, 255, 0.18);
      border-color: rgba(0, 229, 255, 0.8);
      box-shadow:
        0 0 0 1px rgba(0, 229, 255, 0.24),
        0 12px 34px rgba(0, 229, 255, 0.2);
      transform: translateY(-1px);
      outline: none;
    }

    .favorite-toggle:hover,
    .collapse-toggle:hover,
    .collapse-box:hover,
    .drag-handle:hover {
      background: rgba(0, 229, 255, 0.12);
      border-color: rgba(0, 229, 255, 0.35);
    }

    .favorite-toggle[aria-pressed="true"] {
      background: rgba(0, 229, 255, 0.18);
      border-color: rgba(0, 229, 255, 0.5);
      color: var(--accent);
    }

    .favorite-toggle span[aria-hidden="true"] {
      transition: transform 200ms ease, color 200ms ease;
    }

    .weapon-card.favorite {
      border-color: rgba(0, 229, 255, 0.55);
      box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.5),
        0 0 22px rgba(0, 229, 255, 0.35),
        0 0 44px rgba(0, 160, 255, 0.2);
    }

    .weapon-card.favorite .favorite-toggle span[aria-hidden="true"] {
      color: #00f0ff;
      text-shadow:
        0 0 4px rgba(0, 229, 255, 0.6),
        0 0 12px rgba(0, 229, 255, 0.65);
    }

    .weapon-card.favorite .favorite-toggle {
      box-shadow: 0 0 12px rgba(0, 229, 255, 0.35) inset, 0 0 16px rgba(0, 229, 255, 0.4);
    }

    /* Square icon-only controls */
    .favorite-toggle,
    .collapse-box {
      width: 34px;
      height: 34px;
      padding: 0;
      font-size: 18px;
      line-height: 1;
      text-transform: none;
    }

    .control-stack {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      gap: 6px;
    }

    .weapon-body {
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    .weapon-card.collapsed .weapon-body {
      display: none;
    }

    /* Left navigation within layout grid */
    .side-nav {
      grid-area: nav;
      padding: 16px 12px;
      border: 1px solid rgba(44, 62, 76, 0.75);
      background: linear-gradient(180deg, rgba(8, 12, 16, 0.95), rgba(6, 10, 14, 0.92));
      border-radius: 14px;
      box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.025),
        0 20px 40px rgba(0, 0, 0, 0.45);
      max-height: calc(100vh - 60px);
      overflow-y: auto;
      overflow-x: hidden;
      overscroll-behavior: contain;
      position: sticky;
      top: 24px;
    }


    @supports (scrollbar-color: auto) {
      .side-nav {
        scrollbar-width: thin;
        scrollbar-color: rgba(0, 229, 255, 0.45) rgba(6, 10, 14, 0.6);
      }
    }

    .side-nav::-webkit-scrollbar {
      width: 8px;
    }

    .side-nav::-webkit-scrollbar-track {
      background: rgba(6, 10, 14, 0.8);
      border-radius: 999px;
    }

    .side-nav::-webkit-scrollbar-thumb {
      background: linear-gradient(180deg, rgba(0, 229, 255, 0.85), rgba(0, 120, 150, 0.7));
      border-radius: 999px;
      border: 1px solid rgba(0, 229, 255, 0.35);
      box-shadow: inset 0 0 6px rgba(0, 229, 255, 0.4);
    }

    .side-nav-empty {
      border: 1px dashed rgba(0, 229, 255, 0.4);
      background: radial-gradient(circle at 12% 20%, rgba(0, 229, 255, 0.12), transparent 40%),
        radial-gradient(circle at 88% 16%, rgba(0, 229, 255, 0.12), transparent 42%),
        rgba(8, 12, 16, 0.85);
      border-radius: 12px;
      padding: 14px;
      text-align: center;
      color: rgba(200, 214, 225, 0.9);
      box-shadow: inset 0 0 0 1px rgba(0, 229, 255, 0.12);
      display: flex;
      flex-direction: column;
      gap: 10px;
      letter-spacing: 0.05em;
    }

    .side-nav-empty .side-nav-empty-title {
      font-size: 13px;
      font-weight: 700;
      color: var(--text);
      text-transform: uppercase;
      letter-spacing: 0.12em;
    }

    .side-nav-empty .side-nav-empty-note {
      font-size: 12px;
      color: var(--text-muted);
      margin: 0;
    }

    .side-nav-empty .side-nav-empty-actions {
      display: flex;
      justify-content: center;
      gap: 8px;
      flex-wrap: wrap;
    }

    .side-nav-empty .return-link {
      border: 1px solid rgba(0, 229, 255, 0.5);
      background: rgba(0, 229, 255, 0.12);
      color: var(--accent);
      cursor: pointer;
      text-decoration: none;
      letter-spacing: 0.08em;
      font-weight: 800;
      padding: 6px 12px;
      border-radius: 999px;
      transition: background var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition);
      box-shadow:
        0 0 0 1px rgba(0, 229, 255, 0.12),
        0 10px 30px rgba(0, 229, 255, 0.1);
    }

    .side-nav-empty .return-link:hover,
    .side-nav-empty .return-link:focus-visible {
      color: #6df1ff;
      background: rgba(0, 229, 255, 0.18);
      border-color: rgba(0, 229, 255, 0.8);
      box-shadow:
        0 0 0 1px rgba(0, 229, 255, 0.24),
        0 12px 34px rgba(0, 229, 255, 0.2);
      transform: translateY(-1px);
      outline: none;
    }

    .side-nav:not(.nav-ready) {
      visibility: hidden;
      pointer-events: none;
    }

    .side-nav-list {
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin: 0;
      padding: 0;
      list-style: none;
    }

    .side-nav-item {
      border: 1px solid rgba(70, 90, 110, 0.78);
      background: linear-gradient(180deg, rgba(10, 14, 18, 0.94), rgba(8, 12, 16, 0.92));
      box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.035),
        0 12px 24px rgba(0, 0, 0, 0.35);
      border-radius: 14px;
      padding: 11px 14px;
      font-size: 13px;
      letter-spacing: 0.1em;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      cursor: grab;
      transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
      -webkit-user-select: none;
      user-select: none;
    }

    .side-nav-item:active {
      cursor: grabbing;
    }

    .side-nav-item:hover {
      border-color: rgba(0, 229, 255, 0.55);
      background: linear-gradient(180deg, rgba(12, 18, 24, 0.95), rgba(8, 12, 16, 0.95));
      box-shadow:
        0 12px 24px rgba(0, 0, 0, 0.4),
        inset 0 0 0 1px rgba(0, 229, 255, 0.1);
    }

    .drag-active .side-nav-item:hover:not(.dragging) {
      border-color: rgba(70, 90, 110, 0.6);
      background: rgba(8, 12, 16, 0.85);
      box-shadow: none;
    }

    .side-nav-item.dragging {
      opacity: 1;
      border-color: rgba(0, 229, 255, 0.65);
      background: rgba(0, 229, 255, 0.22);
      box-shadow: 0 12px 26px rgba(0, 0, 0, 0.45);
    }

    .side-nav-item.nav-drop-placeholder {
      border-style: dashed;
      border-color: rgba(0, 255, 255, 0.8);
      background: rgba(0, 229, 255, 0.15);
      color: rgba(0, 229, 255, 0.9);
      box-shadow: 0 0 16px rgba(0, 229, 255, 0.3);
      justify-content: center;
      pointer-events: none;
    }

    .side-nav-name {
      flex: 1 1 auto;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      font-weight: 800;
      color: #f5f8fa;
      text-align: left;
    }

    .side-nav-type {
      color: var(--text-muted);
      font-size: 12px;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      font-weight: 700;
      opacity: 0.85;
    }

    .side-nav-fav {
      color: var(--accent);
      font-size: 14px;
      line-height: 1;
      text-shadow: 0 0 6px rgba(0, 229, 255, 0.6);
      margin-left: 6px;
    }

    .side-nav-fav:empty {
      display: none;
    }

    @media (max-width: 1180px) {
      .layout-grid {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
          "main"
          "nav"
          "options";
      }

      .side-nav,
      .options-panel:not(.collapsed) {
        position: static;
        max-height: none;
      }
    }

    @media (max-width: 768px) {
      .layout-grid {
        gap: 16px;
      }

      .side-nav,
      .options-panel {
        padding: 12px;
      }
    }

    .options-panel {
      grid-area: options;
      padding: 14px;
      border-radius: 12px;
      border: 1px solid var(--panel-border);
      background: rgba(12, 18, 24, 0.85);
      box-shadow: 0 18px 30px rgba(0, 0, 0, 0.4);
      display: flex;
      flex-direction: column;
      gap: 14px;
      position: sticky;
      top: 24px;
      max-height: calc(100vh - 60px);
      will-change: transform, opacity;
    }

    .options-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding-bottom: 8px;
      border-bottom: 1px solid rgba(70, 100, 120, 0.32);
    }

    .options-title {
      font-size: 12px;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: #e5f1fb;
      display: inline-flex;
      align-items: center;
      gap: 10px;
      font-weight: 800;
      padding-bottom: 2px;
    }

    .options-title::after {
      content: "";
      height: 2px;
      width: 56px;
      border-radius: 999px;
      background: linear-gradient(90deg, rgba(0, 229, 255, 0.9), rgba(0, 229, 255, 0.12));
      opacity: 0.85;
    }

    .options-gear {
      border: 1px solid rgba(80, 120, 140, 0.45);
      background: linear-gradient(145deg, rgba(0, 229, 255, 0.14), rgba(8, 14, 20, 0.95));
      color: #e5f1fb;
      border-radius: 12px;
      min-width: 44px;
      min-height: 44px;
      padding: 10px 12px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 229, 255, 0.12);
      font-weight: 800;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
    }

    .options-gear:hover,
    .options-gear:focus-visible {
      transform: translateY(-1px);
      border-color: rgba(0, 229, 255, 0.8);
      box-shadow: 0 12px 28px rgba(0, 229, 255, 0.18), 0 0 0 1px rgba(0, 229, 255, 0.3);
      outline: none;
    }

    .options-panel.collapsed {
      position: fixed;
      top: 12px;
      right: 12px;
      width: auto;
      padding: 0;
      border: none;
      box-shadow: none;
      background: transparent;
      max-height: none;
      gap: 0;
      pointer-events: none;
      z-index: 80;
    }

    .options-panel.collapsed .options-header {
      justify-content: flex-end;
    }

    .options-panel.collapsed .options-title,
    .options-panel.collapsed .options-body {
      display: none;
    }

    .options-panel.collapsed .options-gear {
      pointer-events: auto;
      border-color: rgba(0, 229, 255, 0.75);
      background: linear-gradient(145deg, rgba(0, 229, 255, 0.18), rgba(8, 14, 20, 0.95));
      box-shadow: 0 12px 28px rgba(0, 229, 255, 0.32), 0 0 0 1px rgba(0, 229, 255, 0.22);
      color: #e5f1fb;
    }

    .options-overlay {
      position: fixed;
      inset: 0;
      background: radial-gradient(circle at 20% 15%, rgba(0, 229, 255, 0.08), transparent 35%), rgba(4, 8, 12, 0.68);
      -webkit-backdrop-filter: blur(2px);
      backdrop-filter: blur(2px);
      z-index: 58;
    }

    .options-overlay[hidden] {
      display: none;
    }

    @media (max-width: 900px) {
      .options-panel {
        position: fixed;
        right: 14px;
        top: 14px;
        max-width: min(420px, 92vw);
        height: calc(100vh - 28px);
        transform: translate3d(160%, -6%, 0);
        opacity: 0;
        transition: transform 260ms ease, opacity 220ms ease;
        z-index: 60;
        max-height: none;
      }

      .options-panel.drawer-open {
        transform: translate3d(0, 0, 0);
        opacity: 1;
      }

      :root:not(.reduce-animations) .options-panel {
        transition: transform 240ms ease, opacity 200ms ease;
      }

      :root:not(.reduce-animations) .options-panel.options-animating {
        animation: optionsSwoosh 420ms cubic-bezier(0.16, 0.9, 0.24, 1) both;
      }

      :root.reduce-animations .options-panel {
        transition: transform 160ms ease, opacity 160ms ease;
      }

      :root.reduce-animations .options-panel.options-animating {
        animation: none;
      }

      .options-panel.collapsed {
        position: fixed;
        right: 14px;
        top: 14px;
        padding: 14px;
        background: rgba(12, 18, 24, 0.94);
        border: 1px solid rgba(0, 229, 255, 0.35);
        box-shadow: 0 18px 34px rgba(0, 0, 0, 0.45);
        pointer-events: auto;
      }

      .options-panel.collapsed .options-title,
      .options-panel.collapsed .options-body {
        display: flex;
      }

      .options-panel.collapsed .options-header {
        justify-content: space-between;
      }
    }

    @keyframes optionsSwoosh {
      0% {
        transform: translate3d(160%, -6%, 0) scale(0.98);
        opacity: 0;
      }
      100% {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: 1;
      }
    }
    :root:not(.reduce-animations) .options-panel.options-animating {
      animation: optionsSwoosh 420ms cubic-bezier(0.16, 0.9, 0.24, 1) both;
    }
    .debug-panel {
      grid-column: 1 / -1;
      margin-top: 18px;
      padding: 14px;
      border-radius: 12px;
      border: 1px solid var(--panel-border);
      background: rgba(8, 12, 16, 0.85);
      box-shadow: 0 18px 30px rgba(0, 0, 0, 0.35);
      display: flex;
      flex-direction: column;
      gap: 12px;
      position: relative;
    }

    .debug-panel.visible {
      animation: panelFadeIn 220ms ease;
    }

    @keyframes panelFadeIn {
      from {
        opacity: 0;
        transform: translateY(8px);
      }
      to {
        opacity: 1;
        transform: translateY(-1px);
      }
    }

    .debug-panel-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }

    .debug-close {
      border: 1px solid rgba(70, 90, 110, 0.6);
      background: rgba(4, 6, 8, 0.6);
      color: var(--text);
      border-radius: 10px;
      width: 36px;
      height: 36px;
      font-size: 20px;
      cursor: pointer;
      transition: background var(--transition), border-color var(--transition);
    }

    .debug-close:hover {
      border-color: rgba(0, 229, 255, 0.4);
      background: rgba(0, 229, 255, 0.08);
    }

    .debug-command-row {
      display: flex;
      flex-direction: column;
      gap: 6px;
      font-size: 12px;
      letter-spacing: 0.04em;
    }

    .debug-command-row label {
      text-transform: uppercase;
      color: var(--text-muted);
    }

    .debug-command-input {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    #debugCommandInput {
      flex: 1;
      border-radius: 8px;
      border: 1px solid rgba(80, 120, 140, 0.5);
      background: rgba(12, 16, 20, 0.8);
      color: var(--text);
      padding: 8px 12px;
      font-size: 13px;
      letter-spacing: 0.04em;
      font-family: inherit;
    }

    #debugCommandInput:focus {
      outline: none;
      border-color: rgba(0, 229, 255, 0.6);
      box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.15);
    }

    .debug-hint {
      font-size: 11px;
      color: rgba(255, 255, 255, 0.5);
    }

    .debug-status {
      font-size: 12px;
      color: rgba(255, 255, 255, 0.55);
      letter-spacing: 0.04em;
    }

    .debug-card-list {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .debug-card {
      border: 1px solid rgba(70, 90, 110, 0.5);
      background: rgba(10, 16, 22, 0.85);
      border-radius: 10px;
      padding: 12px;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .debug-card-title {
      font-size: 12px;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--text-muted);
    }

    .debug-chip-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .debug-chip-list .chip {
      width: 100%;
      justify-content: center;
    }

    .options-floating-gear {
      position: fixed;
      top: 12px;
      right: 12px;
      min-height: 44px;
      border-radius: 12px;
      border: 1px solid rgba(80, 120, 140, 0.45);
      background: linear-gradient(145deg, rgba(0, 229, 255, 0.14), rgba(8, 14, 20, 0.95));
      color: #e5f1fb;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      padding: 10px 14px;
      cursor: pointer;
      z-index: 2000;
      font-weight: 800;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 229, 255, 0.12);
      transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
    }

    .options-floating-gear:hover,
    .options-floating-gear:focus-visible {
      transform: translateY(-1px);
      border-color: rgba(0, 229, 255, 0.8);
      box-shadow: 0 12px 28px rgba(0, 229, 255, 0.18), 0 0 0 1px rgba(0, 229, 255, 0.3);
      background: rgba(0, 229, 255, 0.16);
      outline: none;
    }

    .gear-symbol {
      font-size: 18px;
      line-height: 1;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: auto;
      height: auto;
    }

    .options-floating-gear .gear-symbol {
      font-size: 16px;
    }

    .options-label {
      font-size: 12px;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: inherit;
    }

    .update-notice {
      position: fixed;
      right: 14px;
      bottom: 14px;
      z-index: 1900;
      border-radius: 999px;
      border: 1px solid rgba(80, 120, 140, 0.45);
      background: rgba(8, 12, 16, 0.92);
      color: #e5f1fb;
      display: inline-flex;
      align-items: center;
      gap: 10px;
      padding: 8px 12px;
      font-size: 11px;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      cursor: pointer;
      opacity: 0;
      transform: translateY(8px);
      pointer-events: none;
      box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 229, 255, 0.08);
      transition: opacity var(--transition), transform var(--transition), border-color var(--transition), box-shadow var(--transition), background var(--transition);
    }

    .update-notice.visible {
      opacity: 0.92;
      transform: translateY(0);
      pointer-events: auto;
    }

    .update-notice:hover,
    .update-notice:focus-visible {
      border-color: rgba(0, 229, 255, 0.65);
      background: rgba(0, 229, 255, 0.12);
      box-shadow: 0 12px 28px rgba(0, 229, 255, 0.16), 0 0 0 1px rgba(0, 229, 255, 0.2);
      outline: none;
    }

    .update-notice-label {
      color: rgba(184, 198, 210, 0.9);
      font-weight: 600;
    }

    .update-notice-action {
      color: var(--accent);
      font-weight: 800;
    }

    :root.reduce-animations .update-notice {
      transition: none;
    }

    .options-body {
      display: flex;
      flex-direction: column;
      gap: 12px;
      overflow: auto;
    }

    .option-card {
      border: 1px solid rgba(70, 90, 110, 0.6);
      background: rgba(8, 12, 16, 0.92);
      border-radius: 12px;
      padding: 12px;
      display: flex;
      flex-direction: column;
      gap: 12px;
      transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
    }

    .option-card:hover {
      border-color: rgba(0, 229, 255, 0.35);
      background: rgba(8, 12, 16, 0.98);
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    }

    .option-heading {
      font-size: 13px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--text-muted);
    }

    .option-card.ui-scale-card {
      gap: 10px;
    }

    .ui-scale-heading {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    .ui-scale-heading .option-heading {
      margin: 0;
      color: var(--text-muted);
    }

    .ui-scale-heading .ui-scale-value {
      font-weight: 700;
      color: var(--accent);
      text-shadow: 0 0 10px rgba(0, 229, 255, 0.45);
      font-size: 13px;
    }

    .ui-scale-card .ui-scale-slider {
      margin-top: 2px;
    }

    .options-toggle {
      cursor: pointer;
      align-items: center;
      flex-direction: row;
      justify-content: space-between;
    }

    .toggle-switch {
      width: 40px;
      height: 20px;
      border-radius: 999px;
      border: 1px solid rgba(60, 74, 85, 0.6);
      background: rgba(10, 16, 21, 0.8);
      position: relative;
      transition: background var(--transition), border-color var(--transition);
    }

    .toggle-switch::after {
      content: "";
      position: absolute;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.9);
      top: 1px;
      left: 1px;
      transition: transform var(--transition), background var(--transition);
    }

    .toggle-switch.on {
      border-color: rgba(0, 229, 255, 0.55);
      background: rgba(0, 229, 255, 0.12);
    }

    .toggle-switch.on::after {
      background: var(--accent);
      transform: translateX(18px);
    }

    .filter-section {
      gap: 8px;
    }

    .filter-heading {
      font-size: 13px;
      text-transform: uppercase;
      letter-spacing: 0.12em;
      color: var(--text-muted);
    }

    .type-filter-list {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .type-filter-item {
      border-radius: 999px;
      border: 1px solid rgba(80, 120, 140, 0.4);
      padding: 4px 12px;
      font-size: 13px;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      background: rgba(10, 16, 21, 0.85);
      cursor: pointer;
      transition: border-color var(--transition), background var(--transition), color var(--transition), box-shadow var(--transition);
    }

.type-filter-item:hover,
.type-filter-item.active {
  border-color: rgba(0, 229, 255, 0.55);
  background: rgba(0, 229, 255, 0.14);
  box-shadow: 0 8px 24px rgba(0, 229, 255, 0.2);
}

    .ui-scale-value {
      font-weight: 700;
      color: var(--accent);
      text-shadow: 0 0 8px rgba(0, 229, 255, 0.35);
    }

    .ui-scale-slider {
      width: 100%;
      appearance: none;
      height: 6px;
      border-radius: 999px;
      background: linear-gradient(
        90deg,
        var(--accent) 0%,
        var(--accent) var(--slider-fill, 50%),
        rgba(80, 120, 140, 0.35) var(--slider-fill, 50%),
        rgba(80, 120, 140, 0.35) 100%
      );
      border: 1px solid rgba(70, 90, 110, 0.6);
      cursor: pointer;
      transition: background var(--transition), border-color var(--transition);
    }

    .ui-scale-slider:focus-visible {
      outline: none;
      box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.45);
    }

    .ui-scale-slider::-webkit-slider-thumb {
      appearance: none;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: var(--accent);
      box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    }

    .ui-scale-slider::-moz-range-thumb {
      width: 16px;
      height: 16px;
      border: none;
      border-radius: 50%;
      background: var(--accent);
      box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    }

    .ui-scale-slider::-moz-range-track {
      background: transparent;
    }

    .ui-scale-slider::-webkit-slider-runnable-track {
      appearance: none;
      height: 6px;
    }
    .level-controls {
      display: grid;
      grid-template-columns: auto 1fr auto;
      gap: 12px;
      align-items: center;
    }

    .level-button {
      width: 36px;
      aspect-ratio: 1;
      border-radius: 10px;
      border: 1px solid rgba(0, 229, 255, 0.45);
      background:
        linear-gradient(180deg, rgba(0, 229, 255, 0.18), rgba(4, 10, 16, 0.9)),
        rgba(10, 16, 22, 0.9);
      color: #e8f8ff;
      font-size: 18px;
      font-weight: 700;
      cursor: pointer;
      box-shadow:
        0 0 0 1px rgba(0, 229, 255, 0.12),
        0 6px 18px rgba(0, 0, 0, 0.35);
      transition:
        transform var(--transition),
        border-color var(--transition),
        background var(--transition),
        box-shadow var(--transition),
        color var(--transition);
    }

    .level-button:hover:not(:disabled) {
      transform: translateY(-1px);
      border-color: rgba(0, 229, 255, 0.8);
      background:
        linear-gradient(180deg, rgba(0, 229, 255, 0.28), rgba(4, 10, 16, 0.92)),
        rgba(10, 16, 22, 0.95);
      box-shadow:
        0 0 0 1px rgba(0, 229, 255, 0.32),
        0 10px 24px rgba(0, 229, 255, 0.15),
        0 10px 24px rgba(0, 0, 0, 0.45);
      color: #ffffff;
    }

    .level-button:disabled {
      opacity: 0.4;
      cursor: not-allowed;
    }

    .level-display {
      font-size: 13px;
      color: var(--text-muted);
      letter-spacing: 0.04em;
      text-transform: uppercase;
    }

    .level-slider,
    .ui-scale-slider {
      appearance: none;
      width: 100%;
      height: 8px;
      border-radius: 6px;
      border: 1px solid rgba(70, 90, 110, 0.8);
      --slider-active-fill: var(--slider-fill, 50%);
      background:
        linear-gradient(
          90deg,
          rgba(0, 229, 255, 0.9) 0%,
          rgba(0, 229, 255, 0.9) var(--slider-active-fill),
          rgba(5, 8, 12, 0.95) var(--slider-active-fill),
          rgba(5, 8, 12, 0.95) 100%
        ),
        repeating-linear-gradient(
          90deg,
          rgba(255, 255, 255, 0.08) 0 8px,
          transparent 8px 16px
        ),
        linear-gradient(180deg, rgba(0, 0, 0, 0.45), rgba(255, 255, 255, 0.06)),
        rgba(3, 6, 10, 0.92);
      box-shadow:
        inset 0 0 16px rgba(0, 0, 0, 0.85),
        0 0 14px rgba(0, 229, 255, 0.12);
      cursor: pointer;
      transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
      position: relative;
    }

    .level-slider {
      --slider-active-fill: var(--level-slider-fill, 0%);
    }

    .ui-scale-slider {
      --slider-active-fill: var(--slider-fill, 50%);
    }

    .level-slider:focus-visible,
    .ui-scale-slider:focus-visible {
      outline: none;
      border-color: rgba(0, 229, 255, 0.8);
      box-shadow:
        0 0 0 1px rgba(0, 229, 255, 0.5),
        0 0 22px rgba(0, 229, 255, 0.35),
        inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    }

    .level-slider::-webkit-slider-thumb,
    .ui-scale-slider::-webkit-slider-thumb {
      appearance: none;
      width: 12px;
      height: 18px;
      border-radius: 3px;
      border: 1px solid rgba(0, 229, 255, 0.5);
      background: linear-gradient(180deg, rgba(0, 229, 255, 0.95), rgba(0, 120, 150, 0.85));
      box-shadow:
        0 0 16px rgba(0, 229, 255, 0.35),
        inset 0 0 0 1px rgba(255, 255, 255, 0.25);
      margin-top: -5px;
    }

    .level-slider::-moz-range-thumb,
    .ui-scale-slider::-moz-range-thumb {
      width: 12px;
      height: 18px;
      border-radius: 3px;
      border: 1px solid rgba(0, 229, 255, 0.5);
      background: linear-gradient(180deg, rgba(0, 229, 255, 0.95), rgba(0, 120, 150, 0.85));
      box-shadow:
        0 0 16px rgba(0, 229, 255, 0.35),
        inset 0 0 0 1px rgba(255, 255, 255, 0.25);
    }

    .level-slider::-moz-range-track,
    .ui-scale-slider::-moz-range-track {
      background: transparent;
    }

    .level-slider::-webkit-slider-runnable-track,
    .ui-scale-slider::-webkit-slider-runnable-track {
      appearance: none;
      height: 8px;
    }

    .weapon-layout {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(240px, 280px);
      gap: 22px;
      padding-right: 16px;
      align-items: flex-start;
    }

    .side-column {
      display: flex;
      flex-direction: column;
      gap: 16px;
      align-self: stretch;
      width: min(300px);
    }

.attachments-panel {
  background: rgba(10, 14, 18, 0.9);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-radius: 14px;
  border: 1px solid rgba(0, 229, 255, 0.3);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02), 0 16px 28px rgba(0, 0, 0, 0.35);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  flex: 1;
}

.attachments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(54, 69, 82, 0.35);
  padding-bottom: 10px;
  gap: 12px;
}

.attachments-header h2 {
  margin: 0;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #e5f1fb;
}

    .attachments-separator {
      font-size: 14px;
      color: rgba(160, 178, 192, 0.7);
    }

    .ap-header {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .notes-highlight {
      background: rgba(0, 229, 255, 0.2);
      padding: 0 4px;
      border-radius: 4px;
      box-shadow: 0 0 12px rgba(0, 229, 255, 0.4);
    }

    .notes-color {
      color: var(--accent);
    }

    .ap-readout {
      display: flex;
      align-items: center;
      gap: 4px;
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: rgba(177, 191, 203, 0.95);
      white-space: nowrap;
      padding-left: 4px;
    }

    .ap-readout .ap-value {
      color: var(--text);
    }

    .ap-readout .ap-max {
      color: rgba(132, 145, 156, 0.75);
    }

    .ap-readout.ap-overcap .ap-value {
      color: var(--enemy);
    }

    .ap-readout.ap-overcap .ap-max {
      color: rgba(255, 107, 107, 0.9);
    }

.ap-meter {
  display: flex;
  gap: 3px;
  align-items: center;
}

    .ap-meter.ap-overcap .ap-cell {
      border-color: rgba(255, 59, 59, 0.6);
      background: rgba(45, 15, 18, 0.9);
      box-shadow: 0 0 8px rgba(255, 59, 59, 0.35);
    }

.ap-cell {
  position: relative;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: rgba(22, 26, 32, 0.9);
  border: 1px solid rgba(52, 62, 74, 0.7);
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background var(--transition), border-color var(--transition), opacity var(--transition);
      overflow: hidden;
    }

    .ap-cell .ap-icon {
      position: relative;
      width: 12px;
      height: 12px;
      display: block;
    }

.ap-cell .ap-icon img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) saturate(0) invert(1);
  opacity: 0.55;
  pointer-events: none;
}

.ap-meter.ap-overcap .ap-cell .ap-icon img {
  filter: brightness(0) saturate(0) invert(1);
  opacity: 0.95;
  transform: translateY(-1px);
}

.ap-meter.ap-overcap .ap-cell {
  border-color: rgba(255, 59, 59, 0.7);
  background: linear-gradient(180deg, rgba(60, 18, 18, 0.9), rgba(40, 12, 12, 0.9));
}

.ap-cell.half .ap-icon img,
.ap-cell.full .ap-icon img {
  filter: brightness(0) saturate(0) invert(1);
  opacity: 1;
}

.ap-cell.full .ap-icon img {
  opacity: 1;
  filter: brightness(0) saturate(0) invert(1);
}

    .ap-cell .ap-fill {
      position: absolute;
      inset: 0;
      background: linear-gradient(135deg, rgba(0, 229, 255, 0.9), rgba(0, 229, 255, 0.65));
      opacity: 0;
      transition: opacity var(--transition);
      mix-blend-mode: screen;
      pointer-events: none;
    }

    .ap-meter.ap-overcap .ap-cell .ap-fill {
      background: linear-gradient(135deg, rgba(255, 59, 59, 0.95), rgba(255, 128, 128, 0.75));
    }

    .ap-cell .ap-fill.first {
      clip-path: polygon(0 0, 100% 0, 0 100%);
    }

    .ap-cell .ap-fill.second {
      clip-path: polygon(100% 0, 100% 100%, 0 100%);
    }

.ap-cell.half {
  background: rgba(22, 30, 37, 0.95);
  border-color: rgba(71, 89, 103, 0.85);
}

.ap-cell.half .ap-fill.first {
  opacity: 0.9;
}

.ap-cell.full {
  background: rgba(0, 229, 255, 0.18);
  border-color: rgba(0, 229, 255, 0.75);
}

.ap-cell.full .ap-fill {
  opacity: 1;
}

    .ap-cell .ap-icon {
      width: 12px;
      height: 12px;
    }

    .slots {
      display: flex;
      flex-direction: column;
      gap: 12px;
      position: relative;
    }

    .slot-wrapper {
      display: flex;
      flex-direction: column;
      gap: 8px;
      position: relative;
    }

    .slot-label {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }

.slot-card {
  position: relative;
  z-index: 0;
  background: linear-gradient(180deg, rgba(10, 14, 18, 0.95), rgba(8, 12, 16, 0.92));
  border-radius: 12px;
  border: 1px solid rgba(0, 229, 255, 0.4);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 14px 24px rgba(0, 0, 0, 0.4);
  padding: 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition), transform var(--transition);
  overflow: visible;
}

.build-slot {
  background: rgba(10, 16, 22, 0.92);
  border-color: rgba(45, 70, 90, 0.6);
  box-shadow: none;
}

.build-slot.build-unlocked {
  border-color: rgba(0, 229, 255, 0.7);
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.3), 0 4px 14px rgba(0, 229, 255, 0.16);
  background: linear-gradient(180deg, rgba(10, 18, 25, 0.94), rgba(10, 18, 25, 0.86));
}

.build-slot.build-locked {
  opacity: 0.82;
  border-color: rgba(60, 80, 90, 0.45);
  background: rgba(8, 12, 16, 0.9);
  box-shadow: none;
}

.build-slot.build-unlocked .card-title {
  color: var(--accent);
}

.build-slot.build-locked .card-title {
  color: rgba(150, 164, 178, 0.9);
}

.build-slot.build-locked .card-level {
  border-color: rgba(70, 90, 108, 0.5);
  color: rgba(148, 161, 173, 0.85);
  background: rgba(12, 18, 24, 0.9);
}

.build-slot.build-unlocked .card-level {
  border-color: rgba(0, 229, 255, 0.7);
  background: rgba(0, 229, 255, 0.12);
  color: var(--accent);
}

    .slot-card.tooltip-active {
      z-index: 2000;
    }

    .slot-card.changed {
      /* Fallbacks for browsers without color-mix */
      border-color: rgba(0, 209, 255, 0.70);
      box-shadow: inset 0 0 0 1px rgba(0, 209, 255, 0.35), 0 10px 28px rgba(0, 209, 255, 0.18);
      /* Preferred modern blend (applied via @supports below) */
      background: rgba(12, 26, 32, 0.92);
    }

    .slot-card.old {
      background: rgba(10, 16, 21, 0.85);
      border-color: rgba(34, 43, 51, 0.9);
      color: var(--text-muted);
    }

    .slot-card.old .card-title {
      text-decoration: line-through;
      text-decoration-color: rgba(255, 255, 255, 0.4);
    }

    .slot-card.removed {
      /* Fallback */
      border-color: rgba(255, 59, 59, 0.60);
      /* Preferred (applied via @supports below) */
      background: rgba(28, 12, 14, 0.9);
    }

    .slot-card.removed .card-level {
      /* Fallbacks */
      border-color: rgba(255, 59, 59, 0.5);
      color: rgba(255, 120, 120, 0.9);
      /* Preferred (applied via @supports below) */
    }

    @supports (color: color-mix(in oklab, red 50%, blue 50%)) {
      .slot-card.changed {
        border-color: color-mix(in oklab, var(--ally) 70%, transparent);
        box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--ally) 35%, transparent), 0 10px 28px color-mix(in oklab, var(--ally) 18%, transparent);
      }
      .slot-card.removed {
        border-color: color-mix(in oklab, var(--enemy) 60%, transparent);
      }
      .slot-card.removed .card-level {
        border-color: color-mix(in oklab, var(--enemy) 50%, transparent);
        color: color-mix(in oklab, var(--enemy) 65%, white 35%);
      }
    }

    .slot-card.empty {
      font-style: italic;
      color: var(--text-muted);
      border-style: dashed;
    }

    .slot-card.indented {
      margin-left: var(--indent);
    }

    .card-top {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
    }

    .card-info {
      display: flex;
      flex-direction: column;
      gap: 3px;
      min-width: 0; /* allow truncation inside flex */
    }

.card-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  text-transform: uppercase;
  color: #e9f4ff;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(160, 180, 196, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meta-separator {
  color: rgba(160, 180, 196, 0.8);
  letter-spacing: 0.2em;
}

    .card-meta .meta-type {
      letter-spacing: 0.18em;
      flex: 0 1 auto;
      min-width: 0;
      max-width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .card-meta .meta-separator {
      opacity: 0.6;
      letter-spacing: 0.18em;
      flex: 0 0 auto;
    }

.ap-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(177, 191, 203, 0.9);
  text-transform: uppercase;
  flex: 0 0 auto;
  padding-left: 2px;
}

.ap-inline .ap-num {
  color: #dfe6ed;
}

.ap-inline .ap-icon img {
  display: block;
  width: 10px;
  height: 10px;
  filter: grayscale(0);
  opacity: 0.95;
  transform: translateY(-1px);
  transform: translateY(-1px);
}

    .ap-inline img {
      width: 9px;
      height: 9px;
      filter: grayscale(1) brightness(0.8);
      opacity: 0.85;
    }

    .slot-card.old .ap-inline {
      opacity: 0.7;
    }

.card-level {
  margin-left: auto;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 229, 255, 0.6);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6df1ff;
  white-space: nowrap;
  background: rgba(0, 229, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

    .card-level.has-tooltip {
      position: relative;
      cursor: help;
      z-index: 10;
    }

    .card-level.has-tooltip:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }

    .tooltip-layer {
      position: fixed;
      inset: 0;
      pointer-events: none;
      z-index: 20000;
    }

    .tooltip-bubble {
      pointer-events: none;
      position: fixed;
      left: -9999px;
      top: -9999px;
      transform: translate(-50%, calc(-100% - 20px));
      padding: 12px 16px;
      border-radius: 12px;
      border: 1px solid rgba(0, 229, 255, 0.45);
      background: rgba(9, 14, 20, 0.96);
      box-shadow: 0 18px 36px rgba(0, 0, 0, 0.55);
      min-width: 220px;
      max-width: 280px;
      color: rgba(223, 236, 247, 0.95);
      font-size: 12px;
      line-height: 1.45;
      opacity: 0;
      visibility: hidden;
      transition: opacity 120ms ease, transform 120ms ease;
    }

    .tooltip-bubble::before,
    .tooltip-bubble::after {
      content: '';
      position: absolute;
      top: 100%;
      left: 50%;
      transform: translateX(-50%);
      width: 0;
      height: 0;
      pointer-events: none;
    }

    .tooltip-bubble::before {
      border-left: 13px solid transparent;
      border-right: 13px solid transparent;
      border-top: 13px solid rgba(0, 229, 255, 0.6);
      margin-top: -1px;
    }

    .tooltip-bubble::after {
      border-left: 12px solid transparent;
      border-right: 12px solid transparent;
      border-top: 12px solid rgba(9, 14, 20, 0.96);
      margin-top: -2px;
    }

    .tooltip-bubble.tooltip-visible {
      opacity: 1;
      visibility: visible;
      transform: translate(-50%, calc(-100% - 6px));
    }

    .assignment-tooltip {
      text-transform: uppercase;
      letter-spacing: 0.08em;
    }

    .mastery-tooltip {
      min-width: 200px;
      max-width: 240px;
      font-size: 11px;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      text-align: center;
    }

    .mastery-tooltip .mastery-highlight {
      color: var(--accent);
      font-weight: 700;
    }

    .card-level.mastery-hint .mastery-tooltip {
      min-width: 200px;
      max-width: 240px;
      font-size: 11px;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      text-align: center;
    }

    .mastery-tooltip .mastery-highlight {
      color: var(--accent);
      font-weight: 700;
    }

    .assignment-tooltip-heading {
      font-size: 11px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      margin-bottom: 6px;
      color: var(--accent);
    }

    .assignment-tooltip-list {
      margin: 0;
      padding-left: 18px;
      list-style: disc;
    }

    .assignment-tooltip-list li + li {
      margin-top: 4px;
    }

    .slot-card.changed .card-level {
      border-color: rgba(0, 229, 255, 0.6);
      background: rgba(0, 229, 255, 0.12);
      color: var(--accent);
    }

    .slot-card.old .card-level {
      border-color: rgba(78, 95, 110, 0.35);
      color: rgba(120, 136, 151, 0.9);
    }

    .card-description {
      font-size: 12px;
      color: rgba(173, 187, 198, 0.85);
      line-height: 1.45;
    }

    .arrow-layer {
      position: absolute;
      inset: 0;
      pointer-events: none;
    }

    .arrow-svg {
      position: absolute;
      overflow: visible;
    }

.changes-panel {
  background: rgba(10, 14, 18, 0.9);
  border-radius: 12px;
  border: 1px solid rgba(0, 229, 255, 0.3);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.changes-panel h3 {
  margin: 0;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #e5f1fb;
}

.changes-panel .note-text {
  border: 1px dashed rgba(80, 120, 140, 0.6);
  border-radius: 10px;
  padding: 14px 12px;
  background: rgba(8, 12, 16, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
  color: #dfe6ed;
  font-size: 12px;
  line-height: 1.5;
}

    .build-updated {
      margin-top: 2px;
      font-size: 11px;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      color: var(--text-muted);
      opacity: 0.9;
    }

    /* Recommended build panel matches changes styling */
    .recommended-panel {
      background: rgba(16, 24, 30, 0.92);
      border-radius: 12px;
      border: 1px solid rgba(45, 58, 70, 0.7);
      padding: 16px 18px;
      display: flex;
      flex-direction: column;
      gap: 12px;
      min-height: 0;
    }

    .recommended-panel h3 {
      margin: 0;
      font-size: 14px;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--text-muted);
    }

    .recommended-list {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .recommended-empty {
      padding: 12px;
      border-radius: 10px;
      border: 1px dashed rgba(60, 74, 85, 0.6);
      color: rgba(148, 161, 173, 0.85);
      font-size: 13px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      text-align: center;
    }

    .change-row {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .change-heading {
      font-size: 12px;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: rgba(177, 191, 203, 0.9);
    }

    .change-slot {
      text-decoration: underline;
      text-underline-offset: 2px;
    }

    .change-detail {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 12px;
      color: rgba(148, 161, 173, 0.85);
    }

.change-detail .change-next {
  color: var(--accent);
}

.change-removed {
  color: #ff6161;
}

.change-prev.removed {
  text-decoration: line-through;
  color: rgba(148, 161, 173, 0.65);
}

    .changes-empty {
      padding: 12px;
      border-radius: 10px;
      border: 1px dashed rgba(60, 74, 85, 0.6);
      color: rgba(148, 161, 173, 0.85);
      font-size: 13px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      text-align: center;
    }

    @media (max-width: 960px) {
      .weapon-layout {
        grid-template-columns: 1fr;
      }

      .side-column {
        width: 100%;
      }
    }

    @media (max-width: 720px) {
      body {
        padding: 16px;
      }

      .app {
        padding: 20px;
      }
    }

    /* Layout fix: keep side column within right grid track on wide screens */
    @media (min-width: 960px) {
      .side-column { width: 100%; max-width: 280px; }
    }
  /* Enhanced chip visuals (vibrant + glow) */
    @keyframes chipGlowPulse {
      0%,
      100% {
        box-shadow: 0 0 4px rgba(0, 0, 0, 0.3), 0 0 0 var(--chip-glow-color, rgba(255, 255, 255, 0.2));
      }
      50% {
        box-shadow: 0 0 14px var(--chip-glow-color, rgba(255, 255, 255, 0.35)),
          0 0 var(--chip-glow-spread, 26px) var(--chip-glow-color, rgba(255, 255, 255, 0.35));
      }
    }

    @keyframes chipHueDrift {
      0% {
        background-position: 0% 0%;
      }
      50% {
        background-position: 70% 80%;
      }
      100% {
        background-position: 0% 0%;
      }
    }

    @keyframes metaFireFlow {
      0% {
        background-position: 0% 20%;
      }
      50% {
        background-position: 80% 90%;
      }
      100% {
        background-position: 0% 20%;
      }
    }

    @keyframes metaFirePlume {
      0% {
        transform: scale(0.9) translate(-6%, 6%);
        opacity: 0.4;
      }
      50% {
        transform: scale(1.05) translate(4%, -3%);
        opacity: 0.85;
      }
      100% {
        transform: scale(0.95) translate(-4%, 4%);
        opacity: 0.45;
      }
    }

    @keyframes chipShimmer {
      0% {
        opacity: 0;
        transform: translateX(-130%) rotate(12deg);
      }
      40% {
        opacity: var(--range-shimmer-opacity, 0.35);
      }
      60% {
        opacity: var(--range-shimmer-opacity, 0.35);
      }
      100% {
        opacity: 0;
        transform: translateX(130%) rotate(12deg);
      }
    }


    @keyframes metaCorePulse {
      0%,
      100% {
        transform: scaleY(0.96);
        filter: saturate(1) brightness(1);
      }
      45% {
        transform: scaleY(1.05);
        filter: saturate(1.25) brightness(1.08);
      }
      75% {
        transform: scaleY(1.02);
        filter: saturate(1.15) brightness(1.04);
      }
    }

    .meta-chip.type-chip {
      background: linear-gradient(135deg, rgba(0, 229, 255, 0.24), rgba(0, 229, 255, 0.1));
      border-color: rgba(0, 229, 255, 0.65);
      color: #fff;
      --chip-text-glow: 0 0 8px rgba(0, 229, 255, 0.55);
      box-shadow: 0 0 12px rgba(0, 229, 255, 0.25), inset 0 0 6px rgba(0, 229, 255, 0.25);
    }


    /* Type rating (TR) chips: #1 gold, #2 silver, #3 bronze, #4 dull blue */
    .meta-chip.range-1,
    .meta-chip.range-2,
    .meta-chip.range-3,
    .meta-chip.range-4,
    .meta-chip.range-unranked {
      background-size: 220% 220%;
    }

.meta-chip.range-1 {
  background: linear-gradient(135deg, #ffe57a 0%, #f7c148 45%, #7c4200 100%);
      border-color: rgba(241, 196, 15, 0.85);
      color: #fff;
      --chip-text-glow: 0 0 8px rgba(241, 196, 15, 0.65);
      --chip-glow-color: rgba(255, 214, 130, 0.75);
      --chip-glow-spread: 32px;
      --chip-glow-speed: 2.3s;
      --range-shimmer-color: rgba(255, 249, 220, 0.95);
      --range-shimmer-opacity: 1;
      --range-shimmer-speed: 3s;
      animation: chipGlowPulse var(--chip-glow-speed) ease-in-out infinite, chipHueDrift 10s linear infinite;
    }

    .meta-chip.range-2 {
      background: linear-gradient(135deg, #f0f4f8 0%, #bfc7cc 55%, #3b4750 100%);
      border-color: rgba(191, 199, 204, 0.85);
      color: #fff;
      --chip-text-glow: 0 0 7px rgba(191, 199, 204, 0.55);
      --chip-glow-color: rgba(221, 232, 239, 0.55);
      --chip-glow-spread: 28px;
      --chip-glow-speed: 2.9s;
      --range-shimmer-color: rgba(255, 255, 255, 0.85);
      --range-shimmer-opacity: 0.65;
      --range-shimmer-speed: 4s;
      animation: chipGlowPulse var(--chip-glow-speed) ease-in-out infinite, chipHueDrift 12s linear infinite;
    }

    .meta-chip.range-3 {
      background: linear-gradient(135deg, #f3b26e 0%, #cd7f32 60%, #3a1a08 100%);
      border-color: rgba(205, 127, 50, 0.8);
      color: #fff;
      --chip-text-glow: 0 0 6px rgba(205, 127, 50, 0.45);
      --chip-glow-color: rgba(205, 127, 50, 0.45);
      --chip-glow-spread: 24px;
      --chip-glow-speed: 3.4s;
      --range-shimmer-color: rgba(255, 213, 170, 0.65);
      --range-shimmer-opacity: 0.45;
      --range-shimmer-speed: 5s;
      animation: chipGlowPulse var(--chip-glow-speed) ease-in-out infinite, chipHueDrift 14s linear infinite;
    }

.meta-chip.range-4 {
  background: linear-gradient(135deg, #7c96ab 0%, #4a6273 65%, #101820 100%);
  border-color: rgba(91, 122, 142, 0.75);
  color: #fff;
      --chip-text-glow: 0 0 5px rgba(91, 122, 142, 0.45);
      --chip-glow-color: rgba(112, 142, 162, 0.32);
      --chip-glow-spread: 20px;
      --chip-glow-speed: 4.1s;
      --range-shimmer-color: rgba(255, 255, 255, 0.4);
      --range-shimmer-opacity: 0.2;
      --range-shimmer-speed: 6.2s;
      animation: chipGlowPulse var(--chip-glow-speed) ease-in-out infinite, chipHueDrift 18s linear infinite;
}

.meta-chip.range-5 {
  background: linear-gradient(135deg, #9aa6b1 0%, #5b6874 60%, #11171c 100%);
  border-color: rgba(130, 146, 160, 0.6);
  color: #d9dfe4;
  box-shadow: 0 0 8px rgba(50, 60, 70, 0.35);
}

.meta-chip.range-6 {
  background: linear-gradient(135deg, #7e8892 0%, #48535e 60%, #0d1217 100%);
  border-color: rgba(110, 122, 134, 0.55);
  color: #cfd6dc;
  box-shadow: 0 0 7px rgba(40, 48, 58, 0.3);
}

.meta-chip.range-7 {
  background: linear-gradient(135deg, #5f6872 0%, #323b44 60%, #0b0f13 100%);
  border-color: rgba(86, 96, 106, 0.55);
  color: #c1c8cf;
  box-shadow: 0 0 6px rgba(32, 40, 48, 0.28);
}

.meta-chip.range-8 {
  background: linear-gradient(135deg, #474e57 0%, #242b32 60%, #080a0c 100%);
  border-color: rgba(68, 76, 84, 0.55);
  color: #b3b8be;
  box-shadow: 0 0 5px rgba(24, 28, 32, 0.24);
}

.meta-chip.range-unranked {
  background: linear-gradient(135deg, #3c424a 0%, #1c2228 60%, #06080a 100%);
  border-color: rgba(58, 66, 74, 0.5);
  color: #a9afb6;
  box-shadow: 0 0 4px rgba(16, 20, 24, 0.2);
}

    .meta-chip.range-1::after,
    .meta-chip.range-2::after,
    .meta-chip.range-3::after,
    .meta-chip.range-4::after,
    .meta-chip.range-unranked::after {
      content: "";
      position: absolute;
      inset: -45% -15%;
      border-radius: inherit;
      background: linear-gradient(115deg, transparent 20%, var(--range-shimmer-color, rgba(255, 255, 255, 0.4)) 50%, transparent 80%);
      opacity: 0;
      transform: translateX(-130%) rotate(12deg);
      animation: chipShimmer var(--range-shimmer-speed, 6s) ease-in-out infinite;
      mix-blend-mode: screen;
      z-index: -1;
    }
