/* ===========================================================
   아리 — phase-13 외부 연동(connectors) 스타일
   :is(.lifepage, .settingspage) 스코프 (라이프 '연결' 모듈 + 설정 페이지 공유, 전역 충돌 회피).
   토큰(--glass/--blur/--glass-brd/--radius/--green …)은 tokens.css 가 제공.
   클래스 prefix: .cn-* (카드/그리드/액션) · .cs-* (상태 배지)
   =========================================================== */

/* 헤더 카운트 */
:is(.lifepage, .settingspage) .cn-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--glass-2);
  border: 1px solid var(--line-2);
}

/* 반응형 카드 그리드 */
:is(.lifepage, .settingspage) .cn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
:is(.lifepage, .settingspage) .cn-grid:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
  border-radius: var(--radius);
}

/* 글래스 카드 */
:is(.lifepage, .settingspage) .cn-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-brd);
  box-shadow: var(--shadow), var(--glass-hi);
}
/* 미연결 카드: 흐리게 + faint */
:is(.lifepage, .settingspage) .cn-card.off {
  opacity: 0.62;
  border-style: dashed;
}

:is(.lifepage, .settingspage) .cn-top {
  display: flex;
  align-items: center;
  gap: 11px;
}
:is(.lifepage, .settingspage) .cn-ava {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--tone, var(--ink));
  box-shadow: 0 6px 16px -7px var(--tone, var(--ink));
}
:is(.lifepage, .settingspage) .cn-ava .ic {
  width: 19px;
  height: 19px;
}
:is(.lifepage, .settingspage) .cn-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
:is(.lifepage, .settingspage) .cn-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
:is(.lifepage, .settingspage) .cn-kind {
  font-size: 12px;
  color: var(--faint);
}

/* 상태 배지 (§5.3) */
:is(.lifepage, .settingspage) .cs-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}
:is(.lifepage, .settingspage) .cs-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
:is(.lifepage, .settingspage) .cs-badge .dot-green {
  background: var(--green);
}
:is(.lifepage, .settingspage) .cs-badge .dot-blue {
  background: var(--blue);
  animation: cn-pulse 1.1s ease-in-out infinite;
}
:is(.lifepage, .settingspage) .cs-badge .dot-faint {
  background: var(--faint);
}
:is(.lifepage, .settingspage) .cs-badge .dot-coral {
  background: var(--coral);
}
:is(.lifepage, .settingspage) .cs-badge .dot-amber {
  background: var(--amber);
}
@keyframes cn-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

/* 액션 */
:is(.lifepage, .settingspage) .cn-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}
:is(.lifepage, .settingspage) .cn-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--tone, var(--blue));
  color: #fff;
  cursor: pointer;
  transition:
    transform 0.12s ease,
    filter 0.12s ease;
}
:is(.lifepage, .settingspage) .cn-btn .ic {
  width: 15px;
  height: 15px;
}
:is(.lifepage, .settingspage) .cn-btn:hover {
  filter: brightness(1.06);
}
:is(.lifepage, .settingspage) .cn-btn:active {
  transform: translateY(1px);
}
:is(.lifepage, .settingspage) .cn-btn:disabled {
  opacity: 0.5;
  cursor: default;
}
:is(.lifepage, .settingspage) .cn-btn.cn-ghost {
  background: var(--glass-2);
  color: var(--ink-2);
  border-color: var(--line-2);
}
:is(.lifepage, .settingspage) .cn-btn.cn-ghost:hover {
  filter: none;
  background: var(--card-3, var(--glass-2));
}

/* 임포트 드롭존 */
:is(.lifepage, .settingspage) .cn-dropzone {
  display: inline-flex;
}
:is(.lifepage, .settingspage) .cn-dropzone .cn-file {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
