/* Unified game database */
.database-panel { padding: 16px; min-width: 0; }
.database-panel-header {
  min-height: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.database-panel-header h2 { margin: 0; }
.database-panel-header .pets-summary {
  flex: 0 0 auto;
  flex-wrap: nowrap;
}
.database-entity-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 0;
  border-block: 1px solid var(--line);
}
.database-entity-tab {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  color: var(--muted);
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(4, 20, 31, 0.5);
}
.database-entity-tab.active {
  color: var(--text);
  border-color: rgba(92, 220, 210, 0.68);
  background: rgba(28, 93, 101, 0.24);
  box-shadow: inset 0 0 0 1px rgba(92, 220, 210, 0.1);
}
.database-entity-tab > span:nth-child(2) { min-width: 0; display: grid; }
.database-entity-tab strong { color: inherit; font-size: 0.92rem; }
.database-entity-tab small {
  overflow: hidden;
  font-size: 0.69rem;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.database-entity-tab b { color: var(--muted); font-size: 0.72rem; font-weight: 700; }
.database-tab-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--accent);
  border-radius: 10px;
  background: rgba(42, 184, 179, 0.12);
}
.database-tab-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.database-tab-icon-pets svg, .database-tab-icon-combat svg { fill: currentColor; stroke: none; }
.database-subnav {
  display: grid;
  grid-template-columns: .85fr 1fr 1fr .8fr 1.15fr;
  gap: 4px;
  min-height: var(--control-height);
  margin: 10px 0;
  padding: 4px;
  border: 1px solid var(--line-subtle);
  border-radius: 14px;
  background: rgba(4, 14, 22, .78);
}
.database-subnav .endgame-view-tab {
  min-width: 0;
  padding: 8px 10px;
  white-space: nowrap;
}
.database-controls {
  display: flex;
  flex-wrap: nowrap;
  align-items: end;
  gap: 10px;
  margin: 10px 0 14px;
}
.database-filter-bar {
  min-height: 68px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.database-filter-bar > .field { margin: 0; }
.database-filter-bar input[type="search"],
.database-filter-bar .database-filter-toggle {
  height: var(--control-height-compact);
  min-height: var(--control-height-compact);
}
.database-filter-bar input[type="search"] { padding-block: 0; }
.database-search-field { min-width: 180px; flex: 1 1 280px; order: -10; }
.database-filter-field { min-width: 140px; flex: 0 1 175px; }
.database-filter-field.is-wide { min-width: 165px; flex-basis: 205px; }
.database-filter-types,
.endgame-slot-field {
  min-width: 255px;
  flex-basis: 285px;
}
.database-filter-zones,
.database-filter-locations {
  min-width: 235px;
  flex-basis: 275px;
}
.database-filter-types .database-filter-menu,
.endgame-slot-field .database-filter-menu {
  width: max(100%, 330px);
  max-width: min(360px, calc(100vw - 28px));
}
.database-filter-zones .database-filter-menu,
.database-filter-locations .database-filter-menu {
  width: max(100%, 340px);
  max-width: min(390px, calc(100vw - 28px));
}
.database-filter { position: relative; }
.database-filter-toggle {
  width: 100%;
  min-height: var(--control-height-compact);
  padding: 0 38px 0 12px;
  text-align: left;
  white-space: nowrap;
}
.database-filter-toggle::after { content: "▾"; position: absolute; right: 13px; color: var(--muted); }
.database-filter-toggle[aria-expanded="true"]::after { content: "▴"; }
.database-filter-menu {
  width: max(100%, 210px);
  max-width: min(320px, calc(100vw - 28px));
  max-height: 310px;
  padding: 7px;
  overflow-x: hidden;
  overflow-y: auto;
}
.database-filter-option {
  width: 100%;
  min-height: 37px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 24px;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  color: var(--text);
  text-align: left;
  border: 0;
  border-radius: 8px;
  background: transparent;
  white-space: nowrap;
}
.database-filter-option:hover, .database-filter-option.is-selected { background: rgba(42, 184, 179, .13); }
.database-filter-option > span:nth-child(2) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.database-filter-check {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: #06232b;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.database-filter-option.is-selected .database-filter-check { border-color: var(--accent); background: var(--accent); }
.database-option-svg,
.database-filter-option .endgame-slot-option-icon {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  color: var(--accent-2);
}
.database-option-svg svg,
.database-filter-option .endgame-slot-option-icon img {
  width: 21px;
  height: 21px;
  object-fit: contain;
}
.database-option-svg.is-fallback { color: var(--muted); }
.database-option-svg.is-all { color: var(--muted); }

/* Market uses the same multi-select language as the unified Database filters. */
.market-filter .multi-filter-options {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  border: 0;
}
.market-filter .database-filter-toggle {
  display: flex;
  align-items: center;
}
.market-filter .database-filter-toggle > span {
  display: flex;
  min-width: 0;
  align-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.market-filter-menu {
  width: max(100%, 240px);
  max-width: min(340px, calc(100vw - 28px));
}
#characterFilterMenu { width: max(100%, 280px); }
#locationFilterMenu {
  width: max(100%, 320px);
  max-width: min(390px, calc(100vw - 28px));
}
.market-filter-label-icon {
  width: 19px;
  height: 19px;
  display: inline-grid;
  flex: 0 0 19px;
  place-items: center;
  margin-right: 7px;
  color: var(--accent-2);
}
.market-filter-label-icon svg {
  width: 18px;
  height: 18px;
}
.market-character-option-icon img {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  object-fit: cover;
}
.market-location-option-icon img {
  width: 25px;
  height: 25px;
  border: 1px solid rgba(173, 213, 255, 0.16);
  border-radius: 7px;
  object-fit: cover;
}
.market-location-label-icon img {
  width: 19px;
  height: 19px;
  border-radius: 5px;
  object-fit: cover;
}
.database-quality-dot {
  width: 13px;
  height: 13px;
  border: 1px solid currentColor;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255,255,255,.03);
}
.database-quality-dot.quality-standard { color: var(--quality-standard); background: var(--quality-standard-background); }
.database-quality-dot.quality-refined { color: var(--quality-refined); background: var(--quality-refined-background); }
.database-quality-dot.quality-premium { color: var(--quality-premium); background: var(--quality-premium-background); }
.database-quality-dot.quality-epic { color: var(--quality-epic); background: var(--quality-epic-background); }
.database-quality-dot.quality-legendary { color: var(--quality-legendary); background: var(--quality-legendary-background); }
.database-quality-dot.quality-mythic { color: var(--quality-mythic); background: var(--quality-mythic-background); }
.database-quality-dot.quality-unique { color: var(--quality-unique); background: var(--quality-unique-background); }
.database-tradeable-toggle {
  position: relative;
  min-width: max-content;
  min-height: var(--control-height-compact);
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  align-self: end;
  gap: 8px;
  white-space: nowrap;
}
.database-item-card-grid[hidden],
.database-table-wrap[hidden],
#databaseCatalogPane[hidden],
#databaseEndgamePane[hidden],
#databaseItemsPane[hidden],
#databasePetsPane[hidden],
#databaseEnemiesPane[hidden] { display: none !important; }
.database-item-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}
.database-item-card {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(5, 25, 37, .62);
}
.database-item-card header { min-width: 0; }
.database-item-card p {
  min-height: 2.7em;
  margin: 0;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.35;
}
.database-name-cell {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}
.database-name-cell.is-expandable {
  grid-template-columns: 24px auto minmax(0, 1fr) auto;
}
.database-name-cell > strong,
#databaseItemsPane .endgame-name-cell > strong {
  overflow: hidden;
  font-size: .88rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.database-card-tags, .database-card-effects {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  font-size: .68rem;
}
.database-card-tags > span, .database-card-effects > span {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.database-item-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin: 0;
}
.database-item-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 7px;
  border-bottom: 1px solid var(--line);
  font-size: .7rem;
}
.database-item-card dt { color: var(--muted); }
.database-item-card dd { margin: 0; color: var(--text); font-weight: 700; }
.database-item-card footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
  color: var(--muted);
  font-size: .7rem;
  border-top: 1px solid var(--line);
}
.database-cross-entity-result {
  display: flex;
  min-height: 120px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}
.database-cross-entity-result button {
  min-height: 34px;
  padding: 6px 10px;
}
.database-recent-value {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.database-card-vendor-value,
.database-currency-value {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.database-currency-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  object-fit: contain;
}
.database-currency-value small {
  padding: 2px 4px;
  border: 1px solid currentColor;
  border-radius: 5px;
  font-size: .56rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .03em;
  opacity: .82;
}
.database-currency-shard { color: #b7a7ff; }
.database-currency-token { color: #70dfd3; }
.database-table { width: 100%; table-layout: fixed; }
.database-table th:first-child, .database-table td:first-child { width: 25%; min-width: 250px; }
.database-table th,
.database-table td {
  font-size: .74rem;
  line-height: 1.15;
  vertical-align: middle;
}
.database-table th { text-align: center; }
.database-table th:first-child,
.database-table td:first-child { text-align: left; }
.database-table td:not(:first-child) { text-align: center; }
.database-table.is-loot th:nth-child(4),
.database-table.is-loot td:nth-child(4) { text-align: left; }
#databaseItemsPane thead .table-sort-heading {
  justify-content: center;
  white-space: nowrap;
}
#databaseItemsPane thead th:first-child .table-sort-heading,
#databaseItemsPane .database-table.is-loot th:nth-child(4) .table-sort-heading {
  justify-content: flex-start;
}
.database-source-list { display: grid; gap: 4px; }
.database-source-list.is-icon-strip {
  display: flex;
  max-width: 100%;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  overflow: hidden;
}
.database-source-entity {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.database-source-entity > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.database-source-entity.is-icon-only { flex: 0 0 auto; }
.database-source-icon {
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(3, 18, 28, .7);
}
.database-source-icon img { width: 100%; height: 100%; object-fit: cover; }
.database-source-more {
  min-width: 27px;
  height: 25px;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  padding: 0 5px;
  color: var(--accent-2);
  border: 1px solid rgba(101, 214, 206, .24);
  border-radius: 999px;
  background: rgba(101, 214, 206, .07);
  font-size: .66rem;
  font-weight: 800;
}
.database-type-cell {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: capitalize;
  white-space: nowrap;
}
.database-type-cell .endgame-slot-option-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}
.database-type-cell .endgame-slot-option-icon svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.6;
}
.database-quality {
  color: var(--muted);
  font-size: .72rem;
}
.database-quality-standard { color: var(--quality-standard); border-color: var(--quality-standard-border); background: var(--quality-standard-background); }
.database-quality-refined { color: var(--quality-refined); border-color: var(--quality-refined-border); background: var(--quality-refined-background); }
.database-quality-premium { color: var(--quality-premium); border-color: var(--quality-premium-border); background: var(--quality-premium-background); }
.database-quality-epic { color: var(--quality-epic); border-color: var(--quality-epic-border); background: var(--quality-epic-background); }
.database-quality-legendary { color: var(--quality-legendary); border-color: var(--quality-legendary-border); background: var(--quality-legendary-background); }
.database-quality-mythic { color: var(--quality-mythic); border-color: var(--quality-mythic-border); background: var(--quality-mythic-background); }
.database-quality-unique { color: var(--quality-unique); border-color: var(--quality-unique-border); background: var(--quality-unique-background); }
.database-table.is-loot th:nth-child(1), .database-table.is-loot td:nth-child(1) { width: 27%; }
.database-table.is-loot th:nth-child(2), .database-table.is-loot td:nth-child(2) { width: 17%; }
.database-table.is-loot th:nth-child(3), .database-table.is-loot td:nth-child(3) { width: 12%; }
.database-table.is-loot th:nth-child(4), .database-table.is-loot td:nth-child(4) { width: 22%; text-align: left; }
.database-table.is-loot th:nth-child(5), .database-table.is-loot td:nth-child(5) { width: 12%; }
.database-table.is-loot th:nth-child(6), .database-table.is-loot td:nth-child(6) { width: 10%; }
.database-table.is-vendor th:nth-child(1), .database-table.is-vendor td:nth-child(1) { width: 28%; }
.database-table.is-vendor th:nth-child(2), .database-table.is-vendor td:nth-child(2) { width: 18%; }
.database-table.is-vendor th:nth-child(3), .database-table.is-vendor td:nth-child(3) { width: 12%; }
.database-table.is-loot td:nth-child(5) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (min-width: 761px) {
  .database-enemy-table td:nth-child(7) .database-weather-strip {
    justify-content: center;
  }
  #databaseItemsPane :is(.database-table, .endgame-table) > thead > tr {
    height: var(--table-header-height);
  }
  #databaseItemsPane :is(.database-table, .endgame-table) > thead > tr > th {
    box-sizing: border-box;
    height: var(--table-header-height);
    padding: 7px 8px;
    font-size: .72rem;
    line-height: 1;
    vertical-align: middle;
  }
  #databaseItemsPane :is(.database-item-row, .endgame-row) {
    height: var(--table-row-height);
  }
  #databaseItemsPane :is(.database-item-row, .endgame-row) > td {
    box-sizing: border-box;
    height: var(--table-row-height);
    padding-top: 7px;
    padding-bottom: 7px;
    line-height: 1.15;
    vertical-align: middle;
  }
}
.database-catalog-row { cursor: pointer; }
.database-catalog-row:hover,
.database-catalog-row.is-expanded { background: rgba(101, 214, 206, .045); }
.database-row-details:hover { background: transparent; }
.database-row-details > td {
  padding: 0 !important;
  text-align: left;
}
.database-detail-panel {
  padding: 15px 18px 18px;
  border-top: 1px solid rgba(101, 214, 206, .12);
  background: rgba(4, 15, 23, .35);
}
.database-detail-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.database-detail-toolbar strong,
.database-detail-toolbar span { display: block; }
.database-detail-toolbar span {
  margin-top: 3px;
  color: var(--muted);
  font-size: .72rem;
}
.database-detail-context {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.database-detail-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(7, 22, 33, .62);
}
.database-detail-card > span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.database-detail-list { display: grid; gap: 6px; }
.database-detail-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: .72rem;
}
.database-detail-list strong {
  color: var(--text);
  text-align: right;
}
.database-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 2px 0;
  color: var(--muted);
  font-size: .76rem;
}
.database-pagination > div { display: flex; align-items: center; gap: 8px; }
.database-pagination button { min-height: 34px; }
#endgameSlotMenu .database-filter-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 24px;
  gap: 8px;
  padding: 5px 8px;
}
.pet-owner-entry {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 3px;
}
.pet-owner-avatar { position: relative; overflow: hidden; }
.pet-owner-count {
  min-width: 22px;
  height: 20px;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  padding: 0 5px;
  color: var(--accent-2);
  border: 1px solid rgba(101, 214, 206, .3);
  border-radius: 999px;
  background: rgba(101, 214, 206, .09);
  font-size: .64rem;
  font-weight: 900;
  line-height: 1;
}
.endgame-table th:first-child,
.endgame-table td:first-child { width: 22%; min-width: 250px; }
.pets-table th:first-child,
.pets-table td:first-child { width: 18%; min-width: 220px; }
.endgame-table th:not(:first-child),
.endgame-table td:not(:first-child),
.pets-table th:not(:first-child),
.pets-table td:not(:first-child) { font-size: .74rem; }
.database-enemy-table th:nth-child(1), .database-enemy-table td:nth-child(1) { width: 17%; min-width: 210px; }
.database-enemy-table th:nth-child(2), .database-enemy-table td:nth-child(2) { width: 12%; }
.database-enemy-table th:nth-child(3), .database-enemy-table td:nth-child(3) { width: 5%; }
.database-enemy-table th:nth-child(4), .database-enemy-table td:nth-child(4) { width: 6%; }
.database-enemy-table th:nth-child(5), .database-enemy-table td:nth-child(5) { width: 6%; }
.database-enemy-table th:nth-child(6), .database-enemy-table td:nth-child(6) { width: 17%; }
.database-enemy-table th:nth-child(7), .database-enemy-table td:nth-child(7) { width: 29%; }
.database-enemy-table th:nth-child(8), .database-enemy-table td:nth-child(8) { width: 8%; }
.database-enemy-row { cursor: pointer; }
.database-expand-cue {
  position: relative;
  width: 24px;
  height: 24px;
  display: grid;
  flex: 0 0 24px;
  place-items: center;
  padding: 0;
  overflow: hidden;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(6, 15, 23, .5);
  font-size: 0;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.database-expand-cue:hover,
.database-expand-cue:focus-visible {
  color: var(--text);
  border-color: rgba(173, 213, 255, .28);
  background: rgba(101, 214, 206, .08);
  box-shadow: none;
  transform: none;
}
.database-expand-cue::before {
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: rotate(-45deg);
  transition: transform .18s ease;
}
.database-enemy-row.is-expanded .database-expand-cue,
.endgame-row.is-expanded .database-expand-cue,
.pet-row.is-expanded .database-expand-cue,
.database-catalog-row.is-expanded .database-expand-cue,
.opportunity-row.expanded .database-expand-cue {
  color: var(--accent-2);
  border-color: rgba(101, 214, 206, .35);
  background: rgba(101, 214, 206, .08);
}
.database-enemy-row.is-expanded .database-expand-cue::before,
.endgame-row.is-expanded .database-expand-cue::before,
.pet-row.is-expanded .database-expand-cue::before,
.database-catalog-row.is-expanded .database-expand-cue::before,
.opportunity-row.expanded .database-expand-cue::before {
  transform: rotate(45deg) translate(-1px, -1px);
}
.database-enemy-row .database-name-cell { grid-template-columns: auto auto minmax(0, 1fr); }
.database-enemy-name-copy,
.database-enemy-location {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.database-enemy-name-copy strong {
  min-width: 0;
  overflow: hidden;
  font-size: .88rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.database-seasonal-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 18px;
  padding: 2px 6px;
  color: #c7b4dc;
  border: 1px solid rgba(174,151,196,.36);
  border-radius: 999px;
  background: rgba(174,151,196,.1);
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .03em;
  line-height: 1;
  text-transform: uppercase;
}
.database-seasonal-badge.is-unavailable {
  color: var(--muted);
  border-color: rgba(141,166,181,.24);
  background: rgba(141,166,181,.07);
}
.database-enemy-location {
  align-items: flex-start;
  flex-direction: column;
  gap: 1px;
}
.database-enemy-location small {
  color: var(--muted);
  font-size: .62rem;
}
.database-enemy-row.is-unavailable { opacity: .72; }
.database-seasonal-note {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.4;
}
.database-enemy-loot, .database-weather-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}
.database-loot-cell {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.database-loot-primary {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.database-loot-primary > span:last-child {
  max-width: 145px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.database-loot-primary-icon {
  width: var(--icon-size-small);
  height: var(--icon-size-small);
  flex: 0 0 var(--icon-size-small);
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(3, 18, 28, .7);
}
.database-loot-more {
  padding: 3px 6px;
  color: var(--accent-2);
  border: 1px solid rgba(101, 214, 206, .24);
  border-radius: 999px;
  background: rgba(101, 214, 206, .07);
  font-size: .66rem;
  font-weight: 800;
}
.weather-affinity-title { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.database-affinity-face {
  width: 19px;
  height: 16px;
  display: inline-grid;
  flex: 0 0 19px;
  place-items: center;
  overflow: visible;
}
.database-affinity-face svg {
  width: 19px;
  height: 19px;
  display: block;
}
.database-affinity-face.is-positive { color: #75e897; }
.database-affinity-face.is-negative { color: #ff7777; }
.database-weather-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 7px;
}
.database-weather-icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.database-weather-icon.affinity-0 { color: #42db91; background: rgba(66,219,145,.17); }
.database-weather-icon.affinity-1 { color: #6bd9a6; background: rgba(107,217,166,.1); }
.database-weather-icon.affinity-2 { color: #8da6b5; background: rgba(141,166,181,.09); }
.database-weather-icon.affinity-3 { color: #e8a240; background: rgba(232,162,64,.1); }
.database-weather-icon.affinity-4 { color: #ff5b70; background: rgba(255,91,112,.14); }
.database-expanded-row td { padding: 0 10px 12px; }
.database-expanded-loot {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(3, 18, 28, .55);
}
.database-expanded-loot > div { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 9px; }
.database-enemy-loot { padding: 5px 8px; border: 1px solid var(--line); border-radius: 9px; }
.database-compare-modal-panel {
  width: min(980px, calc(100vw - 28px));
  max-height: min(86vh, 820px);
  overflow: auto;
}
.database-clear-filters {
  width: var(--control-height-compact);
  height: var(--control-height-compact);
  min-width: var(--control-height-compact);
  min-height: var(--control-height-compact);
  display: inline-flex;
  flex: 0 0 var(--control-height-compact);
  align-items: center;
  align-self: end;
  justify-content: center;
  gap: 7px;
  padding: 0;
  color: var(--accent-2);
  border: 1px solid rgba(101, 214, 206, .28);
  border-radius: 11px;
  background: rgba(101, 214, 206, .08);
}
.database-clear-filters:hover:not(:disabled) {
  border-color: rgba(101, 214, 206, .55);
  background: rgba(101, 214, 206, .15);
}
.database-clear-filters:disabled {
  cursor: default;
  opacity: .38;
  transform: none;
}
.database-clear-filters svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.database-clear-filter-label { display: none; }
.database-compare-modal-panel .comparison-scroll {
  max-width: 100%;
  overflow-x: auto;
}
.database-compare-modal-panel .comparison-table {
  width: 100%;
  table-layout: fixed;
}
.database-compare-metric { display: inline-flex; align-items: center; gap: 7px; }
.database-compare-metric .exp-stat-icon { width: 18px; height: 18px; flex: 0 0 auto; }
.database-stat-content {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.database-stat-content .exp-stat-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  display: none;
}
.database-stat-content .exp-stat-icon img,
.database-stat-content .exp-stat-icon svg {
  width: 16px;
  height: 16px;
}
.database-stat-content strong { font-weight: 800; }
.database-stat-label { display: none; }
.database-stat-heading-icon {
  width: 16px;
  height: 16px;
  display: inline-grid;
  flex: 0 0 16px;
  place-items: center;
  color: var(--accent-2);
}
.database-stat-heading-icon img,
.database-stat-heading-icon svg {
  width: 15px;
  height: 15px;
  object-fit: contain;
}
.database-compare-dock {
  position: fixed;
  right: max(70px, calc(env(safe-area-inset-right) + 70px));
  bottom: 22px;
  z-index: 42;
  display: flex;
  overflow: hidden;
  border: 1px solid rgba(101, 214, 206, .4);
  border-radius: 13px;
  background: rgba(7, 25, 36, .94);
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
  backdrop-filter: blur(10px);
}
.database-compare-dock[hidden] { display: none; }
.database-compare-dock button {
  min-height: var(--control-height-compact);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.database-compare-dock button + button { padding-inline: 10px; border-left: 1px solid var(--line); }
.database-compare-dock svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
}
.database-compare-dock strong { color: var(--accent); }
body.has-boss-footer .database-compare-dock { bottom: 88px; }

@media (min-width: 721px) and (max-width: 760px) {
  .database-stat-content .exp-stat-icon {
    display: grid;
  }
}

@media (max-width: 1050px) {
  .database-controls {
    flex-wrap: wrap;
  }
  .database-controls .database-search-field,
  .database-controls .database-filter-field { flex: 1 1 calc(50% - 10px); }
  .database-tradeable-toggle { justify-self: start; }
}

@media (max-width: 720px) {
  .database-panel { padding: 10px; }
  .database-panel-header { flex-direction: column; }
  .database-panel-header .pets-summary { flex-wrap: wrap; justify-content: flex-start; }
  .database-entity-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .database-entity-tab { grid-template-columns: 28px minmax(0, 1fr); padding: 7px; }
  .database-entity-tab b, .database-entity-tab small { display: none; }
  .database-tab-icon { width: 28px; height: 28px; }
  .database-subnav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .database-subnav .endgame-view-tab:first-child { grid-column: 1 / -1; }
  .database-controls {
    align-items: stretch;
    flex-direction: column;
    flex-wrap: nowrap;
  }
  .database-controls .database-search-field,
  .database-controls .database-filter-field { width: 100%; flex: 0 0 auto; }
  .database-controls .database-clear-filters {
    width: 100%;
    flex-basis: auto;
  }
  .database-controls.is-vendor {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
  }
  .database-controls.is-vendor .database-search-field,
  .database-controls.is-vendor .database-filter-types {
    grid-column: 1 / -1;
  }
  .database-controls.is-vendor .database-filter-qualities,
  .database-controls.is-vendor .database-filter-sources {
    min-width: 0;
    width: 100%;
  }
  .database-controls.is-vendor .database-tradeable-toggle {
    width: 100%;
    min-width: 0;
    justify-content: center;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: rgba(5, 25, 37, .55);
    font-size: .72rem;
  }
  .database-controls.is-vendor .database-clear-filters {
    grid-column: auto;
    min-width: 0;
  }
  .database-clear-filter-label { display: inline; }
  .database-filter-field,
  .database-filter-field.is-wide,
  .database-filter-types,
  .database-filter-zones,
  .database-filter-locations,
  .endgame-slot-field { min-width: 0; }
  .database-filter-menu { width: 100%; max-width: 100%; }
  .database-item-card-grid { grid-template-columns: minmax(0, 1fr); }
  .database-table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
  }
  .database-table, .database-table tbody, .database-table tr, .database-table td {
    display: block;
    width: 100%;
  }
  .database-table thead { display: none; }
  .database-table tr {
    margin-bottom: 10px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(5, 25, 37, .55);
  }
  .database-table td, .database-table td:first-child {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(92px, .7fr) minmax(0, 1.3fr);
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--line);
  }
  #databaseItemsPane .database-table td:nth-child(n) {
    width: 100%;
    min-width: 0;
  }
  .database-enemy-table td:nth-child(n) { width: 100%; min-width: 0; }
  .database-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: .66rem;
    text-transform: uppercase;
  }
  .database-table td:first-child { grid-template-columns: minmax(0, 1fr); }
  .database-table td:first-child::before { display: none; }
  .database-enemy-table .database-enemy-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .database-enemy-table .database-enemy-row > td:nth-child(1),
  .database-enemy-table .database-enemy-row > td:nth-child(2),
  .database-enemy-table .database-enemy-row > td:nth-child(n + 6) {
    grid-column: 1 / -1;
  }
  .database-table .database-mobile-metric {
    min-height: 50px;
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    justify-items: center;
    gap: 3px;
    padding: 7px 8px;
    background: rgba(101, 214, 206, .025);
    text-align: center;
  }
  .database-table .database-mobile-metric.has-divider {
    border-right: 1px solid var(--line);
  }
  .database-table .database-mobile-metric::before {
    font-size: .6rem;
    line-height: 1;
  }
  .database-table.is-vendor .database-item-row {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .database-table.is-vendor .database-item-row > td:nth-child(1) {
    grid-column: 1 / -1;
  }
  .database-table.is-vendor .database-item-row > td:nth-child(2) {
    grid-column: span 4;
  }
  .database-table.is-vendor .database-item-row > td:nth-child(3) {
    grid-column: span 2;
  }
  .database-table.is-vendor .database-item-row > .database-mobile-metric {
    grid-column: span 2;
    padding: 7px 5px;
  }
  .database-table.is-vendor .database-item-row > td:nth-child(2),
  .database-table.is-vendor .database-item-row > td:nth-child(3) {
    min-height: 48px;
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    gap: 4px;
    padding: 7px 10px;
  }
  .database-table.is-vendor .database-item-row > td:nth-child(2) {
    border-right: 1px solid var(--line);
  }
  .database-table.is-vendor .database-item-row > .database-mobile-metric::before {
    font-size: .58rem;
  }
  .database-table.is-vendor .database-type-cell {
    max-width: 100%;
  }
  .database-table.is-vendor .database-type-cell > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  :is(.endgame-table tr.endgame-row td.endgame-stat-cell, .pets-table tr.pet-row td.pet-stat-cell)::before {
    display: none;
  }
  :is(.endgame-table tr.endgame-row, .pets-table tr.pet-row) .database-stat-content {
    width: 100%;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    justify-content: stretch;
    gap: 6px;
    text-align: left;
  }
  :is(.endgame-table tr.endgame-row, .pets-table tr.pet-row) .database-stat-content .exp-stat-icon {
    display: grid;
  }
  :is(.endgame-table tr.endgame-row, .pets-table tr.pet-row) .database-stat-label {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: .68rem;
    font-weight: 700;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  :is(.endgame-table tr.endgame-row, .pets-table tr.pet-row) .database-stat-content strong {
    color: var(--text);
    font-size: .74rem;
    text-align: right;
  }
  .database-expanded-row td { display: block; }
  .database-row-details td { display: block; }
  .database-detail-toolbar { flex-direction: column; }
  .database-detail-context { grid-template-columns: minmax(0, 1fr); }
  .database-pagination { align-items: flex-start; flex-direction: column; }
  .endgame-table th:first-child,
  .endgame-table td:first-child,
  .pets-table th:first-child,
  .pets-table td:first-child { width: auto; min-width: 0; }
  .database-compare-dock {
    right: max(61px, calc(env(safe-area-inset-right) + 61px));
    bottom: 82px;
  }
  body.has-boss-footer .database-compare-dock { bottom: 146px; }
  .database-compare-modal-panel {
    width: calc(100vw - 18px);
    padding: 12px;
  }
  .database-compare-modal-panel .comparison-table {
    min-width: 0;
    table-layout: fixed;
  }
  .database-compare-modal-panel .comparison-table th,
  .database-compare-modal-panel .comparison-table td {
    min-width: 0;
    padding: 7px 4px;
    font-size: .68rem;
    overflow-wrap: anywhere;
  }
}
