:root {
  --bg: #090909;
  --bg-panel: rgba(18, 18, 20, 0.82);
  --bg-panel-strong: rgba(22, 22, 24, 0.94);
  --text: #f4efe4;
  --muted: #b8ae9a;
  --line-strong: rgba(228, 170, 95, 0.4);
  --accent: #e29a5a;
  --accent-strong: #c76f36;
  --success: #61b988;
  --danger: #cf6a6a;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --max-width: 1220px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(93, 115, 141, 0.13), transparent 24%),
    radial-gradient(circle at top right, rgba(226, 154, 90, 0.12), transparent 28%),
    linear-gradient(180deg, #080809 0%, #0d0d0e 40%, #080809 100%);
  color: var(--text);
  font-family: "Manrope", sans-serif;
}

body.has-editor-open {
  overflow: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  width: 28rem;
  height: 28rem;
  border-radius: 999px;
  filter: blur(70px);
  pointer-events: none;
  opacity: 0.22;
  z-index: 0;
}

body::before {
  top: -10rem;
  left: -8rem;
  background: rgba(226, 154, 90, 0.18);
}

body::after {
  right: -8rem;
  bottom: 3rem;
  background: rgba(93, 115, 141, 0.16);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-header,
.app-footer,
.page-wrap {
  position: relative;
  z-index: 1;
}

.app-header {
  z-index: 40;
}

.page-wrap {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
  padding: 7.5rem 0 4rem;
}

.app-nav {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 41;
  width: min(calc(100% - 2rem), var(--max-width));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(10, 10, 12, 0.62);
  backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: var(--shadow);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-mark {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(circle at center, rgba(226, 154, 90, 0.55), transparent 36%),
    radial-gradient(circle at center, rgba(93, 115, 141, 0.35), transparent 75%),
    #0c0d10;
  box-shadow:
    inset 0 0 0 6px rgba(255, 255, 255, 0.02),
    0 0 22px rgba(226, 154, 90, 0.15);
}

.brand-copy,
.player-link {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.brand-copy strong,
.hero-copy h1,
.section-header h2,
.tool-card h3,
.page-banner h1,
.detail-header h1,
.build-card h3,
.tier-card h3,
.detail-card h3,
.command-preview h3,
.command-mode-title {
  font-family: "Cinzel", serif;
}

.brand-copy strong {
  font-size: 0.95rem;
  letter-spacing: 0.2em;
}

.brand-copy span {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-links a {
  color: rgba(244, 239, 228, 0.72);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--text);
}

.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.nav-badge,
.status-badge,
.rank-badge,
.tag,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
}

.nav-badge {
  min-height: 2.5rem;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nav-auth-user {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.nav-auth-avatar {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-auth-status {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.hover-tooltip {
  position: fixed;
  z-index: 90;
  width: min(22rem, calc(100vw - 1.5rem));
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(226, 154, 90, 0.34);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(23, 22, 25, 0.98), rgba(12, 12, 14, 0.96)),
    rgba(12, 12, 14, 0.96);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  pointer-events: none;
}

.hover-tooltip-title {
  font-family: "Cinzel", serif;
  font-size: 0.95rem;
  line-height: 1.2;
  color: var(--text);
}

.hover-tooltip-section + .hover-tooltip-section {
  margin-top: 0.55rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.hover-tooltip-heading {
  margin-bottom: 0.22rem;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hover-tooltip-line,
.hover-tooltip-item {
  color: rgba(244, 239, 228, 0.9);
  font-size: 0.78rem;
  line-height: 1.45;
}

.hover-tooltip-item {
  position: relative;
  padding-left: 0.75rem;
}

.hover-tooltip-item::before {
  content: "";
  position: absolute;
  top: 0.52rem;
  left: 0.12rem;
  width: 0.28rem;
  height: 0.28rem;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(226, 154, 90, 0.25);
}

.app-footer {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
  padding: 0 0 2.5rem;
}

.footer-card,
.surface-card,
.page-banner,
.control-panel,
.filter-panel,
.leaderboard-shell,
.command-shell,
.detail-shell,
.build-card,
.tier-card,
.detail-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.024), rgba(255, 255, 255, 0.01)),
    var(--bg-panel);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.footer-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  color: var(--muted);
}

.button,
.chip-button,
.small-button,
.tab-button {
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.button:hover,
.small-button:hover,
.chip-button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #1e1208;
}

.button-secondary,
.small-button,
.tab-button,
.chip-button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.button-secondary:hover,
.small-button:hover,
.tab-button:hover,
.chip-button:hover {
  border-color: var(--line-strong);
  background: rgba(226, 154, 90, 0.08);
}

.small-button,
.tab-button,
.chip-button {
  min-height: 2.5rem;
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.small-button.is-danger {
  border-color: rgba(207, 106, 106, 0.4);
  color: #f0c2c2;
}

.small-button.is-primary-action {
  border-color: rgba(226, 154, 90, 0.38);
  background: rgba(226, 154, 90, 0.14);
}

.small-button.is-active,
.chip-button.is-active,
.tab-button.is-active {
  border-color: var(--line-strong);
  background: linear-gradient(135deg, rgba(226, 154, 90, 0.2), rgba(199, 111, 54, 0.12));
}

.button-ghost {
  border: 1px solid rgba(207, 106, 106, 0.3);
  background: rgba(207, 106, 106, 0.08);
  color: #f0c2c2;
}

.button-ghost:hover {
  border-color: rgba(207, 106, 106, 0.5);
  background: rgba(207, 106, 106, 0.14);
}

.chip-button.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.hero-block,
.tool-grid,
.stat-grid,
.two-column-section,
.page-banner-grid,
.leaderboard-toolbar,
.detail-grid,
.command-mode-grid,
.build-layout,
.filter-panel,
.build-studio-grid,
.picker-grid {
  display: grid;
  gap: 1rem;
}

.hero-block {
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
}

.hero-copy,
.hero-panel,
.page-banner,
.control-panel,
.filter-panel,
.leaderboard-shell,
.command-shell,
.detail-shell {
  border-radius: var(--radius);
}

.hero-copy {
  padding: 2.5rem;
  background:
    radial-gradient(circle at top right, rgba(226, 154, 90, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    var(--bg-panel-strong);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-panel,
.surface-card,
.build-card,
.tier-card,
.detail-card {
  padding: 1.2rem;
  border-radius: var(--radius);
}

.eyebrow,
.card-label,
.tool-kicker,
.meta-row {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-banner h1,
.detail-header h1 {
  margin: 0.9rem 0 1rem;
  line-height: 0.96;
}

.hero-copy h1 {
  font-size: clamp(2.8rem, 6vw, 5rem);
  max-width: 11ch;
}

.page-banner h1,
.detail-header h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  max-width: none;
}

.hero-text,
.page-banner p,
.tool-card p,
.activity-card p,
.note-row span,
.empty-state p,
.build-meta,
.card-note,
.help-text {
  color: var(--muted);
  line-height: 1.7;
}

.hero-actions,
.tab-row,
.button-row,
.chip-row,
.season-row,
.region-row,
.toolbar-row,
.tag-row,
.card-actions,
.row-stack {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.bullet-list {
  margin: 1rem 0 0;
  padding-left: 1rem;
  color: var(--muted);
  line-height: 1.8;
}

.stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 1.25rem;
}

.stat-card {
  padding: 1.2rem;
  border-radius: var(--radius-sm);
}

.stat-card strong {
  display: block;
  margin-top: 0.4rem;
  font-size: 1.4rem;
}

.stat-card span {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-block {
  margin-top: 1.5rem;
  padding: 1.4rem;
  border-radius: var(--radius);
}

.section-header {
  margin-bottom: 1rem;
}

.section-header h2 {
  margin: 0.6rem 0 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.08;
}

.section-header.compact h2 {
  font-size: 1.8rem;
}

.tool-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tool-card h3 {
  margin: 0.8rem 0 0.6rem;
  font-size: 1.4rem;
}

.tool-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
}

.two-column-section {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  margin-top: 1.5rem;
}

.activity-feed,
.note-stack,
.tier-preview,
.match-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.activity-card,
.note-row,
.match-row,
.slot,
.command-preview,
.summary-chip {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.activity-card,
.note-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
}

.page-banner {
  padding: 2rem;
  margin-bottom: 1.25rem;
}

.page-banner-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(250px, 0.75fr);
}

.banner-note {
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.control-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.2rem;
}

.filter-panel {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  padding: 1.2rem;
  margin-top: 1rem;
}

.build-editor-shell {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.build-editor-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.build-studio-grid {
  grid-template-columns: 1fr;
  align-items: start;
}

.compact-build-studio {
  padding: 1rem;
}

.compact-build-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) auto;
  gap: 0.85rem;
  align-items: end;
  margin-bottom: 0.9rem;
}

.compact-name-field input {
  min-height: 2.6rem;
}

.compact-build-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
}

.compact-build-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.compact-build-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 0.8rem;
  align-items: start;
}

.build-stage {
  padding: 0.8rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.012)),
    rgba(255, 255, 255, 0.012);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.build-stage.is-wide {
  grid-column: 1 / -1;
}

.build-stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.55rem;
}

.build-stage-header .card-label {
  letter-spacing: 0.16em;
}

.build-stage .picker-section.is-bare {
  padding: 0;
  border: none;
  background: transparent;
}

.build-stage .picker-section.is-bare .picker-header {
  margin-bottom: 0.55rem;
}

.build-picker-stack {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.slot-strip {
  display: grid;
  gap: 0.55rem;
}

.slot-strip-core {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.slot-strip-passives {
  grid-template-columns: repeat(5, minmax(64px, max-content));
  justify-content: flex-start;
}

.studio-slot,
.passive-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 4.7rem;
  padding: 0.6rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 8, 10, 0.78);
  color: var(--text);
}

.studio-slot {
  gap: 0.55rem;
  justify-content: flex-start;
  text-align: left;
}

.studio-slot.is-compact {
  flex-direction: column;
  gap: 0.4rem;
  min-height: 0;
  padding: 0.55rem 0.45rem;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(10, 11, 15, 0.96), rgba(7, 8, 11, 0.98));
  text-align: center;
}

.studio-slot.is-compact .studio-slot-image {
  width: 2.95rem;
  height: 2.95rem;
}

.studio-slot.is-compact .studio-slot-copy {
  gap: 0;
}

.studio-slot.is-compact .studio-slot-copy span {
  display: none;
}

.studio-slot.is-compact .studio-slot-copy strong {
  font-size: 0.82rem;
  white-space: normal;
  line-height: 1.1;
}

.studio-slot.is-build-slot {
  min-height: 5.15rem;
  padding: 0.22rem 0.3rem 0.34rem;
  gap: 0.22rem;
}

.studio-slot.is-build-slot .studio-slot-image {
  width: 4.15rem;
  height: 4.15rem;
  border-radius: 18px;
}

.studio-slot.is-build-slot .studio-slot-copy strong {
  font-size: 0.74rem;
  line-height: 1;
}

.summary-chip {
  padding: 0.35rem 0.7rem;
  font-size: 0.72rem;
}

.studio-slot:hover,
.passive-slot:hover {
  border-color: rgba(226, 154, 90, 0.35);
  background: rgba(226, 154, 90, 0.08);
}

.studio-slot-image,
.passive-slot-image {
  width: 2.7rem;
  height: 2.7rem;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.studio-slot-copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.studio-slot-copy strong,
.studio-slot-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-slot-copy span {
  color: var(--muted);
  font-size: 0.86rem;
}

.passive-slot {
  width: 4.15rem;
  height: 4.15rem;
  min-height: 0;
  padding: 0.18rem;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(36, 38, 44, 0.96), rgba(9, 10, 13, 0.98));
}

.passive-slot-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.passive-slot-plus {
  color: var(--muted);
  font-size: 1.8rem;
  line-height: 1;
}

.editor-section-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0.25rem 0 -0.15rem;
  color: var(--muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.editor-section-title span {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
}

.editor-section-title small {
  color: var(--muted);
  font-size: 0.7rem;
}

.build-preview-card {
  position: static;
}

.picker-section {
  padding: 0.85rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.65rem;
}

.picker-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.picker-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.editor-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1.25rem;
  overflow-y: auto;
  background: rgba(4, 5, 8, 0.7);
  backdrop-filter: blur(10px);
  z-index: 30;
}

.editor-popup {
  width: min(920px, calc(100vw - 1.5rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  margin: 0 auto;
  padding: 0.9rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(14, 16, 20, 0.98), rgba(8, 9, 12, 0.98));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.compact-editor-popup {
  width: min(780px, calc(100vw - 1.5rem));
}

.picker-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  min-height: 7.2rem;
  padding: 0.65rem;
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 8, 10, 0.78);
  color: var(--text);
  text-align: center;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.picker-option:hover {
  transform: translateY(-2px);
  border-color: rgba(226, 154, 90, 0.35);
  background: rgba(226, 154, 90, 0.08);
}

.picker-option.is-active {
  border-color: var(--line-strong);
  background: linear-gradient(180deg, rgba(226, 154, 90, 0.14), rgba(255, 255, 255, 0.03));
}

.picker-option.is-disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.picker-image {
  width: 3.05rem;
  height: 3.05rem;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.picker-option span {
  font-size: 0.74rem;
  line-height: 1.3;
}

.coating-picker-option.school-blood {
  border-color: rgba(191, 52, 52, 0.42);
  background: linear-gradient(180deg, rgba(191, 52, 52, 0.12), rgba(8, 8, 10, 0.78));
}

.coating-picker-option.school-chaos {
  border-color: rgba(255, 135, 58, 0.42);
  background: linear-gradient(180deg, rgba(255, 135, 58, 0.12), rgba(8, 8, 10, 0.78));
}

.coating-picker-option.school-frost {
  border-color: rgba(76, 173, 255, 0.42);
  background: linear-gradient(180deg, rgba(76, 173, 255, 0.12), rgba(8, 8, 10, 0.78));
}

.coating-picker-option.school-illusion {
  border-color: rgba(120, 226, 255, 0.42);
  background: linear-gradient(180deg, rgba(120, 226, 255, 0.12), rgba(8, 8, 10, 0.78));
}

.coating-picker-option.school-storm {
  border-color: rgba(239, 245, 92, 0.42);
  background: linear-gradient(180deg, rgba(239, 245, 92, 0.12), rgba(8, 8, 10, 0.78));
}

.coating-picker-option.school-unholy {
  border-color: rgba(95, 198, 46, 0.42);
  background: linear-gradient(180deg, rgba(95, 198, 46, 0.12), rgba(8, 8, 10, 0.78));
}

.coating-picker-option.is-active {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.commands-panel {
  grid-template-columns: 1fr;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field-group label,
.meta-row {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.field-group input,
.field-group select,
.search-input {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 11, 14, 0.92);
  color: #f3efe7;
}

.field-group select option {
  background: #121418;
  color: #f3efe7;
}

.list-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.build-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.build-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 21rem) auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
}

.build-list-main {
  min-width: 0;
}

.build-list-title-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.build-list-title {
  font-size: 1rem;
}

.build-card-header,
.tier-card-header,
.detail-header,
.detail-grid,
.command-preview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.build-card-header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.build-card h3,
.tier-card h3,
.detail-card h3,
.command-preview h3 {
  margin: 0;
  font-size: 1.15rem;
}

.identity-row,
.asset-line {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.identity-row {
  align-items: flex-start;
}

.media-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.media-icon-lg {
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 14px;
}

.build-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 1rem 0;
}

.featured-loadout {
  margin-bottom: 1rem;
}

.weapon-loadout {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0;
}

.weapon-mods-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.weapon-mod-preview,
.weapon-mod-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.weapon-mod-preview {
  margin-top: 0.85rem;
}

.weapon-loadout-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.weapon-loadout-main,
.weapon-loadout-side {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.weapon-loadout-main {
  min-width: 0;
}

.weapon-loadout-main strong {
  display: block;
}

.weapon-loadout-side {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.slot {
  padding: 0.75rem;
}

.slot span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.slot strong {
  display: block;
  line-height: 1.45;
}

.slot-note {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.tag,
.pill,
.status-badge,
.rank-badge,
.summary-chip {
  min-height: 1.9rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.tag.is-copy-code {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  max-width: min(100%, 21rem);
  cursor: pointer;
  text-align: left;
  border-color: rgba(226, 154, 90, 0.28);
  background: rgba(226, 154, 90, 0.12);
  color: #f6ead9;
}

.tag.is-copy-code:hover {
  border-color: var(--line-strong);
  background: rgba(226, 154, 90, 0.18);
}

.tag-label {
  flex: 0 0 auto;
}

.tag-copy-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff5e8;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.status-badge.is-public {
  color: #d7f5e4;
  border-color: rgba(97, 185, 136, 0.35);
  background: rgba(97, 185, 136, 0.15);
}

.status-badge.is-private {
  border-color: rgba(226, 154, 90, 0.28);
  background: rgba(226, 154, 90, 0.1);
}

.rank-badge.is-top {
  border-color: rgba(226, 154, 90, 0.35);
  background: rgba(226, 154, 90, 0.12);
}

.empty-state {
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px dashed rgba(255, 255, 255, 0.16);
  text-align: center;
}

.scroll-sentinel {
  min-height: 2rem;
}

.tier-row {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 0.5rem;
}

.tier-label {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #190f08;
  font-weight: 900;
}

.tier-s {
  background: linear-gradient(135deg, #efb36c, #e38d43);
}

.tier-a {
  background: linear-gradient(135deg, #f0d46f, #d8a543);
}

.tier-b {
  background: linear-gradient(135deg, #9bc68f, #62a16e);
}

.tier-c {
  background: linear-gradient(135deg, #80b3dc, #5f7ea5);
}

.tier-d {
  background: linear-gradient(135deg, #9677b4, #6d588a);
}

.tier-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.45rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.leaderboard-shell,
.command-shell,
.detail-shell {
  padding: 1.2rem;
}

.leaderboard-toolbar {
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 1rem;
}

.summary-strip {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.table-shell {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: rgba(255, 255, 255, 0.03);
}

th,
td {
  padding: 0.95rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

th button {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.rank-cell {
  width: 72px;
  text-align: center;
  font-weight: 800;
}

.player-link small,
.subtle {
  color: var(--muted);
}

.command-tabs {
  margin-bottom: 1rem;
}

.command-mode-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.command-string {
  margin: 0.75rem 0 0;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-word;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.match-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  min-width: 220px;
  max-width: 360px;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 10, 12, 0.92);
  box-shadow: var(--shadow);
  z-index: 20;
}

.toast.is-success {
  border-color: rgba(97, 185, 136, 0.35);
}

.toast.is-error {
  border-color: rgba(207, 106, 106, 0.35);
}

@media (max-width: 1100px) {
  .hero-block,
  .tool-grid,
  .two-column-section,
  .page-banner-grid,
  .leaderboard-toolbar,
  .detail-grid,
  .command-mode-grid,
  .card-grid,
  .build-studio-grid,
  .compact-build-grid {
    grid-template-columns: 1fr;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .picker-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .compact-build-toolbar {
    grid-template-columns: 1fr;
  }

  .compact-build-actions {
    align-items: flex-start;
  }

  .compact-build-chips {
    justify-content: flex-start;
  }

  .weapon-mods-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .app-nav {
    top: 0.75rem;
    width: calc(100% - 1rem);
    padding: 0.85rem 1rem;
  }

  .nav-links,
  .nav-badge {
    display: none;
  }

  .nav-actions {
    margin-left: auto;
  }

  .nav-auth-status {
    display: none;
  }

  .page-wrap,
  .app-footer {
    width: calc(100% - 1rem);
  }

  .page-wrap {
    padding-top: 6.5rem;
  }

  .filter-panel {
    grid-template-columns: 1fr 1fr;
  }

  .build-layout,
  .match-row,
  .weapon-loadout-row {
    grid-template-columns: 1fr;
  }

  .build-preview-card {
    position: static;
  }

  .weapon-loadout-row {
    display: grid;
  }

  .weapon-loadout-side {
    justify-content: flex-start;
  }

  .picker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .slot-strip-core {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .slot-strip-passives {
    grid-template-columns: repeat(5, minmax(56px, 1fr));
  }

  .build-editor-switch {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 620px) {
  .stat-grid,
  .filter-panel,
  .detail-grid,
  .picker-grid {
    grid-template-columns: 1fr;
  }

  .footer-card,
  .control-panel,
  .list-meta,
  .detail-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

.build-summary-stack,
.summary-block,
.weapon-builder-shell,
.passive-group {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.weapon-zone-grid,
.blood-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.weapon-bar-scroll {
  overflow-x: auto;
  padding-bottom: 0.35rem;
}

.weapon-bar-grid {
  display: grid;
  grid-template-columns: repeat(8, 3.65rem);
  justify-content: flex-start;
  gap: 0.38rem;
  min-width: 0;
  margin: 0.2rem 0 0.15rem;
}

.weapon-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.22rem;
  min-height: auto;
  padding: 0.05rem 0;
  border-radius: 12px;
  overflow: hidden;
}

.weapon-slot.is-drag-over,
.inventory-dropzone.is-drag-over {
  border-color: rgba(226, 154, 90, 0.65);
  background: rgba(226, 154, 90, 0.08);
}

.weapon-slot-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 0.14rem;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(8, 8, 10, 0.8));
  overflow: hidden;
}

.weapon-slot.is-filled .weapon-slot-frame {
  border-style: solid;
}

.weapon-slot.is-selected .weapon-slot-frame {
  box-shadow: 0 0 0 2px rgba(226, 154, 90, 0.42);
}

.weapon-slot-empty {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: transparent;
}

.weapon-bar-token {
  display: flex;
  position: relative;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(8, 8, 10, 0.96);
  cursor: pointer;
}

.weapon-slot-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.weapon-slot-hotkey {
  min-width: 1.6rem;
  padding: 0.08rem 0.3rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.coating-bar-scroll {
  padding-bottom: 0;
}

.coating-bar-grid {
  display: grid;
  grid-template-columns: repeat(8, 3.65rem);
  justify-content: flex-start;
  gap: 0.38rem;
  min-width: 0;
}

.coating-slot {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: center;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text);
  text-align: center;
}

.coating-slot.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.coating-slot-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 0.16rem;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  position: relative;
}

.coating-slot-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(8, 8, 10, 0.95);
}

.coating-slot-empty {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.15;
}

.coating-slot-empty {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.weapon-infusion-badge {
  position: absolute;
  top: 0.18rem;
  left: 0.18rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.18rem;
  height: 1.18rem;
  padding: 0.1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgb(10, 11, 15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  overflow: hidden;
}

.weapon-infusion-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transform: translateY(-100px);
}

.weapon-infusion-badge.is-token {
  top: -0.16rem;
  left: -0.16rem;
  width: 1.22rem;
  height: 1.22rem;
}

.weapon-infusion-badge.school-blood {
  border-color: rgb(196, 33, 66);
  background: rgb(53, 13, 23);
}

.weapon-infusion-badge.school-chaos {
  border-color: rgb(222, 91, 251);
  background: rgb(53, 22, 60);
}

.weapon-infusion-badge.school-frost {
  border-color: rgb(0, 159, 249);
  background: rgb(10, 33, 51);
}

.weapon-infusion-badge.school-illusion {
  border-color: rgb(57, 223, 185);
  background: rgb(11, 48, 42);
}

.weapon-infusion-badge.school-storm {
  border-color: rgb(253, 255, 93);
  background: rgb(57, 57, 18);
}

.weapon-infusion-badge.school-unholy {
  border-color: rgb(73, 179, 18);
  background: rgb(20, 46, 10);
}

.weapon-infusion-badge img.school-blood {
  filter: drop-shadow(0 100px 0 rgba(196, 33, 66, 1));
}

.weapon-infusion-badge img.school-chaos {
  filter: drop-shadow(0 100px 0 rgba(222, 91, 251, 1));
}

.weapon-infusion-badge img.school-frost {
  filter: drop-shadow(0 100px 0 rgba(0, 159, 249, 1));
}

.weapon-infusion-badge img.school-illusion {
  filter: drop-shadow(0 100px 0 rgba(57, 223, 185, 1));
}

.weapon-infusion-badge img.school-storm {
  filter: drop-shadow(0 100px 0 rgba(253, 255, 93, 1));
}

.weapon-infusion-badge img.school-unholy {
  filter: drop-shadow(0 100px 0 rgba(73, 179, 18, 1));
}

.inventory-dropzone {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  min-height: 7rem;
  margin: 1rem 0;
  padding: 0.85rem;
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.02);
}

.weapon-token {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.7rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(7, 8, 12, 0.78);
}

.weapon-token-art {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.weapon-token.is-compact {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  min-height: 0;
  padding: 0.55rem;
  text-align: center;
  overflow: hidden;
  max-width: 100%;
}

.weapon-token.is-compact .media-icon {
  width: 2.9rem;
  height: 2.9rem;
}

.weapon-token.is-compact .weapon-token-copy {
  width: 100%;
}

.weapon-token.is-compact .weapon-token-copy strong {
  font-size: 0.85rem;
  line-height: 1.1;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.weapon-token-meta {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.1;
}

.weapon-token-copy {
  min-width: 0;
}

.weapon-token-copy strong {
  display: block;
}

.rarity-legendary {
  border-color: rgba(145, 111, 255, 0.42);
  box-shadow: inset 0 0 0 1px rgba(145, 111, 255, 0.08);
}

.rarity-ancestral {
  border-color: rgba(255, 150, 76, 0.42);
  box-shadow: inset 0 0 0 1px rgba(255, 150, 76, 0.08);
}

.rarity-badge.rarity-legendary {
  color: #eadfff;
  background: rgba(145, 111, 255, 0.18);
  border-color: rgba(145, 111, 255, 0.32);
}

.rarity-badge.rarity-ancestral {
  color: #ffe6cd;
  background: rgba(255, 150, 76, 0.18);
  border-color: rgba(255, 150, 76, 0.32);
}

.weapon-library {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.weapon-library-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) auto auto;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.weapon-library-main {
  min-width: 0;
}

.weapon-library-meta,
.weapon-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.weapon-actions {
  justify-content: flex-end;
}

.weapon-slot-field {
  min-width: 9rem;
}

.weapon-config-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}

.weapon-editor-steps {
  display: flex;
  gap: 0.45rem;
  margin-bottom: 0.7rem;
}

.step-chip {
  min-height: 2rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.step-chip.is-active {
  color: var(--text);
  border-color: rgba(226, 154, 90, 0.38);
  background: rgba(226, 154, 90, 0.1);
}

.weapon-step-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.weapon-rarity-field {
  max-width: 18rem;
}

.weapon-mod-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.infusion-picker-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.45rem;
}

.infusion-picker-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.28rem;
  min-height: 0;
  padding: 0.45rem 0.35rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 8, 10, 0.82);
  color: var(--text);
  text-align: center;
}

.infusion-picker-option:hover {
  border-color: rgba(226, 154, 90, 0.35);
  background: rgba(226, 154, 90, 0.08);
}

.infusion-picker-option.is-active {
  border-color: rgba(226, 154, 90, 0.48);
  background: linear-gradient(180deg, rgba(226, 154, 90, 0.12), rgba(255, 255, 255, 0.03));
}

.infusion-picker-option.school-blood {
  border-color: rgba(196, 33, 66, 0.34);
  background: rgba(53, 13, 23, 0.82);
}

.infusion-picker-option.school-chaos {
  border-color: rgba(222, 91, 251, 0.34);
  background: rgba(53, 22, 60, 0.82);
}

.infusion-picker-option.school-frost {
  border-color: rgba(0, 159, 249, 0.34);
  background: rgba(10, 33, 51, 0.82);
}

.infusion-picker-option.school-illusion {
  border-color: rgba(57, 223, 185, 0.34);
  background: rgba(11, 48, 42, 0.82);
}

.infusion-picker-option.school-storm {
  border-color: rgba(253, 255, 93, 0.34);
  background: rgba(57, 57, 18, 0.82);
}

.infusion-picker-option.school-unholy {
  border-color: rgba(73, 179, 18, 0.34);
  background: rgba(20, 46, 10, 0.82);
}

.infusion-picker-option .picker-image {
  width: 2.35rem;
  height: 2.35rem;
  transform: translateY(-100px);
}

.infusion-picker-option .picker-image.school-blood {
  filter: drop-shadow(0 100px 0 rgba(196, 33, 66, 1));
}

.infusion-picker-option .picker-image.school-chaos {
  filter: drop-shadow(0 100px 0 rgba(222, 91, 251, 1));
}

.infusion-picker-option .picker-image.school-frost {
  filter: drop-shadow(0 100px 0 rgba(0, 159, 249, 1));
}

.infusion-picker-option .picker-image.school-illusion {
  filter: drop-shadow(0 100px 0 rgba(57, 223, 185, 1));
}

.infusion-picker-option .picker-image.school-storm {
  filter: drop-shadow(0 100px 0 rgba(253, 255, 93, 1));
}

.infusion-picker-option .picker-image.school-unholy {
  filter: drop-shadow(0 100px 0 rgba(73, 179, 18, 1));
}

.infusion-picker-option span {
  font-size: 0.68rem;
  line-height: 1.1;
}

.weapon-mod-toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.weapon-mod-toggle {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 0.8rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 8, 10, 0.88);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.weapon-mod-toggle:hover {
  border-color: rgba(226, 154, 90, 0.35);
  background: rgba(226, 154, 90, 0.08);
}

.weapon-mod-toggle.is-active {
  border-color: rgba(226, 154, 90, 0.48);
  background: linear-gradient(180deg, rgba(226, 154, 90, 0.12), rgba(255, 255, 255, 0.03));
}

.weapon-mod-toggle-box {
  display: inline-flex;
  width: 1.15rem;
  height: 1.15rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.28rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.72rem;
  font-weight: 900;
}

.weapon-picker-grid,
.passive-picker-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.weapon-builder-preview {
  margin-top: 0.5rem;
}

.weapon-editor-actions {
  position: sticky;
  bottom: -0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: 0.2rem;
  padding: 0.8rem 0 0.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(14, 16, 20, 0), rgba(14, 16, 20, 0.96) 40%, rgba(14, 16, 20, 0.99));
}

.weapon-editor-primary {
  min-width: 11rem;
}

.weapon-selected-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 0.15rem;
  padding: 0.85rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.passive-grid {
  display: grid;
  gap: 1rem;
}

.ability-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.ability-slot {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.6rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 8, 10, 0.8);
  color: var(--text);
  text-align: left;
}

.ability-slot.is-compact {
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 0.38rem;
  padding: 0.52rem 0.4rem;
  text-align: center;
}

.ability-slot:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.ability-slot.is-active {
  border-color: rgba(226, 154, 90, 0.48);
  background: linear-gradient(180deg, rgba(226, 154, 90, 0.16), rgba(255, 255, 255, 0.03));
  box-shadow: inset 0 0 0 1px rgba(226, 154, 90, 0.12);
}

.ability-slot-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.4rem;
  height: 4.4rem;
  padding: 0;
  border-radius: 12px;
  background: transparent;
  position: relative;
  overflow: hidden;
}

.ability-slot-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  z-index: 2;
}

.ability-slot-frame.is-veil::before {
  background-image: url("/images/ui/ability-frame-veil.png");
}

.ability-slot-frame.is-spell::before {
  background-image: url("/images/ui/ability-frame-spell.png");
}

.ability-slot-frame.is-ultimate::before {
  background-image: url("/images/ui/ability-frame-ultimate.png");
}

.ability-slot-frame.is-empty-frame::before {
  display: none;
}

.ability-slot-image {
  width: calc(100% - 0.72rem);
  height: calc(100% - 0.72rem);
  object-fit: cover;
  border-radius: 0;
  background: rgba(8, 8, 10, 0.96);
  position: relative;
  z-index: 1;
}

.ability-slot-copy {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 0;
}

.ability-slot-copy strong,
.ability-slot-copy span,
.ability-slot-copy small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ability-slot-copy span {
  font-weight: 700;
  font-size: 0.92rem;
}

.ability-slot-copy small {
  color: var(--muted);
  font-size: 0.76rem;
}

.ability-slot.is-compact .ability-slot-frame {
  width: 3.8rem;
  height: 3.8rem;
}

.ability-slot-frame.is-ultimate .ability-slot-image {
  width: calc(100% - 0.92rem);
  height: calc(100% - 0.92rem);
}

.ability-slot.is-empty .ability-slot-image {
  object-fit: contain;
  width: 100%;
  height: 100%;
  padding: 0.3rem;
  background: rgba(9, 10, 14, 0.98);
}

.ability-slot.is-empty .ability-slot-copy span {
  color: var(--muted);
}

.ability-slot.is-compact .ability-slot-copy {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ability-slot.is-compact .ability-slot-copy strong {
  font-size: 0.76rem;
  line-height: 1;
  white-space: nowrap;
}

.ability-slot.is-compact .ability-slot-copy span,
.ability-slot.is-compact .ability-slot-copy small {
  display: none;
}

.ability-slot-jewel {
  position: absolute;
  right: -0.15rem;
  bottom: -0.15rem;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.18rem;
  border-radius: 999px;
  border: 1px solid rgba(10, 11, 15, 0.96);
  background: rgba(226, 154, 90, 0.94);
  color: #1d1309;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1rem;
  text-align: center;
}

.ability-editor-panel {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.jewel-effects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.jewel-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.85rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 8, 10, 0.78);
  color: var(--text);
  text-align: left;
}

.jewel-option.is-active {
  border-color: var(--line-strong);
  background: linear-gradient(180deg, rgba(226, 154, 90, 0.14), rgba(255, 255, 255, 0.03));
}

.blood-editor-popup {
  width: min(960px, calc(100vw - 1.5rem));
}

.blood-picker-section {
  padding-top: 0.7rem;
}

.blood-editor-note {
  margin-bottom: 0.85rem;
}

.blood-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1rem;
}

.blood-buff-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.blood-buff-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0.85rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 8, 10, 0.78);
  color: var(--text);
  text-align: left;
}

.blood-buff-item span {
  color: var(--muted);
  font-size: 0.92rem;
}

.blood-buff-item.is-selected {
  border-color: rgba(226, 154, 90, 0.48);
  background: linear-gradient(180deg, rgba(226, 154, 90, 0.22), rgba(255, 255, 255, 0.04));
  box-shadow:
    inset 0 0 0 1px rgba(226, 154, 90, 0.18),
    0 0 0 1px rgba(226, 154, 90, 0.06);
}

.blood-buff-item.is-selected strong {
  color: #fff3e2;
}

.blood-buff-item.is-selected span {
  color: rgba(255, 226, 196, 0.92);
}

.blood-buff-item.is-always-on {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

@media (max-width: 980px) {
  .weapon-zone-grid,
  .blood-summary-grid,
  .weapon-config-grid {
    grid-template-columns: 1fr;
  }

  .weapon-library-row {
    grid-template-columns: 1fr;
  }

  .ability-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .jewel-effects-grid,
  .weapon-picker-grid,
  .passive-picker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ability-bar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .jewel-effects-grid,
  .weapon-picker-grid,
  .passive-picker-grid {
    grid-template-columns: 1fr;
  }
}
