/* 联系人页 */

#view-contacts.view-contacts {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0 !important;
  background: #f7f7f7 !important;
  font-family: 'PingFang SC', sans-serif;
}

#main-app.silas-phone-root.contacts-active #view-contacts.view-contacts:not(.hidden) {
  position: absolute;
  inset: 0;
  z-index: 12;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  overflow: hidden;
}

.contacts-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.contacts-top-bar {
  flex-shrink: 0;
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--ui-accent-bar, #efbfd6);
  position: relative;
  min-height: calc(100px + env(safe-area-inset-top, 0px));
}

.contacts-top-deco {
  position: absolute;
  left: 20px;
  top: calc(28px + env(safe-area-inset-top, 0px));
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: #d8d8d8;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  padding: 0;
  cursor: pointer;
}

.contacts-top-deco .contacts-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contacts-top-deco .contacts-avatar-fallback {
  font-size: 1.5rem;
  font-weight: 600;
  color: #888;
}

.contacts-avatar-tap {
  cursor: pointer;
}

.contacts-avatar-wrap {
  flex-shrink: 0;
}

.contacts-hand-back {
  position: absolute;
  left: 16px;
  bottom: 12px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.4);
  font-size: 1.25rem;
  cursor: pointer;
  z-index: 2;
}

.contacts-top-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  text-align: center;
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #4a3a42;
}

.contacts-add-btn {
  margin: 16px 20px 8px;
  width: calc(100% - 40px);
  min-height: 56px;
  border: none;
  border-radius: 999px;
  background: #d8d8d8;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  line-height: 1;
}

.contacts-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 16px 24px;
}

.contacts-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contacts-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: #fff;
  border: 3px solid var(--ui-accent-border, #efbfd6);
  border-radius: 999px;
  box-sizing: border-box;
}

.contacts-card-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.contacts-avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.contacts-avatar-fallback {
  font-size: 1.1rem;
  font-weight: 600;
  color: #888;
}

.contacts-card-name {
  font-size: 1rem;
  font-weight: 500;
  color: #444;
}

.contacts-card-tag {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.7rem;
  color: #999;
  font-weight: 400;
}

.contacts-card-chat,
.contacts-card-menu {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--ui-accent-btn, #ef9bb8);
}

.contacts-card-menu {
  color: #aaa;
  font-size: 1.4rem;
}

.contacts-empty {
  text-align: center;
  color: #999;
  padding: 32px 16px;
  font-size: 0.9rem;
}
