:root {
  --ibi-card: #ffffff;
  --ibi-ink: #1d2733;
  --ibi-muted: #5f6d7a;
  --ibi-accent: #0b7a75;
  --ibi-accent-2: #d66b2d;
  --ibi-border: #d8e1ea;
  --ibi-shadow: 0 10px 30px rgba(14, 36, 54, 0.09);
}

.ibi-wrap {
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--ibi-ink);
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.ibi-header {
  margin-bottom: 14px;
}

.ibi-title {
  margin: 0;
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  line-height: 1.2;
}

.ibi-subtitle {
  margin: 4px 0 0;
  color: var(--ibi-muted);
  font-size: 1.02rem;
  text-align: center;
  font-weight: 600;
}

.ibi-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 10px;
}

.ibi-search-wrap {
  margin: 10px 0 8px;
}

.ibi-search {
  width: 100%;
  max-width: 460px;
  height: 44px;
  border: 1px solid var(--ibi-border);
  border-radius: 12px;
  padding: 0 14px;
  font-size: 0.95rem;
  color: var(--ibi-ink);
  background: #fff;
  outline: none;
  box-sizing: border-box;
  min-width: 0;
}

.ibi-search:focus {
  border-color: #98c8c5;
  box-shadow: 0 0 0 3px rgba(11, 122, 117, 0.12);
}

.ibi-letter {
  border: 1px solid var(--ibi-border);
  background: #fff;
  color: var(--ibi-ink);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.92rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.ibi-letter:hover {
  transform: translateY(-1px);
  border-color: #b3c6d9;
}

.ibi-letter.is-active {
  background: linear-gradient(135deg, var(--ibi-accent) 0%, #15958f 100%);
  border-color: transparent;
  color: #fff;
}

.ibi-status {
  min-height: 24px;
  color: var(--ibi-muted);
  margin: 8px 0 12px;
  font-size: 0.95rem;
}

.ibi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.ibi-card {
  background: var(--ibi-card);
  border: 1px solid var(--ibi-border);
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  min-height: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ibi-card::before,
.ibi-card::after {
  content: none !important;
  display: none !important;
}

.ibi-card:hover {
  transform: translateY(-3px);
  border-color: #b3d8d6;
  box-shadow: 0 12px 24px rgba(17, 92, 88, 0.12);
}

.ibi-thumb {
  width: 100%;
  height: 132px;
  border-radius: 8px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  position: relative;
  z-index: 1;
}

.ibi-thumb img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center center !important;
  border-radius: 8px;
  display: block;
  position: relative;
  z-index: 2;
}

.ibi-fallback {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffecd9, #ffd2a8);
  color: #8a3f11;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.ibi-name {
  font-size: 0.9rem;
  line-height: 1.25;
  font-weight: 600;
  word-break: break-word;
  text-align: center;
  width: 100%;
  position: relative;
  z-index: 2;
}

.ibi-empty {
  background: #fff;
  border: 1px dashed var(--ibi-border);
  border-radius: 12px;
  padding: 18px;
  color: var(--ibi-muted);
}

.ibi-pagination {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.ibi-pagination.is-hidden {
  display: none !important;
}

.ibi-page-btn {
  border: 0;
  background: var(--ibi-accent-2);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
}

.ibi-page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ibi-page-info {
  color: var(--ibi-muted);
  font-size: 0.95rem;
}

.ibi-wrap.is-loading .ibi-grid {
  opacity: 0.6;
}

@media (max-width: 640px) {
  .ibi-filter {
    gap: 10px;
  }

  .ibi-search {
    width: 100%;
    max-width: none;
    height: 42px;
    font-size: 0.92rem;
  }

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

  .ibi-thumb {
    height: 150px;
  }

  .ibi-letter {
    padding: 10px 13px;
    font-size: 0.9rem;
  }
}
