
.people-list {
  min-height: 0;
  padding: 0 4px 20px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #cbd0d8 transparent;
  scrollbar-width: thin;
}

.person-card {
  position: relative;
  width: 100%;
  padding: 15px 13px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  background: transparent;
  cursor: pointer;
  transition: background 160ms ease;
}

.person-card::before {
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 0;
  width: 3px;
  border-radius: 3px;
  background: var(--accent);
  content: "";
  opacity: 0;
}

.person-card:hover,
.person-card.is-active { background: linear-gradient(90deg, var(--accent-soft), transparent 90%); }

.person-card:hover::before,
.person-card.is-active::before { opacity: 1; }

.person-card:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: -1px;
}

.person-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.person-name {
  overflow: hidden;
  font-size: 14px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-index {
  color: #a1a7b1;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
}

.person-intro {
  display: -webkit-box;
  margin: 8px 0 11px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-list,
.keyword-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag,
.keyword-chip {
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #687283;
  background: #f8f9fb;
  font-size: 9px;
  line-height: 21px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag { padding: 0 8px; }

.empty-state {
  padding: 50px 22px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  line-height: 1.7;
}

.empty-state strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 15px;
}

.chart-loading {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  color: var(--muted);
  background: var(--bg);
  font-size: 12px;
  transition: opacity 250ms ease, visibility 250ms ease;
}

.chart-loading.is-hidden {
  visibility: hidden;
  opacity: 0;
}

.loader {
  width: 30px;
  height: 30px;
  border: 2px solid rgba(24, 34, 51, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.member-detail {
  position: absolute;
  z-index: 20;
  bottom: 22px;
  right: 22px;
  left: auto;
  width: min(430px, calc(100% - 44px));
  padding: 20px 21px;
  overflow: visible;
  border: 1px solid rgba(255, 107, 53, 0.2);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.member-detail[hidden] { display: none; }

.member-detail.is-hover-detail {
  pointer-events: none;
}

.detail-close {
  position: absolute;
  top: 11px;
  right: 11px;
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: #f8f9fb;
  cursor: pointer;
  font-size: 18px;
}

.detail-label {
  color: var(--accent);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.member-detail h3 {
  margin: 7px 34px 8px 0;
  font-size: 21px;
}

.member-detail p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.keyword-chip {
  padding: 0 9px;
  border-color: rgba(37, 99, 235, 0.14);
  color: var(--blue);
  background: var(--blue-soft);
  cursor: pointer;
}

@media (max-width: 760px) {
  .people-panel {
    top: 10px;
    right: 10px;
    bottom: auto;
    left: 10px;
    width: auto;
    height: min(48vh, 460px);
  }

  .graph-toolbar {
    top: 10px;
    right: 10px;
    bottom: auto;
  }

  .panel-stats span:last-child { display: none; }

  .member-detail {
    right: 10px;
    bottom: 0;
    left: 10px;
    width: auto;
    border-radius: 15px 15px 0 0;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
.add-member-link {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-left: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: inherit;
  background: #fff;
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.add-member-link:hover {
  border-color: rgba(255, 107, 53, 0.35);
  color: var(--accent);
}

.people-panel.is-collapsed {
  width: 94px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.people-panel.is-collapsed .panel-brand {
  gap: 8px;
}

.people-panel.is-collapsed .add-member-link {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.add-member-page { overflow: auto; }

.add-member-shell {
  width: min(680px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 70px;
}

.back-link {
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}

.back-link:hover { color: var(--accent); }

.add-member-card {
  margin-top: 26px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.add-member-card h1 { margin: 8px 0; font-size: 30px; }

.add-member-lead {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

#member-form { display: grid; gap: 20px; }

#member-form label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

#member-form input,
#member-form textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--text);
  background: #fbfcfe;
  outline: none;
  resize: vertical;
}

#member-form input:focus,
#member-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.submit-button {
  padding: 13px 18px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
  font-weight: 700;
}

.submit-button:disabled {
  color: #fff;
  background: #b9bec7;
  cursor: wait;
  opacity: 1;
}

.form-status { min-height: 20px; margin: 18px 0 0; font-size: 12px; }
.form-status.is-loading { color: var(--muted); }
.form-status.is-success { color: #138a59; }
.form-status.is-error { color: #c53b34; }

@media (max-width: 760px) {
  .add-member-card { padding: 24px 20px; }
}
