/* Mystic Forest database chrome. */
@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&display=swap");

.page-gamedb {
  --color-gold: #a594ff;
  --color-text-primary: #f2f5fc;
  --color-text-secondary: #9aa8c2;
  --color-text-muted: #6d7890;
  --color-bg-primary: #020308;
  --color-accent: #5ee4c8;
}
body.page-gamedb {
  background: #020308 !important;
}

.gdb-section.gdb-section--rom {
  padding: 0;
}
.gdb-section.gdb-section--rom .db-page {
  min-height: 100vh;
  padding: 80px 0;
}

.db-page {
  background: var(--color-bg-primary, #0a0a0f);
  isolation: isolate;
  min-height: 100vh;
  position: relative;
}
.db-header {
  text-align: center;
  background: linear-gradient(#a594ff0f 0%, #0000 100%);
  border-bottom: 1px solid #a594ff12;
  margin-bottom: 0;
  padding: 52px 24px 40px;
  position: relative;
}
.db-eyebrow {
  color: var(--color-accent, #5ee4c8);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  margin: 0 0 10px;
  font-size: 0.62rem;
  font-weight: 700;
}
.db-header:before {
  content: "";
  background: linear-gradient(90deg, #0000, #a594ff66, #0000);
  width: 200px;
  height: 1px;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%);
}
.db-title {
  color: var(--color-gold, #a594ff);
  letter-spacing: 5px;
  text-transform: uppercase;
  text-shadow: 0 0 40px #a594ff33;
  margin: 0 0 10px;
  font-family: Cinzel, serif;
  font-size: 2.6rem;
  font-weight: 700;
}
.db-subtitle {
  color: var(--color-text-secondary, #a09880);
  letter-spacing: 0.02em;
  margin: 0 0 28px;
  font-size: 0.95rem;
}
.db-search-wrap {
  align-items: center;
  max-width: 580px;
  margin: 0 auto;
  display: flex;
  position: relative;
}
.db-search {
  width: 100%;
  color: var(--color-text-primary, #e0d5c1);
  background: #ffffff0a;
  border: 1px solid #a594ff2e;
  border-radius: 50px;
  outline: none;
  padding: 13px 48px;
  font-family: inherit;
  font-size: 0.95rem;
}
.db-search::placeholder { color: #a0988080; }
.db-search:focus {
  background: #ffffff0f;
  border-color: #a594ff66;
  box-shadow: 0 0 0 3px #a594ff12, 0 4px 20px #0000004d;
}
.db-search-icon {
  color: #a594ff80;
  pointer-events: none;
  z-index: 1;
  align-items: center;
  display: flex;
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
}
.db-search-clear {
  color: var(--color-text-muted, #6b6352);
  cursor: pointer;
  background: transparent;
  border: none;
  border-radius: 50%;
  padding: 4px 8px;
  font-size: 0.9rem;
  transition: color 0.2s;
  position: absolute;
  right: 16px;
}
.db-search-clear:hover { color: var(--color-gold, #a594ff); }
[dir="rtl"] .db-search-icon { left: auto; right: 18px; }
[dir="rtl"] .db-search-clear { right: auto; left: 16px; }
[dir="rtl"] .db-search { padding: 13px 48px; }

.db-body {
  align-items: flex-start;
  gap: 20px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px 28px 0;
  display: flex;
}
.db-sidebar {
  background: #ffffff04;
  border: 1px solid #a594ff0f;
  border-radius: 14px;
  flex-direction: column;
  flex-shrink: 0;
  gap: 2px;
  width: 185px;
  padding: 8px 0;
  display: flex;
  position: sticky;
  top: 90px;
  overflow: hidden;
}
.db-cat-btn {
  color: #a09880bf;
  letter-spacing: 0.1em;
  text-align: left;
  cursor: pointer;
  text-transform: uppercase;
  background: transparent;
  border: none;
  align-items: center;
  padding: 10px 18px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  transition: all 0.15s;
  display: flex;
  position: relative;
}
[dir="rtl"] .db-cat-btn { text-align: right; }
.db-cat-btn:hover {
  color: var(--color-text-primary, #e0d5c1);
  background: #a594ff0f;
}
.db-cat-btn.is-active,
.db-cat-btn--active {
  color: var(--color-gold, #a594ff);
  background: linear-gradient(90deg, #a594ff1f, #a594ff0a);
  font-weight: 600;
}
.db-cat-btn.is-active:before,
.db-cat-btn--active:before {
  content: "";
  background: var(--color-gold, #a594ff);
  border-radius: 2px;
  width: 2px;
  position: absolute;
  top: 20%;
  bottom: 20%;
  left: 0;
}
[dir="rtl"] .db-cat-btn.is-active:before,
[dir="rtl"] .db-cat-btn--active:before { left: auto; right: 0; }

.db-content { flex: 1; min-width: 0; padding-top: 8px; }
.db-content-header {
  border-bottom: 1px solid #a594ff14;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 14px;
  display: flex;
}
.db-content-title {
  color: var(--color-text-primary, #e0d5c1);
  text-transform: uppercase;
  letter-spacing: 2.5px;
  margin: 0;
  font-family: Cinzel, serif;
  font-size: 1.3rem;
}
.db-count { color: var(--color-text-muted, #6b6352); font-size: 0.82rem; }
.db-count strong { color: var(--color-gold, #a594ff); font-size: 0.95rem; }

.db-weapon-filters[hidden],
.db-armor-type-bar[hidden],
.db-armor-slots[hidden],
.db-pagination[hidden] {
  display: none !important;
}
.db-weapon-filters {
  background: #00000040;
  border: 1px solid #a594ff14;
  border-radius: 12px;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 18px;
  padding: 14px;
  display: flex;
}
.db-wtype-btn {
  color: #a09880b3;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  background: #ffffff06;
  border: 1px solid #a594ff14;
  border-radius: 10px;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 62px;
  padding: 10px 10px 8px;
  font-family: inherit;
  font-size: 0.63rem;
  font-weight: 500;
  transition: all 0.18s;
  display: flex;
}
.db-wtype-btn:hover {
  color: var(--color-text-primary, #e0d5c1);
  background: #a594ff14;
  border-color: #a594ff38;
  transform: translateY(-2px);
}
.db-wtype-btn.is-active,
.db-wtype-btn--active {
  color: var(--color-gold, #a594ff);
  background: #a594ff21;
  border-color: #a594ff66;
  box-shadow: 0 0 16px #a594ff1f;
}
.db-wtype-img-wrap {
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  display: flex;
}
.db-wtype-icon {
  object-fit: contain;
  filter: grayscale(30%) brightness(0.8);
  width: 34px;
  height: 34px;
}
.db-wtype-btn:hover .db-wtype-icon,
.db-wtype-btn.is-active .db-wtype-icon,
.db-wtype-btn--active .db-wtype-icon {
  filter: grayscale(0%) brightness(1.1) drop-shadow(0 0 5px #a594ff59);
}
.db-wtype-all-glyph {
  color: var(--color-gold, #a594ff);
  filter: drop-shadow(0 0 4px #a594ff66);
  font-size: 1.3rem;
  line-height: 1;
}
.db-wtype-label {
  white-space: nowrap;
  opacity: 0.85;
  font-size: 0.6rem;
  line-height: 1;
}

.db-rarity {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 16px;
}
.db-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.15);
  background: var(--dot, #fff);
  cursor: pointer;
}
.db-dot:hover { transform: scale(1.15); }
.db-dot.is-active { border-color: #fff; box-shadow: 0 0 8px var(--dot); }

.db-grid {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
  display: grid;
  min-height: 180px;
}
.db-grid.is-loading { opacity: 0.45; }
.db-grid > .db-empty { grid-column: 1 / -1; }
.db-card {
  color: inherit;
  background: #ffffff06;
  border: 1px solid #a594ff0f;
  border-radius: 12px;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  text-decoration: none;
  transition: all 0.2s;
  display: flex;
  cursor: pointer;
  text-align: start;
  width: 100%;
  font: inherit;
}
.db-card:hover {
  background: #a594ff14;
  border-color: #a594ff40;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px #0003;
}
.db-card--rarity { border-color: var(--db-card-rarity-color); }
.db-card--rarity:hover {
  border-color: var(--db-card-rarity-color);
  box-shadow: 0 0 14px color-mix(in srgb, var(--db-card-rarity-color) 28%, transparent), 0 4px 12px #0003;
}
.db-card-icon-wrap {
  background: #0006;
  border: 2px solid #ffffff1a;
  border-radius: 8px;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  width: 46px;
  height: 46px;
  display: flex;
  position: relative;
  overflow: visible;
  box-shadow: inset 0 0 10px #000c;
}
.db-card-icon-placeholder {
  color: #ffffff26;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  display: flex;
}
.db-card-icon {
  object-fit: contain;
  width: 90%;
  height: 90%;
}
.db-card:hover .db-card-icon { transform: scale(1.12); }
.db-card-level-badge {
  color: var(--color-gold, #a594ff);
  z-index: 2;
  letter-spacing: 0.5px;
  background: #111;
  border: 1px solid #a594ff66;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.65rem;
  font-weight: 700;
  position: absolute;
  bottom: -6px;
  right: -6px;
  box-shadow: 0 2px 4px #00000080;
}
[dir="rtl"] .db-card-level-badge { right: auto; left: -6px; }
.db-card-body { flex: 1; min-width: 0; }
.db-card-name {
  color: var(--color-text-primary, #e0d5c1);
  white-space: nowrap;
  text-overflow: ellipsis;
  margin-bottom: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  overflow: hidden;
  display: block;
}
.db-card-meta {
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  display: flex;
  color: #a0988099;
  font-size: 0.7rem;
}
.db-card-rare {
  letter-spacing: 0.03em;
  font-size: 0.73rem;
  font-weight: 600;
}
.db-card-wtype,
.db-card-lv,
.db-card-id {
  color: #a0988099;
  border: 0;
  padding: 0;
  font-size: 0.7rem;
}
.db-card-arrow {
  color: #a594ff40;
  flex-shrink: 0;
  padding: 0 16px;
  font-size: 1.3rem;
}
.db-card:hover .db-card-arrow { color: #a594ff99; transform: translateX(3px); }
[dir="rtl"] .db-card:hover .db-card-arrow { transform: translateX(-3px); }

.db-empty {
  color: var(--color-text-muted, #6b6352);
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 80px 0;
  display: flex;
  grid-column: 1 / -1;
}

.db-pagination {
  border-top: 1px solid #a594ff12;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
}
.db-page-btn {
  color: var(--color-text-secondary, #a09880);
  cursor: pointer;
  background: #ffffff08;
  border: 1px solid #a594ff2e;
  border-radius: 8px;
  padding: 8px 18px;
  font-family: inherit;
  font-size: 0.82rem;
}
.db-page-btn:hover:not(:disabled) {
  color: var(--color-gold, #a594ff);
  background: #a594ff14;
}
.db-page-btn:disabled { opacity: 0.3; cursor: default; }
.db-page-nums { gap: 4px; display: flex; flex-wrap: wrap; }
.db-page-num {
  width: 34px;
  height: 34px;
  color: var(--color-text-secondary, #a09880);
  cursor: pointer;
  background: transparent;
  border: 1px solid #a594ff1a;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.82rem;
}
.db-page-num:hover { color: var(--color-gold, #a594ff); background: #a594ff14; }
.db-page-num.is-active,
.db-page-num--active {
  color: var(--color-gold, #a594ff);
  background: #a594ff26;
  border-color: #a594ff66;
  font-weight: 700;
}

/* Item detail — RoM db-detail + db-model-preview. */
.db-detail-wrap {
  flex-direction: column;
  gap: 20px;
  max-width: 1100px;
  margin: 24px auto;
  padding: 0 24px 60px;
  display: flex;
}
.db-back-link {
  color: var(--color-text-secondary, #a09880);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  text-decoration: none;
  display: inline-flex;
}
.db-back-link:hover { color: var(--color-gold, #a594ff); }
.db-detail-header {
  --db-detail-gold: #a594ff;
  --db-detail-cream: #f2f5fc;
  --db-detail-line: #a594ff40;
  --db-detail-panel: linear-gradient(145deg, #14102af5 0%, #070914fa 55%, #041210f0 100%);
  align-items: center;
  gap: 22px;
  display: flex;
  overflow: hidden;
  background: var(--db-detail-panel);
  border: 1px solid var(--db-detail-line);
  border-radius: 18px;
  position: relative;
  padding: 8px 8px 8px 18px;
  box-shadow: 0 18px 40px #00000066, inset 0 1px #ffffff10;
}
.mf-item-hero__glow {
  pointer-events: none;
  position: absolute;
  inset: -20% auto auto -8%;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, color-mix(in srgb, var(--rare, #a594ff) 28%, transparent), transparent 70%);
  filter: blur(8px);
}
.mf-item-kicker {
  color: #5ee4c8;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-size: 0.58rem;
  font-weight: 800;
}
.db-detail-rarity-bar { display: none; }
.db-detail-main-icon,
.mf-item-hero__icon {
  background: radial-gradient(circle at 50% 40%, #1c1738, #07080e);
  border: 2px solid var(--rare, #a594ff66);
  border-radius: 50%;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  width: 92px;
  height: 92px;
  padding: 10px;
  display: flex;
  box-shadow: 0 0 0 6px #a594ff14, 0 10px 24px #00000080;
}
.db-detail-main-icon img {
  object-fit: contain;
  border-radius: 10px;
  width: 72px;
  height: 72px;
}
.db-detail-info { flex: 1; padding: 24px 24px 24px 0; }
.db-detail-id {
  color: #766d5d;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  font-size: 0.75rem;
}
.db-detail-name {
  margin: 0 0 14px;
  font-family: Cinzel, serif;
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.015em;
}
.db-detail-badges { flex-wrap: wrap; gap: 8px; margin-bottom: 0; display: flex; }
.db-badge {
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-gold, #a594ff);
  background: #a594ff12;
  border: 1px solid #a594ff4d;
  border-radius: 999px;
  align-items: center;
  padding: 4px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  display: inline-flex;
}
.db-badge--level { color: var(--color-text-secondary, #a09880); border-color: #a098804d; }
.db-badge--type { color: var(--color-text-muted, #6b6352); border-color: #6b63524d; font-size: 0.68rem; }

.mf-preview-kicker {
  color: #5ee4c8;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin: 0 0 4px;
  font-size: 0.58rem;
  font-weight: 800;
}
.db-section-title {
  color: #f2f5fc;
  margin: 0;
  font-family: Cinzel, serif;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: none;
}
.db-model-section { padding-bottom: 8px; }
.db-model-heading {
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
  display: flex;
}
.db-model-actions { display: flex; justify-content: flex-end; }
.db-model-reset {
  color: #c8beff;
  font: inherit;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  background: #5ee4c814;
  border: 1px solid #5ee4c855;
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 0.7rem;
}
.db-model-reset:hover {
  color: var(--color-gold, #a594ff);
  background: #a594ff1a;
  border-color: #a594ff8c;
}
.db-model-controls {
  position: relative;
  z-index: 5;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
  margin: 0 0 16px;
  display: grid;
}
.db-model-control { display: flex; flex-direction: column; gap: 6px; position: relative; }
.db-model-control > span {
  color: var(--color-text-muted, #6b6352);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-size: 0.66rem;
  font-weight: 700;
}
.db-select-native {
  display: none !important;
}
.db-themed-select {
  z-index: 2;
  position: relative;
}
.db-themed-select.is-open {
  z-index: 20;
}
.db-themed-select-trigger {
  width: 100%;
  height: 39px;
  color: var(--color-text-primary, #e0d5c1);
  font: inherit;
  text-align: left;
  cursor: pointer;
  background: #ffffff09;
  border: 1px solid #a594ff2b;
  border-radius: 8px;
  outline: none;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0 10px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
  display: flex;
}
.db-themed-select-trigger:hover,
.db-themed-select.is-open .db-themed-select-trigger,
.db-themed-select-trigger:focus-visible {
  background: #a594ff12;
  border-color: #a594ff94;
  box-shadow: 0 0 0 2px #a594ff14;
}
.db-themed-select-trigger:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}
.db-themed-select-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.db-themed-select-chevron {
  color: var(--color-gold, #a594ff);
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.18s;
  transform: translateY(-2px);
}
.db-themed-select.is-open .db-themed-select-chevron {
  transform: translateY(2px) rotate(180deg);
}
.db-themed-select-menu {
  display: none;
  background: linear-gradient(#18171c, #0f0f14);
  border: 1px solid #a594ff61;
  border-radius: 9px;
  padding: 5px;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  overflow: hidden;
  box-shadow: 0 16px 35px #000000b8, inset 0 1px #ffffff09;
}
.db-themed-select.is-open .db-themed-select-menu {
  display: block;
}
.db-themed-select-option {
  width: 100%;
  min-height: 34px;
  color: var(--color-text-secondary, #a09880);
  font: inherit;
  text-align: left;
  cursor: pointer;
  background: 0 0;
  border: 0;
  border-radius: 6px;
  justify-content: space-between;
  align-items: center;
  padding: 7px 10px;
  font-size: 0.8rem;
  display: flex;
}
.db-themed-select-option:hover,
.db-themed-select-option:focus-visible {
  color: var(--color-text-primary, #e0d5c1);
  background: #a594ff17;
  outline: none;
}
.db-themed-select-option.is-selected {
  color: var(--color-gold, #a594ff);
  background: linear-gradient(90deg, #a594ff2b, #a594ff0d);
}
.db-themed-select-check {
  color: var(--color-gold, #a594ff);
  font-size: 0.85rem;
  line-height: 1;
}
.db-model-preview,
.itp-3d-stage {
  background:
    radial-gradient(circle at 50% 42%, #352a6ae0 0%, #14102a 46%, #05060c 100%) !important;
  border: 1px solid #a594ff33;
  border-radius: 22px;
  width: 100%;
  height: 520px;
  position: relative;
  z-index: 0;
  overflow: hidden;
  box-shadow: inset 0 0 80px #5ee4c814, 0 16px 40px #00000073;
}
.mf-preview-vignette {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 3;
  box-shadow: inset 0 0 90px #020308aa;
  background:
    linear-gradient(180deg, #5ee4c810, transparent 18%),
    linear-gradient(0deg, #02030855, transparent 22%);
}
.db-model-preview canvas,
.itp-3d-stage canvas {
  background: transparent !important;
}
.db-ags-badge {
  z-index: 4;
  color: #c8beff;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  pointer-events: none;
  background: #0b0b14d6;
  border: 1px solid #5ee4c855;
  border-radius: 999px;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 0.6rem;
  font-weight: 800;
  display: flex;
  position: absolute;
  top: 14px;
  right: 14px;
}
.db-ags-badge:hover { color: #e0d5c1; border-color: #a594ff88; }
.db-ags-badge__mark {
  width: 10px;
  height: 10px;
  border: 1.5px solid #5ee4c8;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.db-ags-badge__mark span {
  width: 4px;
  height: 4px;
  background: #5ee4c8;
  border-radius: 50%;
}
.db-ags-badge__ext {
  width: 11px;
  height: 11px;
  opacity: 0.75;
  flex-shrink: 0;
}
[dir="rtl"] .db-ags-badge { right: auto; left: 12px; }

.itp-container { max-width: 1100px; }
.itp-back { color: var(--color-text-secondary, #a09880); }
.itp-back:hover { color: var(--color-gold, #a594ff); }
.itp-head,
.itp-panel {
  background: #ffffff08;
  border: 1px solid #a594ff26;
  border-radius: 16px;
}
.itp-panel__title {
  color: var(--color-gold, #a594ff);
  font-family: Cinzel, serif;
  letter-spacing: 0.12em;
}
.itp-head__name {
  font-family: Cinzel, serif;
  font-weight: 700;
}

@media (max-width: 900px) {
  .db-title { font-size: 1.7rem; }
  .db-body { flex-direction: column; gap: 12px; padding: 20px 16px 0; }
  .db-sidebar {
    border-radius: 10px;
    flex-flow: wrap;
    gap: 4px;
    width: 100%;
    padding: 8px;
    position: static;
  }
  .db-cat-btn {
    border: 1px solid #a594ff0f;
    border-radius: 6px;
    flex: 1;
    justify-content: center;
    min-width: 90px;
    padding: 8px 10px;
    font-size: 0.7rem;
  }
  .db-cat-btn.is-active:before,
  .db-cat-btn--active:before { display: none; }
  .db-grid { grid-template-columns: 1fr; }
  .db-model-preview, .itp-3d-stage { height: 420px; }
  .db-model-controls { grid-template-columns: 1fr; }
}

.db-armor-type-bar {
  background: #00000038;
  border: 1px solid #a594ff12;
  border-radius: 12px;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  padding: 14px;
  display: flex;
}
.db-atype-btn {
  color: #a09880bf;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  background: #ffffff06;
  border: 1px solid #a594ff1a;
  border-radius: 8px;
  padding: 9px 20px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  transition: all 0.16s;
}
.db-atype-btn:hover {
  color: var(--color-text-primary, #e0d5c1);
  background: #a594ff14;
  border-color: #a594ff33;
}
.db-atype-btn--active {
  color: var(--color-gold, #a594ff);
  background: #a594ff26;
  border-color: #a594ff73;
  font-weight: 700;
  box-shadow: 0 0 12px #a594ff1f;
}
.db-armor-slots {
  background: #0000002e;
  border: 1px solid #a594ff0f;
  border-radius: 12px;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px 12px;
  margin-bottom: 14px;
  padding: 14px 16px;
  display: grid;
}
.db-slot-check {
  cursor: pointer;
  user-select: none;
  border-radius: 6px;
  align-items: center;
  gap: 9px;
  padding: 5px 4px;
  transition: background 0.12s;
  display: flex;
}
.db-slot-check:hover { background: #a594ff0d; }
.db-slot-check input[type="checkbox"] { display: none; }
.db-slot-box {
  width: 17px;
  height: 17px;
  color: var(--color-gold, #a594ff);
  background: #ffffff08;
  border: 1px solid #a594ff40;
  border-radius: 4px;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  transition: all 0.14s;
  display: flex;
}
.db-slot-check--checked .db-slot-box {
  background: #a594ff2e;
  border-color: #a594ff80;
}
.db-slot-label {
  color: #a09880d9;
  letter-spacing: 0.03em;
  font-size: 0.8rem;
  transition: color 0.12s;
}
.db-slot-check--checked .db-slot-label {
  color: var(--color-text-primary, #e0d5c1);
}

/* RoM item tooltip — copied from their injected rarity CSS + container. */
.tooltip-container.tooltip-container--embedded,
#itp-tip.tooltip-container {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: none;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.95);
  border: 1px solid #fff;
  border-radius: 5px;
  padding: 8px 10px;
  color: #fff;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.2;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}
span.colored { color: inherit !important; }
.rarity0 span.colored { color: #FFFFFF; }
.rarity0 { border: 2px solid #ffffff5c !important; border-radius: 0.5em; }
.rarity_text0 { color: #FFFFFF; font-weight: normal; }
.rarity1 span.colored { color: #00FF00; }
.rarity1 { border: 2px solid #00FF00 !important; border-radius: 0.5em; }
.rarity_text1 { color: #00FF00; font-weight: normal; }
.rarity2 span.colored { color: #0072BC; }
.rarity2 { border: 2px solid #0072BC !important; border-radius: 0.5em; }
.rarity_text2 { color: #0072BC; font-weight: normal; }
.rarity3 span.colored { color: #C805F8; }
.rarity3 { border: 2px solid #C805F8 !important; border-radius: 0.5em; }
.rarity_text3 { color: #C805F8; font-weight: normal; }
.rarity4 span.colored { color: #F68E56; }
.rarity4 { border: 2px solid #F68E56 !important; border-radius: 0.5em; }
.rarity_text4 { color: #F68E56; font-weight: normal; }
.rarity5 span.colored { color: #A37D50; }
.rarity5 { border: 2px solid #A37D50 !important; border-radius: 0.5em; }
.rarity_text5 { color: #A37D50; font-weight: normal; }
.rarity6 span.colored { color: #F8D519; }
.rarity6 { border: 2px solid #F8D519 !important; border-radius: 0.5em; }
.rarity_text6 { color: #F8D519; font-weight: normal; }
.rarity7 span.colored { color: #ED145B; }
.rarity7 { border: 2px solid #ED145B !important; border-radius: 0.5em; }
.rarity_text7 { color: #ED145B; font-weight: normal; }
.rarity8 span.colored { color: #A864A8; }
.rarity8 { border: 2px solid #A864A8 !important; border-radius: 0.5em; }
.rarity_text8 { color: #A864A8; font-weight: normal; }
.rarity9 span.colored { color: #F7941D; }
.rarity9 { border: 2px solid #F7941D !important; border-radius: 0.5em; }
.rarity_text9 { color: #F7941D; font-weight: normal; }
.rarity10 span.colored { color: #FF0000; }
.rarity10 { border: 2px solid #FF0000 !important; border-radius: 0.5em; }
.rarity_text10 { color: #F7941D; font-weight: normal; }
.rom-tt-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.rom-tt-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: normal;
  font-family: Tahoma, Arial, sans-serif;
  white-space: nowrap;
}
.rom-tt-stars { display: flex; gap: 2px; margin-left: 15px; }
.rom-tt-line { margin-bottom: 1px; color: #fff; font-size: 13px; }
.rom-tt-split {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1px;
  gap: 8px;
  color: #fff;
  font-size: 13px;
}
.rom-tt-id { margin-top: 2px; color: #fff; font-size: 12px; }

.db-weapon-layout {
  align-items: flex-start;
  gap: 20px;
  display: flex;
}
.db-weapon-left { flex: 0 0 340px; min-width: 280px; }
.db-weapon-right { flex: 1; }
.db-builder-tooltip-shell { width: 100%; }
.db-item-builder {
  background: #0c0e16f2;
  border: 1px solid #a594ff2e;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 8px 32px #0009;
}
.db-builder-header {
  border-bottom: 1px solid #a594ff26;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 12px;
  display: flex;
}
.db-builder-title {
  font-family: Cinzel, serif;
  color: #a594ff;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 1.05rem;
}
.db-builder-chat-copy {
  color: #b8ad98;
  cursor: pointer;
  min-height: 28px;
  font: inherit;
  white-space: nowrap;
  background: #a594ff14;
  border: 1px solid #a594ff4d;
  border-radius: 6px;
  justify-content: center;
  align-items: center;
  padding: 5px 11px;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
}
.db-builder-chat-copy:hover {
  background: #a594ff26;
  border-color: #a594ff94;
}
.db-builder-controls {
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
  display: flex;
}
.db-builder-control {
  flex-direction: column;
  align-items: center;
  gap: 6px;
  display: flex;
}
.db-builder-ctrl-label {
  color: #a09880;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.72rem;
}
.db-builder-ctrl-row { align-items: center; gap: 10px; display: flex; }
.db-ctrl-btn {
  color: #a594ff;
  cursor: pointer;
  background: #a594ff1a;
  border: 1px solid #a594ff4d;
  border-radius: 6px;
  justify-content: center;
  align-items: center;
  width: 28px;
  height: 28px;
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
}
.db-ctrl-btn:hover { background: #a594ff40; border-color: #a594ff99; }
.db-ctrl-val {
  text-align: center;
  color: #e0d5c1;
  min-width: 36px;
  font-size: 1.1rem;
  font-weight: 700;
}
.db-builder-section {
  border-top: 1px solid #ffffff0f;
  margin-top: 4px;
  padding-top: 16px;
}
.db-builder-section-title {
  color: #a09880;
  text-transform: uppercase;
  letter-spacing: 1px;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 0.72rem;
  display: flex;
}
.db-builder-runes { border-top: 1px solid #ffffff0f; padding-top: 16px; }
.db-builder-rune-title {
  color: #a09880;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  font-size: 0.78rem;
  display: flex;
  justify-content: space-between;
}
.db-builder-rune-grid { grid-template-columns: 1fr 1fr; gap: 8px; display: grid; }
@media (max-width: 768px) {
  .db-weapon-layout { flex-direction: column; }
  .db-weapon-left { flex: unset; width: 100%; }
}
