/**
 * Cards de extensão gamificados + barra de busca RPG
 * Frente: ícone · nome · nota · estrelas · comentários
 * Clique: grimório (modal) com demais campos do SQL
 */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#extensoes-test-section {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto 2rem;
  padding: 0 12px;
}

#extensoes-test-section.mek-section {
  padding: 18px 14px;
  box-shadow: none;
  background: transparent;
}

#extensoes-test-grid,
.ecr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.ecr-loading,
.ecr-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--mek-muted, #9a8f7a);
  padding: 28px;
  font-family: var(--mek-font, Outfit, sans-serif);
}

/* ===== Barra de busca / filtros ===== */
.ecr-search {
  position: relative;
  margin: 0 0 22px;
  padding: 18px 18px 14px;
  border-radius: 16px;
  border: 1px solid rgba(201, 162, 39, 0.5);
  background: #16120e;
  background-image: linear-gradient(165deg, #2a2216 0%, #101018 100%);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  overflow: visible;
  font-family: var(--mek-font, Outfit, sans-serif);
  color: var(--mek-text, #f2ead8);
  accent-color: #c9a227;
}

.ecr-search > * {
  position: relative;
  z-index: 1;
}

.ecr-search-head {
  margin-bottom: 14px;
}

.ecr-search-kicker {
  margin: 0 0 4px;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mek-gold, #e8c547);
  font-family: var(--mek-display, Cinzel, serif);
  display: flex;
  align-items: center;
  gap: 8px;
}

.ecr-search-title {
  margin: 0;
  font-family: var(--mek-display, Cinzel, serif);
  font-size: 1.15rem;
  color: #f7efd8;
  letter-spacing: 0.03em;
}

.ecr-search-sub {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: var(--mek-muted, #9a8f7a);
  line-height: 1.4;
}

.ecr-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

.ecr-search-field {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px 0 40px;
  border-radius: 12px;
  border: 1px solid rgba(201, 162, 39, 0.35);
  background: rgba(0, 0, 0, 0.38);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ecr-search-field--grow {
  flex: 1 1 220px;
  min-width: min(100%, 220px);
}

.ecr-search-field > i:first-child {
  position: absolute;
  left: 14px;
  color: var(--mek-gold, #e8c547);
  font-size: 0.9rem;
  pointer-events: none;
}

.ecr-search-field input {
  flex: 1;
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--mek-text, #f2ead8);
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
  padding: 10px 28px 10px 0;
}

.ecr-search-field input::placeholder {
  color: rgba(154, 143, 120, 0.75);
}

/* Remove X nativo azul do Chrome/Edge em type=search */
.ecr-search-field input[type="search"]::-webkit-search-cancel-button,
.ecr-search-field input[type="search"]::-webkit-search-decoration,
.ecr-search-field input[type="search"]::-webkit-search-results-button,
.ecr-search-field input[type="search"]::-webkit-search-results-decoration,
input[type="search"].tr-rpg-search-input::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none !important;
  appearance: none !important;
  display: none !important;
}

.ecr-search-field:focus-within {
  border-color: rgba(232, 197, 71, 0.7);
  box-shadow: 0 0 0 2px rgba(232, 197, 71, 0.12);
}

.ecr-search-clear {
  appearance: none;
  position: absolute;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: rgba(201, 162, 39, 0.15);
  color: var(--mek-gold, #e8c547);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.ecr-search-clear[hidden] {
  display: none !important;
}

/* Dropdowns custom (substituem select nativo) */
.ecr-dd {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 0 1 160px;
  min-width: 138px;
  z-index: 2;
}

.ecr-dd.is-open {
  z-index: 40;
}

.ecr-dd-label {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mek-muted, #9a8f7a);
  font-family: var(--mek-display, Cinzel, serif);
  padding-left: 2px;
}

.ecr-dd-trigger {
  appearance: none;
  position: relative;
  width: 100%;
  min-height: 44px;
  padding: 0 36px 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(201, 162, 39, 0.4);
  background: rgba(8, 7, 12, 0.85);
  color: var(--mek-text, #f2ead8);
  font-family: inherit;
  font-size: 0.86rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  text-align: left;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  accent-color: #c9a227;
}

.ecr-dd-trigger .ecr-dd-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ecr-dd-trigger > i {
  position: absolute;
  right: 12px;
  color: var(--mek-gold, #e8c547);
  font-size: 0.72rem;
  transition: transform 0.15s;
  pointer-events: none;
}

.ecr-dd.is-open .ecr-dd-trigger {
  border-color: rgba(232, 197, 71, 0.75);
  box-shadow: 0 0 0 2px rgba(232, 197, 71, 0.12);
}

.ecr-dd.is-open .ecr-dd-trigger > i {
  transform: rotate(180deg);
}

.ecr-dd-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 6px;
  list-style: none;
  max-height: 240px;
  overflow-y: auto;
  border-radius: 12px;
  border: 1px solid rgba(201, 162, 39, 0.55);
  background:
    linear-gradient(165deg, rgba(36, 30, 18, 0.98) 0%, rgba(12, 12, 18, 0.99) 100%);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
  z-index: 50;
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 162, 39, 0.5) transparent;
}

.ecr-dd-menu[hidden] {
  display: none !important;
}

.ecr-dd-option {
  padding: 10px 12px;
  border-radius: 8px;
  color: #e8dfcc;
  font-size: 0.86rem;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.ecr-dd-option:hover {
  background: rgba(201, 162, 39, 0.14);
  color: #f7efd8;
}

.ecr-dd-option.is-selected {
  background: linear-gradient(165deg, rgba(232, 197, 71, 0.28), rgba(154, 116, 24, 0.2));
  color: #e8c547;
  font-weight: 600;
}

.ecr-search-reset {
  appearance: none;
  align-self: flex-end;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(201, 162, 39, 0.45);
  background: linear-gradient(165deg, rgba(232, 197, 71, 0.22), rgba(0, 0, 0, 0.4));
  color: var(--mek-gold, #e8c547);
  font-family: var(--mek-display, Cinzel, serif);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: border-color 0.15s, background 0.15s;
}

.ecr-search-reset:hover {
  border-color: rgba(232, 197, 71, 0.8);
  background: rgba(201, 162, 39, 0.22);
}

.ecr-search-foot {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: space-between;
}

.ecr-search-stats {
  margin: 0;
  font-size: 0.78rem;
  color: var(--mek-muted, #9a8f7a);
}

.ecr-search-empty {
  margin: 0;
  width: 100%;
  text-align: center;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(244, 117, 106, 0.35);
  background: rgba(244, 117, 106, 0.08);
  color: #f5c4be;
  font-size: 0.86rem;
}

.ecr-search-empty[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  .ecr-dd,
  .ecr-search-reset {
    flex: 1 1 calc(50% - 10px);
  }

  .ecr-search-reset {
    justify-content: center;
  }
}

/* ===== Qualidade por nota (só visual, sem rótulos) =====
   Progressão de grimório: ferro → bronze → prata → rubi → ouro
   Nota 8 (prata) ≠ Nota 10 (ouro) */
.ecr-card.ecr-tier-comum {
  border-color: rgba(120, 128, 140, 0.45);
  background: #14161a;
  background-image: linear-gradient(168deg, #23262c 0%, #0e1014 100%);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.32);
}
.ecr-card.ecr-tier-comum .ecr-card-icon {
  border-color: rgba(120, 128, 140, 0.4);
  box-shadow: none;
}
.ecr-card.ecr-tier-comum .ecr-card-nota {
  border-color: rgba(148, 156, 168, 0.55);
  background: #6b7380;
  background-image: linear-gradient(165deg, #9aa3b0, #6b7380 55%, #4a5260);
  color: #0e1116;
  box-shadow: none;
}
.ecr-card.ecr-tier-comum:hover,
.ecr-card.ecr-tier-comum:focus-visible {
  border-color: rgba(170, 178, 190, 0.7);
}

.ecr-card.ecr-tier-raro {
  border-color: rgba(180, 130, 72, 0.55);
  background: #17120e;
  background-image: linear-gradient(168deg, #2e2218 0%, #100e0c 100%);
}
.ecr-card.ecr-tier-raro .ecr-card-icon {
  border-color: rgba(180, 130, 72, 0.5);
}
.ecr-card.ecr-tier-raro .ecr-card-nota {
  border-color: rgba(210, 160, 95, 0.7);
  background: #a67c52;
  background-image: linear-gradient(165deg, #d4a574, #a67c52 55%, #6e4a2e);
  color: #1a1008;
}
.ecr-card.ecr-tier-raro:hover,
.ecr-card.ecr-tier-raro:focus-visible {
  border-color: rgba(220, 170, 110, 0.8);
}

/* 8.x — prata / aço frio (não amarelo) */
.ecr-card.ecr-tier-unico {
  border-color: rgba(190, 205, 220, 0.55);
  background: #12161c;
  background-image: linear-gradient(168deg, #2a323c 0%, #0c1016 100%);
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.36),
    inset 0 0 0 1px rgba(210, 220, 235, 0.08);
}
.ecr-card.ecr-tier-unico .ecr-card-icon {
  border-color: rgba(190, 205, 220, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.ecr-card.ecr-tier-unico .ecr-card-nota {
  border-color: rgba(220, 230, 240, 0.7);
  background: #9eb0c4;
  background-image: linear-gradient(165deg, #e8eef5, #9eb0c4 50%, #5c6d82);
  color: #0c1218;
  box-shadow: 0 0 10px rgba(180, 200, 220, 0.18);
}
.ecr-card.ecr-tier-unico:hover,
.ecr-card.ecr-tier-unico:focus-visible {
  border-color: rgba(230, 238, 248, 0.85);
}

/* 9.x — rubi / granada (quente, sem roxo) */
.ecr-card.ecr-tier-epico {
  border-color: rgba(196, 72, 72, 0.6);
  background: #180e10;
  background-image: linear-gradient(168deg, #3a181c 0%, #100a0c 100%);
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.38),
    inset 0 0 0 1px rgba(220, 90, 90, 0.12);
}
.ecr-card.ecr-tier-epico .ecr-card-icon {
  border-color: rgba(196, 72, 72, 0.55);
}
.ecr-card.ecr-tier-epico .ecr-card-nota {
  border-color: rgba(240, 140, 140, 0.7);
  background: #b33a3a;
  background-image: linear-gradient(165deg, #e87878, #b33a3a 50%, #6e1c1c);
  color: #1a0808;
  box-shadow: 0 0 12px rgba(180, 50, 50, 0.22);
}
.ecr-card.ecr-tier-epico:hover,
.ecr-card.ecr-tier-epico:focus-visible {
  border-color: rgba(240, 150, 150, 0.85);
}

/* 10 — ouro lendário (único amarelo/dourado pleno) */
.ecr-card.ecr-tier-lendario {
  border-color: rgba(232, 197, 71, 0.9);
  background: #1a1408;
  background-image: linear-gradient(168deg, #4a3810 0%, #1a1208 48%, #100c08 100%);
  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.42),
    inset 0 0 0 1px rgba(255, 230, 140, 0.2),
    0 0 20px rgba(201, 162, 39, 0.12);
}
.ecr-card.ecr-tier-lendario::after {
  content: '';
  position: absolute;
  inset: 7px;
  border-radius: 12px;
  border: 1px solid rgba(232, 197, 71, 0.28);
  pointer-events: none;
  z-index: 0;
}
.ecr-card.ecr-tier-lendario .ecr-card-icon {
  border-color: rgba(232, 197, 71, 0.75);
  box-shadow:
    0 0 0 1px rgba(255, 230, 140, 0.15),
    0 0 14px rgba(201, 162, 39, 0.2);
}
.ecr-card.ecr-tier-lendario .ecr-card-nota {
  border-color: rgba(255, 230, 150, 0.95);
  background: #c9a227;
  background-image: linear-gradient(165deg, #f3e0a0, #e8c547 35%, #c9a227 70%, #8a6914);
  color: #1a1408;
  box-shadow: 0 0 14px rgba(232, 197, 71, 0.35);
}
.ecr-card.ecr-tier-lendario:hover,
.ecr-card.ecr-tier-lendario:focus-visible {
  border-color: #f3e0a0;
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.48),
    inset 0 0 0 1px rgba(255, 230, 140, 0.28),
    0 0 24px rgba(232, 197, 71, 0.2);
}

/* Modal: nota herda o mesmo metal do tier */
.ecr-modal.ecr-tier-comum .ecr-card-nota,
.ecr-card-nota.ecr-tier-comum {
  border-color: rgba(148, 156, 168, 0.55);
  background: #6b7380;
  background-image: linear-gradient(165deg, #9aa3b0, #6b7380 55%, #4a5260);
  color: #0e1116;
}
.ecr-modal.ecr-tier-raro .ecr-card-nota,
.ecr-card-nota.ecr-tier-raro {
  border-color: rgba(210, 160, 95, 0.7);
  background: #a67c52;
  background-image: linear-gradient(165deg, #d4a574, #a67c52 55%, #6e4a2e);
  color: #1a1008;
}
.ecr-modal.ecr-tier-unico .ecr-card-nota,
.ecr-card-nota.ecr-tier-unico {
  border-color: rgba(220, 230, 240, 0.7);
  background: #9eb0c4;
  background-image: linear-gradient(165deg, #e8eef5, #9eb0c4 50%, #5c6d82);
  color: #0c1218;
}
.ecr-modal.ecr-tier-epico .ecr-card-nota,
.ecr-card-nota.ecr-tier-epico {
  border-color: rgba(240, 140, 140, 0.7);
  background: #b33a3a;
  background-image: linear-gradient(165deg, #e87878, #b33a3a 50%, #6e1c1c);
  color: #1a0808;
}
.ecr-modal.ecr-tier-lendario .ecr-card-nota,
.ecr-card-nota.ecr-tier-lendario {
  border-color: rgba(255, 230, 150, 0.95);
  background: #c9a227;
  background-image: linear-gradient(165deg, #f3e0a0, #e8c547 35%, #c9a227 70%, #8a6914);
  color: #1a1408;
}

.ecr-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 18px 14px 14px;
  border-radius: 16px;
  border: 1px solid rgba(201, 162, 39, 0.5);
  background: #16120e;
  background-image: linear-gradient(165deg, #2a2216 0%, #0e0e14 100%);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  text-align: center;
  transition: transform 0.15s ease, border-color 0.15s ease;
  overflow: hidden;
  font-family: var(--mek-font, Outfit, sans-serif);
  color: var(--mek-text, #f2ead8);
  contain: content;
  content-visibility: auto;
  contain-intrinsic-size: auto 300px;
}

.ecr-card:hover,
.ecr-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(232, 197, 71, 0.8);
  outline: none;
}

.ecr-card > * {
  position: relative;
  z-index: 1;
}

.ecr-card-icon {
  width: 84px;
  height: 84px;
  border-radius: 16px;
  border: 1px solid rgba(201, 162, 39, 0.4);
  background: #0c0b10;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.ecr-card-icon img {
  width: 78%;
  height: 78%;
  object-fit: contain;
}

.ecr-card-name {
  margin: 0;
  font-family: var(--mek-display, Cinzel, serif);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #f7efd8;
  line-height: 1.25;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ecr-card-nota {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(232, 197, 71, 0.65);
  background: #c9a227;
  background-image: linear-gradient(165deg, #e8c547 0%, #c9a227 55%, #8a6914 100%);
  color: #1a1408;
  font-family: var(--mek-display, Cinzel, serif);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.ecr-card-nota small {
  font-size: 0.62rem;
  opacity: 0.75;
  text-transform: uppercase;
}

.ecr-card-stars {
  margin: -4px 0 0;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: rgba(154, 143, 120, 0.55);
}

.ecr-card-stars .is-on {
  color: #e8c547;
}

.ecr-card-stars--empty {
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--mek-muted, #9a8f7a);
}

.ecr-card--problem {
  border-color: rgba(244, 117, 106, 0.55);
}

.ecr-card-problem {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid rgba(244, 117, 106, 0.4);
  background: rgba(244, 117, 106, 0.12);
  margin-bottom: 2px;
}

.ecr-card-problem-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f5a89f;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ecr-btn-problem {
  appearance: none;
  border: 1px solid rgba(244, 117, 106, 0.45);
  background: rgba(0, 0, 0, 0.28);
  color: #fce8e6;
  border-radius: 8px;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 4px 8px;
  cursor: pointer;
}

.ecr-btn-problem:hover {
  border-color: rgba(244, 117, 106, 0.75);
  color: #fff;
}

.ecr-card-actions {
  width: 100%;
  margin-top: 2px;
}

.ecr-btn-comments {
  appearance: none;
  width: 100%;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 11px;
  border: 1px solid rgba(201, 162, 39, 0.35);
  background: rgba(0, 0, 0, 0.32);
  color: var(--mek-text, #f2ead8);
  font-family: var(--mek-font, Outfit, sans-serif);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.ecr-btn-comments:hover,
.ecr-btn-comments:focus-visible {
  border-color: rgba(232, 197, 71, 0.6);
  color: var(--mek-gold, #e8c547);
  background: rgba(201, 162, 39, 0.12);
  outline: none;
}

.ecr-card-hint {
  margin: 0;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(154, 143, 120, 0.75);
}

/* ===== Modal grimório ===== */
.ecr-modal {
  position: fixed;
  inset: 0;
  z-index: 100060;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.ecr-modal[hidden] {
  display: none;
}

.ecr-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 10, 0.82);
  /* sem blur — mais leve no GPU */
}

.ecr-modal-panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(88vh, 820px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #14110c;
  background-image: linear-gradient(180deg, #241e14 0%, #121218 42%, #101018 100%);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.6);
  animation: ecrModalIn 0.24s cubic-bezier(0.4, 0, 0.2, 1);
}

.ecr-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 14px;
  border-bottom: 1px solid rgba(201, 162, 39, 0.22);
  flex-shrink: 0;
}

.ecr-modal-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.ecr-modal-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  border: 1px solid rgba(201, 162, 39, 0.45);
  background: rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
}

.ecr-modal-icon-wrap img {
  width: 80%;
  height: 80%;
  object-fit: contain;
}

.ecr-modal-kicker {
  margin: 0 0 2px;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mek-gold, #e8c547);
  font-family: var(--mek-display, Cinzel, serif);
}

.ecr-modal-head h2 {
  margin: 0;
  font-family: var(--mek-display, Cinzel, serif);
  font-size: 1.25rem;
  color: #f7efd8;
  word-break: break-word;
}

.ecr-modal-score {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.ecr-modal-user-stars {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  font-size: 0.85rem;
  color: rgba(154, 143, 120, 0.45);
}

.ecr-modal-user-stars .is-on {
  color: #e8c547;
}

.ecr-modal-close {
  appearance: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(244, 117, 106, 0.35);
  background: rgba(244, 117, 106, 0.1);
  color: #f5a89f;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.ecr-modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  background: transparent;
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 162, 39, 0.5) transparent;
}

.ecr-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.ecr-stat {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(201, 162, 39, 0.22);
  background: rgba(0, 0, 0, 0.28);
}

.ecr-stat span {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mek-muted, #9a8f7a);
  margin-bottom: 4px;
  font-family: var(--mek-display, Cinzel, serif);
}

.ecr-stat strong {
  font-size: 0.9rem;
  font-weight: 600;
  color: #f2ead8;
  word-break: break-word;
}

.ecr-block {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(201, 162, 39, 0.2);
  background: rgba(0, 0, 0, 0.22);
}

.ecr-block:last-child {
  margin-bottom: 0;
}

.ecr-block h3 {
  margin: 0 0 8px;
  font-family: var(--mek-display, Cinzel, serif);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mek-gold, #e8c547);
}

.ecr-block ul {
  margin: 0;
  padding-left: 18px;
  color: #d8d0c0;
  font-size: 0.86rem;
  line-height: 1.45;
}

.ecr-block--warn {
  border-color: rgba(245, 185, 66, 0.4);
  background: rgba(245, 185, 66, 0.08);
}

.ecr-block--danger {
  border-color: rgba(244, 117, 106, 0.45);
  background: rgba(244, 117, 106, 0.1);
  color: #f5c4be;
  font-size: 0.88rem;
  line-height: 1.45;
}

/* Rodapé gamificado — NÃO usar <footer> (styles.css global quebra o visual) */
.ecr-modal-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 !important;
  padding: 14px 18px 18px !important;
  border-top: 1px solid rgba(201, 162, 39, 0.35) !important;
  background:
    linear-gradient(180deg, rgba(36, 30, 18, 0.95) 0%, rgba(18, 15, 12, 0.98) 100%) !important;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.ecr-foot-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid rgba(201, 162, 39, 0.5);
  font-family: var(--mek-display, Cinzel, serif);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-decoration: none !important;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
  width: auto !important;
  height: auto !important;
  background-clip: padding-box;
}

.ecr-foot-btn--ghost {
  background: rgba(0, 0, 0, 0.35);
  color: #e8dfcc;
  border-color: rgba(201, 162, 39, 0.35);
}

.ecr-foot-btn--ghost:hover {
  border-color: rgba(232, 197, 71, 0.65);
  color: #f7efd8;
  background: rgba(201, 162, 39, 0.1);
}

.ecr-foot-btn--gold {
  background: linear-gradient(165deg, #e8c547 0%, #c9a227 48%, #8a6914 100%);
  color: #1a1408 !important;
  border-color: rgba(255, 230, 150, 0.55);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.ecr-foot-btn--gold:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.ecr-modal-foot .ecr-foot-btn[href].is-disabled,
.ecr-modal-foot .ecr-foot-btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

@keyframes ecrModalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ===== Modal de problema ===== */
.ecr-problem-modal {
  position: fixed;
  inset: 0;
  z-index: 100070;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.ecr-problem-modal[hidden] {
  display: none;
}

.ecr-problem-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 10, 0.82);
}

.ecr-problem-modal-panel {
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
  padding: 22px 20px 18px;
  border-radius: 16px;
  border: 1px solid rgba(244, 117, 106, 0.5);
  background: linear-gradient(165deg, rgba(42, 22, 22, 0.98), rgba(12, 10, 14, 0.99));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  color: #f2ead8;
  font-family: var(--mek-font, Outfit, sans-serif);
}

.ecr-problem-modal-panel h3 {
  margin: 0 0 6px;
  font-family: var(--mek-display, Cinzel, serif);
  color: #f5a89f;
  font-size: 1.1rem;
}

.ecr-problem-modal-name {
  margin: 0 0 12px;
  color: var(--mek-muted, #9a8f7a);
  font-size: 0.88rem;
}

.ecr-problem-modal-body {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(244, 117, 106, 0.3);
  background: rgba(0, 0, 0, 0.28);
  color: #f5c4be;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.ecr-problem-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: rgba(244, 117, 106, 0.15);
  color: #f5a89f;
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
}

/* Botão carregar mais (desktop + mobile) */
.ecr-load-more {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 420px;
  margin: 22px auto 6px;
  min-height: 52px;
  padding: 12px 22px;
  border-radius: 14px;
  border: 1px solid rgba(255, 230, 150, 0.55);
  cursor: pointer;
  font-family: var(--mek-display, Cinzel, serif);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1a1408;
  background:
    linear-gradient(165deg, #f0d56a 0%, #e8c547 42%, #c9a227 78%, #a67c18 100%);
  box-shadow:
    0 0 0 1px rgba(255, 240, 180, 0.25),
    0 10px 28px rgba(0, 0, 0, 0.45),
    0 0 24px rgba(232, 197, 71, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  animation: ecrLoadMorePulse 2.4s ease-in-out infinite;
}

.ecr-load-more:hover,
.ecr-load-more:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow:
    0 0 0 1px rgba(255, 240, 180, 0.4),
    0 14px 32px rgba(0, 0, 0, 0.5),
    0 0 32px rgba(232, 197, 71, 0.5);
  outline: none;
}

.ecr-load-more:active {
  transform: translateY(0);
}

.ecr-load-more i {
  font-size: 1.05rem;
}

.ecr-load-more[hidden] {
  display: none !important;
}

@keyframes ecrLoadMorePulse {
  0%,
  100% {
    box-shadow:
      0 0 0 1px rgba(255, 240, 180, 0.25),
      0 10px 28px rgba(0, 0, 0, 0.45),
      0 0 18px rgba(232, 197, 71, 0.28);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(255, 240, 180, 0.45),
      0 12px 30px rgba(0, 0, 0, 0.48),
      0 0 34px rgba(232, 197, 71, 0.55);
  }
}

@media (max-width: 520px) {
  /* Manter reputação / estabilidade etc. lado a lado */
  .ecr-stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .ecr-stat {
    padding: 8px 10px;
  }

  .ecr-load-more {
    max-width: none;
    font-size: 0.86rem;
    letter-spacing: 0.04em;
    min-height: 48px;
  }

  .ecr-modal-foot {
    flex-direction: column-reverse;
  }

  .ecr-modal-foot .ecr-foot-btn {
    width: 100% !important;
  }
}
