/* Circles index page — extends hub.css */

.hub-back-link {
  color: rgba(255,255,255,0.85);
  text-decoration: underline;
}
.hub-back-link:hover { color: #fff; }

.circles-controls {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.circles-stats {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.circles-search-wrap {
  position: relative;
}

.circles-search {
  width: 100%;
  padding: 0.6rem 2.2rem 0.6rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: #fff;
  box-sizing: border-box;
}

#circles-search-clear {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 0.3rem;
}

.circles-filter-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
}

.filter-row-label {
  font-size: 1rem;
  margin-right: 0.2rem;
  opacity: 0.7;
}

.filter-btn {
  padding: 0.35rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text);
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
  font-weight: 500;
}
.filter-btn:hover:not(.active) {
  background: #f3edf7;
  border-color: var(--accent);
}

.filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.circles-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.circle-row {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.circle-row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.8rem;
}

.circle-name {
  font-weight: 700;
  color: var(--accent);
  font-size: 1.05rem;
}

.circle-author {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.circle-aliases {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  margin-left: 0.3rem;
}

.circle-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.2rem;
}

.circle-links.no-links {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  opacity: 0.7;
}

.circle-link-chip {
  font-size: 0.78rem;
  background: #f3edf7;
  color: var(--accent);
  padding: 0.2rem 0.6rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid transparent;
}
.circle-link-chip:hover {
  border-color: var(--accent);
}

/* Per-platform tints — match if7's social-chip palette for consistency */
.chip-x { background: #e9ecef; color: #000; }
.chip-plurk { background: #fff2e1; color: #cd6800; }
.chip-fb { background: #e7f0ff; color: #1877f2; }
.chip-ig { background: #fef0f4; color: #d81b60; }
.chip-threads { background: #ebebeb; color: #000; }
.chip-pixiv { background: #e6f0ff; color: #0096fa; }
.chip-bsky { background: #e6f0ff; color: #0085ff; }
.chip-doujin_tw { background: #fef9e6; color: #b07700; }
.chip-aggregator { background: #f0f9e8; color: #2e7d32; }
.chip-booth_pm { background: #ffeae0; color: #c45200; }
.chip-wix, .chip-blog { background: #f5e9ff; color: #6a1b9a; }
.chip-gamer { background: #e8f5e9; color: #2e7d32; }
.chip-youtube { background: #fdeaea; color: #ff0000; }
.chip-marshmallow { background: #fef0f4; color: #ff6699; }
.chip-patreon { background: #fff2ec; color: #ff424d; }

.circle-events {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.2rem;
}

.circle-event-chip {
  font-size: 0.78rem;
  background: #f3edf7;
  color: var(--accent);
  padding: 0.2rem 0.6rem;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid transparent;
}
.circle-event-chip:hover {
  border-color: var(--accent);
}
.circle-event-chip .booth {
  font-weight: 700;
}
.circle-event-chip .ev {
  opacity: 0.75;
}

.circle-row.multi-event {
  border-left: 3px solid var(--accent);
}

.circle-row.no-handle .circle-handle {
  font-style: italic;
  opacity: 0.6;
}

/* 2-tier card: circle header + per-member sections.
 * Used when circle has ≥2 members OR member display name differs from circle name. */
.circle-row.two-tier {
  gap: 0.45rem;
}
.circle-row.two-tier .circle-events {
  /* Push events row down a bit since sections precede it */
  margin-top: 0.1rem;
}

.circle-section {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.4rem 0.55rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.025);
  border-left: 2px solid var(--border);
}
.circle-section.circle-socials-section {
  border-left-color: var(--accent);
}
.circle-section.member-section {
  border-left-color: #9c80b8;
}

.section-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.circle-socials-section .section-label {
  color: var(--accent);
}

.member-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.6rem;
}
.member-name {
  color: #6a4a8a;
  font-size: 0.9rem;
}
.member-aliases {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}

/* In 2-tier mode the chip row sits inside a section — kill the top margin
 * that the flat-mode rule sets so it hugs the section label tightly. */
.circle-section .circle-links {
  margin-top: 0;
}

.empty, .error {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
}
.error { color: #d32f2f; }

/* Mode-specific filter row visibility — Sprint Bα (2026-06-04):
 * The same horizontal chip rows drive both modes, but the status filter
 * (未確定のみ / 全 author) is meaningful only in edit mode, and the base
 * filter (multi/no-handle/全部) is read-only-meaningful. CSS hides whichever
 * row doesn't apply to the active mode (body class set by circles.js). */
body.read-mode .filter-row-edit-only { display: none; }
body.edit-mode .filter-row-read-only { display: none; }

/* Make sure the [hidden] attribute always wins over the display:flex rule
 * on .circles-list / .review-list. Without this, edit mode shows BOTH the
 * read-mode "読み込み中..." placeholder and the edit-mode list because the
 * class selector's specificity (0,0,1,0) outranks the UA's [hidden] rule. */
.circles-list[hidden], .review-list[hidden] { display: none; }

/* Pagination — shared between read mode (50/page) and edit mode (20/page).
 * Both renderers (circles.js applyFilter default + edit's YACHI_PAGINATE)
 * use the same .review-pagination + .page-btn classes. Top nav has a
 * bottom border + margin-bottom; bottom nav has a top border + margin-top. */
.review-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}
.review-pagination-top {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.review-pagination-bottom {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.review-pagination .page-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--accent);
  padding: 0.35rem 0.8rem;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  font-weight: 500;
  min-width: 2.2rem;
}
.review-pagination .page-btn:hover:not(.disabled):not(.active) {
  background: #f3edf7;
  border-color: var(--accent);
}
.review-pagination .page-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  cursor: default;
}
.review-pagination .page-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.review-pagination .page-ellipsis {
  padding: 0 0.3rem;
  color: var(--text-muted);
}
