.spl-frontend-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Apple Color Emoji',
               'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
  font-size: 13px;
  line-height: 1.4;
}

/* ── Stats bar ───────────────────────────────────────────────── */
.spl-stats {
  font-size: 11px;
  color: #666;
  margin-bottom: 12px;
}

/* ── Controls row ────────────────────────────────────────────── */
.spl-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.spl-search-bar {
  flex: 1;
  min-width: 200px;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
}

.spl-filter-group {
  display: flex;
  gap: 6px;
  align-items: center;
}

.spl-filter-label {
  font-size: 11px;
  color: #666;
  white-space: nowrap;
}

.spl-filter-btn {
  padding: 4px 10px;
  border: 1px solid #ddd;
  background: white;
  color: #333;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-family: 'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',sans-serif;
  transition: background 0.15s, border-color 0.15s;
  line-height: 1.4;
}

.spl-filter-btn:hover  { background: #f0f0f0; }
.spl-filter-btn.active { background: #007bff; color: white; border-color: #007bff; }

/* ── Custom emoji-safe dropdown ──────────────────────────────── */
.spl-custom-select {
  position: relative;
  display: inline-block;
}

.spl-custom-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 28px 4px 10px;
  border: 1px solid #ddd;
  background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23999'/%3E%3C/svg%3E") no-repeat right 10px center;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-family: 'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',
               'Segoe UI','Segoe UI Symbol',sans-serif;
  white-space: nowrap;
  min-width: 130px;
  text-align: left;
  color: #333;
  transition: background-color 0.15s;
}

.spl-custom-trigger:hover { background-color: #f0f0f0; }

.spl-custom-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 9999;
  background: white;
  border: 1px solid #ccc;
  border-radius: 6px;
  max-height: 220px;
  overflow-y: auto;
  min-width: 100%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  padding: 4px 0;
  list-style: none;
  margin: 0;
}

.spl-custom-dropdown.open { display: block; }

.spl-custom-option {
  padding: 7px 14px;
  cursor: pointer;
  font-size: 15px;
  font-family: 'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',
               'Segoe UI','Segoe UI Symbol',sans-serif;
  white-space: nowrap;
  color: #333;
  transition: background 0.1s;
}

.spl-custom-option:hover    { background: #f5f5f5; }
.spl-custom-option.selected { background: #e8f0fe; color: #1a56db; font-weight: 600; }

/* ── Entry grid ──────────────────────────────────────────────── */
.spl-entries {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

@media (max-width: 1200px) { .spl-entries { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .spl-entries { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .spl-entries { grid-template-columns: 1fr; } }

/* ── Entry card ──────────────────────────────────────────────── */
.spl-entry {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  padding: 10px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #fafafa;
  transition: border-color 0.2s, background 0.2s;
}

.spl-entry:hover { border-color: #bbb; background: white; }

.spl-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  overflow: hidden;
  flex-shrink: 0;
}

.spl-avatar img { width: 100%; height: 100%; object-fit: cover; }

.spl-entry-content  { min-width: 0; }

.spl-entry-header {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.spl-entry-name {
  font-weight: 600;
  color: #007bff;
  text-decoration: none;
  font-size: 14px;
  word-break: break-word;
}
.spl-entry-name:hover { text-decoration: underline; }

.spl-entry-name-plain {
  font-weight: 600;
  font-size: 14px;
  color: #222;
}

.spl-emoji {
  font-size: 16px;
  font-family: 'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',
               'Segoe UI Symbol',sans-serif;
  display: inline-block;
  line-height: 1;
}

.spl-rss-link {
  text-decoration: none;
  font-size: 14px;
  opacity: 0.65;
  transition: opacity 0.2s;
}
.spl-rss-link:hover { opacity: 1; }

.spl-entry-meta { font-size: 11px; color: #888; margin-bottom: 4px; }

.spl-description { color: #444; margin-bottom: 4px; font-size: 12px; word-break: break-word; }

.spl-comment {
  color: #666;
  font-style: italic;
  font-size: 12px;
  margin-bottom: 4px;
  word-break: break-word;
}

.spl-tags  { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 2px; }

.spl-tag {
  display: inline-block;
  padding: 2px 6px;
  background: #e9ecef;
  border-radius: 3px;
  font-size: 11px;
  color: #495057;
}

/* ── No results ──────────────────────────────────────────────── */
.spl-no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: #999;
}

/* ── Pagination ──────────────────────────────────────────────── */
.spl-pagination {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.spl-page-btn {
  padding: 6px 12px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.15s;
}
.spl-page-btn:hover          { background: #f0f0f0; }
.spl-page-btn.active         { background: #007bff; color: white; border-color: #007bff; }
.spl-page-btn:disabled       { opacity: 0.4; cursor: not-allowed; }

.spl-ellipsis { padding: 6px 4px; font-size: 13px; color: #999; }
