/* ==========================================================================
   Componentes: cartões, botões, chips, badges, inputs, alertas, progresso,
   separadores, checklist, tabelas, pesquisa global
   ========================================================================== */

/* ---------- Cartões ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  min-width: 0;
}
.section-card { padding: var(--sp-5); }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--line);
}
.card-title {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-md);
  min-width: 0;
  overflow-wrap: anywhere;
}
.card-title > .icon { color: var(--on-red); background: var(--red); border-radius: var(--radius-sm); padding: 5px; width: 30px; height: 30px; }

.eyebrow { font-size: var(--fs-xs); color: var(--muted); letter-spacing: 0.04em; }
.sub-title { font-size: var(--fs-base); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 40px;
  padding: 8px 16px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: var(--fs-sm);
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}
.btn:hover { background: var(--surface-3); color: var(--text); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn-primary { background: var(--red); border-color: var(--red); color: var(--on-red); }
.btn-primary:hover { background: var(--red-hover); border-color: var(--red-hover); color: var(--on-red); }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-sm { min-height: 32px; padding: 5px 12px; font-size: var(--fs-xs); }
.file-btn { position: relative; }
.file-btn:focus-within { box-shadow: var(--focus); }

/* ---------- Chips e badges ---------- */
.chip-row { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 4px 12px;
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.chip:hover { border-color: var(--line-strong); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: var(--on-red); }
.chip-link { min-height: 28px; padding: 2px 10px 2px 4px; font-size: var(--fs-xs); }

.chip-style {
  --c: var(--style-hybrid);
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 22px;
  padding: 0 6px;
  border: 1px solid color-mix(in srgb, var(--c) 60%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--c) 14%, transparent);
  color: var(--c);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
}
.chip-style[data-style="melee"] { --c: var(--style-melee); }
.chip-style[data-style="ranged"] { --c: var(--style-ranged); }
.chip-style[data-style="magic"] { --c: var(--style-magic); }
.chip-style[data-style="necromancy"] { --c: var(--style-necromancy); }
.chip[aria-pressed="true"] .chip-style, .tab.active .chip-style { --c: var(--on-red); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: var(--fs-xs);
  font-weight: 700;
  white-space: nowrap;
}
.badge-red { background: var(--red); border-color: var(--red); color: var(--on-red); }
.badge-ok { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
.badge-no { background: var(--no-bg); border-color: var(--no-line); color: var(--no); white-space: normal; }
.badge-muted { color: var(--muted); font-style: italic; font-weight: 600; }

.count-pill {
  display: inline-block;
  padding: 1px 10px;
  border-radius: 999px;
  background: var(--red);
  color: var(--on-red);
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

/* ---------- Inputs ---------- */
.input {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  background: var(--bg-deep);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}
.input::placeholder { color: var(--muted); }
.input:focus-visible { border-color: var(--red-text); }

.field-search { position: relative; display: flex; align-items: center; flex: 1 1 260px; min-width: 0; }
.field-search > .icon { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.field-search .input { padding-left: 40px; }
.field-label { display: block; font-weight: 700; margin-bottom: var(--sp-2); }

.check {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  border: 2px solid var(--line-strong);
  border-radius: 6px;
  background: var(--bg-deep);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}
.check::after {
  content: "";
  width: 6px;
  height: 11px;
  border: solid var(--on-red);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg) translate(-1px, -1px) scale(0);
  transition: transform 0.15s var(--ease);
}
.check:checked { background: var(--red); border-color: var(--red); }
.check:checked::after { transform: rotate(45deg) translate(-1px, -1px) scale(1); }
.check:hover { border-color: var(--red-text); }

.inline-check { display: inline-flex; align-items: center; gap: var(--sp-2); cursor: pointer; }

/* Interruptor "só os que faltam" */
.switch { display: inline-flex; align-items: center; gap: var(--sp-2); cursor: pointer; font-weight: 600; white-space: nowrap; }
.switch-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
  transition: background 0.15s var(--ease);
}
.switch-track::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--platinum);
  transition: transform 0.15s var(--ease);
}
.switch-input:checked + .switch-track { background: var(--red); border-color: var(--red); }
.switch-input:checked + .switch-track::after { transform: translateX(18px); background: var(--on-red); }
.switch-input:focus-visible + .switch-track { box-shadow: var(--focus); }

/* ---------- Progresso ---------- */
.progress {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  overflow: hidden;
}
.progress-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--accent-bright));
  border-radius: inherit;
  transition: width 0.3s var(--ease);
}

/* ---------- Alertas ---------- */
.alert {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: var(--radius);
  font-size: var(--fs-sm);
}
.alert > .icon { margin-top: 1px; }
.alert-danger { background: var(--no-bg); border-color: var(--no-line); border-left-color: var(--red); }
.alert-danger > .icon, .alert-title { color: var(--no); }
.alert-title { font-size: var(--fs-base); }
.alert-text { margin-top: 4px; color: var(--text); }
.alert-warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--text); }
.alert-warn > .icon { color: var(--warn); }

.status { display: block; margin-top: var(--sp-3); font-size: var(--fs-sm); color: var(--text-2); }
.status:empty { display: none; }
.status.error { color: var(--no); }

/* ---------- Separadores (estilos) ---------- */
.tabs-scroll { overflow-x: auto; margin: 0 calc(var(--sp-1) * -1); padding: var(--sp-1); scrollbar-width: none; }
.tabs { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.tab {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 44px;
  padding: 6px 14px 6px 8px;
  background: var(--surface);
  color: var(--text-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 700;
  font-size: var(--fs-sm);
  text-align: left;
  cursor: pointer;
  max-width: 100%;
}
.tab:hover { border-color: var(--line-strong); color: var(--text); }
.tab.active { background: var(--red); border-color: var(--red); color: var(--on-red); box-shadow: 0 4px 14px color-mix(in srgb, var(--accent-glow) 35%, transparent); }
.tab-label { overflow-wrap: anywhere; }
.tab-not-gm { border-style: dashed; border-color: var(--no-line); }
.tab-warn { display: inline-flex; color: var(--no); }
.tab.active .tab-warn { color: var(--on-red); }

/* ---------- Checklist de achievements ---------- */
.ach-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }
.ach {
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.ach.done { background: color-mix(in srgb, var(--surface-2) 70%, var(--bg-deep)); border-color: var(--line); }
.ach-head { display: flex; align-items: flex-start; gap: var(--sp-3); flex-wrap: wrap; }
.ach-name { flex: 1 1 200px; min-width: 0; font-weight: 700; cursor: pointer; overflow-wrap: anywhere; }
.ach.done .ach-name { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--red-text); }
.ach-body { margin-left: calc(22px + var(--sp-3)); }
.ach-meta { margin-top: var(--sp-1); font-size: var(--fs-sm); color: var(--muted); overflow-wrap: anywhere; }
.ach-meta strong { color: var(--text-2); font-weight: 700; }
.ach-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: var(--sp-2); font-size: var(--fs-sm); }
.ach-foot:empty { display: none; }
.ach-foot-label { color: var(--muted); font-weight: 600; }
.ach-wiki { font-weight: 700; margin-left: auto; }
.ach-foot-label ~ .ach-wiki { margin-left: auto; }

.req-mark { font-weight: 900; }
.req-mark.ok { color: var(--ok); }
.req-mark.no { color: var(--no); }

/* ---------- Tabelas ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th, .table td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.table tbody tr:last-child td { border-bottom: 0; }
.table th { background: var(--surface-2); color: var(--muted); font-weight: 700; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.04em; }
.table td:last-child, .table th:last-child { text-align: center; width: 2.5em; }
.table tr.no td:first-child { box-shadow: inset 3px 0 0 var(--no-line); }
.table tr.ok td:first-child { box-shadow: inset 3px 0 0 var(--ok-line); }
.req-b { color: var(--muted); cursor: help; }

/* ---------- Pesquisa global (lista de resultados) ---------- */
.gs-list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 60;
  width: min(420px, calc(100vw - 32px));
  max-height: min(70vh, 480px);
  overflow-y: auto;
  margin: 0;
  padding: var(--sp-2);
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}
.gs-group { padding: 8px 8px 4px; color: var(--muted); font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.gs-option {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.gs-option.active, .gs-option:hover { background: var(--surface-3); }
.gs-option.active { box-shadow: inset 3px 0 0 var(--red); }
.gs-main { font-weight: 600; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.gs-sub { color: var(--muted); font-size: var(--fs-xs); }
.gs-empty { padding: 10px; color: var(--muted); }

/* ---------- Ações em bloco ---------- */
.bulk-menu { min-width: 0; max-width: 100%; }
.bulk-menu[open] { flex-basis: 100%; }
.bulk-summary { list-style: none; width: max-content; max-width: 100%; color: var(--text-2); }
.bulk-summary::-webkit-details-marker { display: none; }
.bulk-summary::after { content: "▾"; font-size: 0.8em; transition: transform 0.15s var(--ease); }
.bulk-menu[open] > .bulk-summary::after { transform: rotate(180deg); }
.bulk-panel {
  display: grid;
  gap: var(--sp-3);
  margin-top: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.bulk-group { display: grid; gap: 6px; min-width: 0; }
.bulk-group-title { color: var(--muted); font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; overflow-wrap: anywhere; }
.bulk-group-row, .bulk-tier-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); min-width: 0; }
.bulk-group-row .btn, .bulk-tier-tools .btn { white-space: normal; text-align: left; }
.bulk-label { color: var(--text-2); font-size: var(--fs-sm); font-weight: 700; }
.bulk-select { width: auto; min-height: 32px; padding: 4px 8px; font-size: var(--fs-sm); max-width: 100%; }
.bulk-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--line); }
.bulk-undo:disabled { opacity: 0.45; cursor: not-allowed; }
.bulk-hint { flex: 1 1 220px; min-width: 0; }

/* Menu "⋯" por linha */
.ach { position: relative; }
.row-menu { margin-left: auto; position: relative; }
.row-menu-btn {
  list-style: none;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 28px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}
.row-menu-btn::-webkit-details-marker { display: none; }
.row-menu-btn:hover, .row-menu[open] > .row-menu-btn { border-color: var(--line-strong); color: var(--text); background: var(--surface-3); }
.row-menu-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 15;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}

/* Barra "Desfazer" (toast) */
.bulk-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--bottom-nav-h) + var(--sp-4));
  transform: translateX(-50%);
  z-index: 80;
  display: flex;
  align-items: center;
  gap: var(--sp-2) var(--sp-3);
  flex-wrap: wrap;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-4);
  background: var(--surface-3);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  font-weight: 700;
  font-size: var(--fs-sm);
}
.bulk-toast[hidden] { display: none; }
.bulk-toast-msg { flex: 1 1 auto; min-width: 0; }
.bulk-toast-close { min-width: 32px; padding: 4px 8px; font-size: 1.1em; }

/* Aviso de paleta desbloqueada (js/lib/palette.js): em cima, sem auto-hide */
.palette-toast {
  position: fixed;
  left: 50%;
  top: calc(var(--header-h) + 12px);
  transform: translateX(-50%);
  z-index: 80;
  display: flex;
  align-items: center;
  gap: var(--sp-2) var(--sp-3);
  flex-wrap: wrap;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-4);
  background: var(--surface-3);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  font-weight: 700;
  font-size: var(--fs-sm);
}
.palette-toast[hidden] { display: none; }
.palette-toast-msg { flex: 1 1 auto; min-width: 0; }
.palette-toast-close { min-width: 32px; padding: 4px 8px; font-size: 1.1em; }

/* Seletor de paleta (página do jogador) */
.palette-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--sp-2); margin-top: var(--sp-3); }
.palette-opt { position: relative; display: block; cursor: pointer; }
.palette-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.palette-face {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 44px;
  padding: 6px 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.palette-opt:hover .palette-face { border-color: var(--line-strong); color: var(--text); }
.palette-input:checked + .palette-face { border-color: var(--red-text); color: var(--text); box-shadow: inset 0 0 0 1px var(--red-text); }
.palette-input:focus-visible + .palette-face { box-shadow: var(--focus); }
.palette-opt.is-locked { cursor: not-allowed; }
.palette-opt.is-locked .palette-face { border-style: dashed; color: var(--muted); }
.palette-opt.is-locked .palette-swatch { opacity: 0.45; }
.palette-swatch {
  flex-shrink: 0;
  width: 36px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: linear-gradient(90deg, var(--bg) 0 33%, var(--surface) 33% 66%, var(--red) 66%);
}
.palette-name { min-width: 0; overflow-wrap: anywhere; }

/* Seletor da cor do anel do progresso (página do jogador; js/lib/ring.js): mesmo padrão do seletor de paleta */
.ring-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.ring-face { min-height: 68px; padding: 6px 10px 6px 6px; }
.ring-thumb { position: relative; flex: 0 0 56px; width: 56px; height: 56px; }
.ring-thumb img { display: block; width: 100%; height: 100%; }
.ring-lock { position: absolute; inset: 0; display: grid; place-items: center; font-size: 18px; filter: drop-shadow(0 1px 2px #000); }
.ring-text { display: grid; gap: 2px; min-width: 0; }
.ring-req { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.ring-tier { font-size: var(--fs-xs); font-weight: 600; color: var(--text-2); }
.ring-new { justify-self: start; }
.ring-opt.is-locked .ring-thumb img { opacity: 0.35; filter: grayscale(0.7); }
.ring-next { margin-top: var(--sp-1, 4px); }
.ring-toast-ico { flex: 0 0 28px; }
/* por baixo do aviso das paletas/animações (podem aparecer na mesma volta) */
.ring-toast { top: calc(var(--header-h) + 76px); }

/* Confirmação */
.bulk-dialog {
  width: min(440px, calc(100vw - 32px));
  padding: var(--sp-5);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-top: 4px solid var(--red);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}
.bulk-dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
.bulk-dialog-title { font-size: var(--fs-md); }
.bulk-dialog-msg { margin-top: var(--sp-2); font-size: var(--fs-base); }
.bulk-dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-5); }

/* ---------- Estados vazios ---------- */
.empty { padding: var(--sp-6); text-align: center; color: var(--muted); }
.empty-card { padding: var(--sp-8) var(--sp-5); text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); }
.empty-card .icon-lg { color: var(--muted); }
.empty-title { font-weight: 800; font-size: var(--fs-md); }

/* ---------- Collection log do boss (js/components/drops.js) ----------
   Grelha de botões 44×44 com o ícone no tamanho nativo (≤ 36 px). Em falta: cinzento e escuro;
   obtido: cor normal + borda/fundo --ok e um pequeno ✓. Só tokens. */
.drops { display: grid; gap: var(--sp-3); }
.drops-groups { display: grid; gap: var(--sp-4); }
.drops-group { display: grid; gap: var(--sp-2); min-width: 0; }
.drops-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  font-size: var(--fs-base);
  overflow-wrap: anywhere;
}
.drops-grid { display: grid; grid-template-columns: repeat(auto-fill, 44px); gap: 6px; }
.drops-item {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.drops-item:hover { border-color: var(--line-strong); }
.drops-icon {
  display: block;
  max-width: 36px;
  max-height: 36px;
  image-rendering: pixelated;
  transition: filter 0.15s var(--ease);
}
.drops-item.is-missing .drops-icon { filter: grayscale(1) brightness(0.45); }
.drops-item.is-missing:hover .drops-icon { filter: grayscale(1) brightness(0.7); }
.drops-item.is-have { background: var(--ok-bg); border-color: var(--ok-line); }
.drops-item.is-have:hover { border-color: var(--ok); }
.drops-check {
  display: none;
  position: absolute;
  top: 1px;
  right: 3px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  color: var(--ok);
}
.drops-item.is-have .drops-check { display: block; }
.drops-tag {
  position: absolute;
  left: 3px;
  bottom: 1px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  color: var(--muted);
}
/* Ícone em falta (onerror): mostra o nome em texto pequeno */
.drops-fallback { display: none; }
.drops-item.is-broken .drops-fallback {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding: 2px;
  font-size: 9px;
  line-height: 1.1;
  text-align: center;
  overflow-wrap: anywhere;
}
.drops-item.is-broken.is-missing .drops-fallback { color: var(--muted); }
.drops-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.drops-undo[hidden] { display: none; }

/* Faixa larga na ficha do boss (abaixo do hero, largura do hero): contagem + ações na linha do título,
   grelha que estica as células até preencher a linha, altura inicial limitada com "Ver tudo". */
.drops-head-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--sp-2); }
.drops-wide .drops-grid { grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); }
.drops-wide .drops-item { width: 100%; height: 50px; }
.drops-wide .drops-groups { --drops-max: 236px; }
.drops-wide .drops-groups.is-collapsed {
  max-height: var(--drops-max);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 44px), transparent);
  mask-image: linear-gradient(180deg, #000 calc(100% - 44px), transparent);
}
.drops-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2) var(--sp-4); }
.drops-foot .drops-credit { margin: 0; }
.drops-more[hidden] { display: none; }
@media (max-width: 560px) {
  .drops-head-tools { justify-content: flex-start; }
  .drops-wide .drops-grid { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
  .drops-wide .drops-item { height: 56px; }
  .drops-wide .drops-groups { --drops-max: 254px; }
}
.drops-shared, .drops-credit { overflow-wrap: anywhere; }
.drops-credit a { white-space: nowrap; }

/* Troféu(s) do boss no canto direito do collection log (fora da contagem do log). */
.drops-main { display: flex; align-items: flex-start; gap: var(--sp-4); }
.drops-main > .drops-groups { flex: 1 1 auto; min-width: 0; }
.drops-trophy { flex: 0 0 auto; display: grid; gap: var(--sp-2); justify-items: end; padding-left: var(--sp-4); border-left: 1px solid var(--line); }
.drops-trophy-k { font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--boss-gold, var(--gold, #dcc674)); }
.drops-trophy-list { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 112px; }
.drops-trophy .drops-item { width: 50px; height: 56px; border-color: color-mix(in srgb, var(--boss-gold, #dcc674) 40%, var(--line)); }
.drops-trophy-img { width: 30px; height: 42px; object-fit: contain; display: block; margin: auto; }
.drops-trophy .drops-item.is-have { background: color-mix(in srgb, var(--boss-gold, #dcc674) 14%, transparent); border-color: var(--boss-gold, #dcc674); box-shadow: 0 0 10px -3px var(--boss-gold, #dcc674); }
@media (max-width: 640px) {
  .drops-main { flex-direction: column; }
  .drops-trophy { width: 100%; padding-left: 0; padding-top: var(--sp-3); border-left: 0; border-top: 1px solid var(--line); grid-auto-flow: column; justify-content: space-between; align-items: center; }
}
