/* ==========================================================================
   个人名片 / 印记 / 编辑名片 / 交换名片
   对齐 PersonCardScreen.swift、CardEditorScreen.swift、CardImprint.swift。
   ========================================================================== */

.app-view.card-body { padding: 0; }
.card-page {
  min-height: 100vh;
  min-height: 100dvh;
  background: #F5F7FB;
  color: var(--ink);
  padding-bottom: calc(150px + env(safe-area-inset-bottom));
}

/* ---------- 名片头 ---------- */

.card-hero {
  position: relative;
  padding: calc(env(safe-area-inset-top) + 8px) 18px 34px;
  overflow: hidden;
  background-color: #121a33;
  background-size: cover;
  background-position: center 40%;
  color: #fff;
  isolation: isolate;
}
.card-hero.is-brand {
  background-image:
    radial-gradient(1.5px 1.5px at 14% 18%, rgba(255, 255, 255, 0.85), transparent 60%),
    radial-gradient(1px 1px at 32% 42%, rgba(255, 255, 255, 0.6), transparent 60%),
    radial-gradient(1.6px 1.6px at 58% 22%, rgba(215, 225, 255, 0.75), transparent 60%),
    radial-gradient(1px 1px at 78% 34%, rgba(255, 255, 255, 0.55), transparent 60%),
    radial-gradient(1.2px 1.2px at 88% 12%, rgba(255, 255, 255, 0.7), transparent 60%),
    radial-gradient(1px 1px at 42% 62%, rgba(220, 230, 255, 0.5), transparent 60%),
    radial-gradient(1.4px 1.4px at 68% 78%, rgba(255, 255, 255, 0.45), transparent 60%),
    radial-gradient(120% 80% at 100% 0%, rgba(126, 142, 255, 0.55), transparent 58%),
    radial-gradient(90% 70% at 0% 100%, rgba(79, 149, 248, 0.35), transparent 60%),
    linear-gradient(150deg, #2b3a78 0%, #3d48a8 52%, #5b4ecb 100%);
}
.card-hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(80% 60% at 78% 18%, rgba(140, 96, 255, 0.24), transparent 62%),
    linear-gradient(180deg, rgba(5, 9, 22, 0.36) 0%, rgba(7, 11, 26, 0.12) 34%, rgba(5, 8, 20, 0.7) 82%, rgba(4, 7, 18, 0.92) 100%);
  pointer-events: none;
}
.card-hero:not(.has-photo) .card-hero-shade {
  background:
    radial-gradient(80% 60% at 80% 14%, rgba(255, 255, 255, 0.16), transparent 60%),
    linear-gradient(180deg, rgba(20, 30, 70, 0.05) 0%, rgba(15, 20, 46, 0.18) 55%, rgba(10, 14, 32, 0.5) 100%);
}

.card-topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.card-topnav-right { display: flex; align-items: center; gap: 8px; }
.card-glass {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.14s, background 0.14s;
}
.card-glass:active { transform: scale(0.94); background: rgba(255, 255, 255, 0.26); }
.card-more-btn { position: relative; }
.card-more-btn i {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #F04545;
  box-shadow: 0 0 0 2px rgba(40, 30, 70, 0.35);
}
.card-menu {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 52px);
  right: 14px;
  z-index: 30;
  width: 178px;
  padding: 5px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 16px 40px rgba(8, 14, 34, 0.28);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: cardMenuIn 0.16s ease;
}
@keyframes cardMenuIn { from { opacity: 0; transform: translateY(-4px) scale(0.97); } }
.card-menu button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  height: 40px;
  padding: 0 10px;
  border-radius: 10px;
  color: #2B3446;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}
.card-menu button .ico { color: #5B6B86; }
.card-menu button:active { background: #F2F5FB; }
.card-menu button.is-danger { color: #D9534F; }
.card-menu button.is-danger .ico { color: #D9534F; }

.card-identity {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 4px 4px 0;
}
.card-portrait { position: relative; flex: 0 0 auto; width: 98px; height: 98px; display: grid; place-items: center; }
.card-portrait-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(255, 213, 150, 0.42), transparent 68%);
  animation: portraitBreathe 3.4s ease-in-out infinite;
}
@keyframes portraitBreathe { 0%, 100% { transform: scale(0.94); opacity: 0.7; } 50% { transform: scale(1.05); opacity: 1; } }
.card-avatar {
  position: relative;
  z-index: 1;
  border: 3px solid rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 12px 26px rgba(6, 10, 26, 0.4);
  animation: portraitFloat 5.2s ease-in-out infinite;
}
@keyframes portraitFloat { 0%, 100% { transform: translateY(1.5px); } 50% { transform: translateY(-2.5px); } }
.card-online {
  position: absolute;
  right: 9px;
  bottom: 9px;
  z-index: 2;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #2BC46A;
  border: 2.5px solid #fff;
  box-shadow: 0 0 0 4px rgba(43, 196, 106, 0.24);
}
.card-id-copy { flex: 1; min-width: 0; padding-top: 6px; }
.card-name-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.card-name-row h1 {
  margin: 0;
  font-size: 27px;
  font-weight: 900;
  letter-spacing: -0.8px;
  line-height: 1.12;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.28);
}
.card-seal {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 22px;
  padding: 0 7px;
  border-radius: 6px;
  background: #1B2A44;
  color: #DCE7FF;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.2px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);
}
.card-verify {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 7px 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 11.5px;
  line-height: 1.4;
}
.card-verify b { color: rgba(255, 255, 255, 0.9); font-weight: 600; letter-spacing: 0.2px; }
.card-verify i { font-style: normal; opacity: 0.6; margin: 0 1px; }
.card-copy {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.12);
}
.card-copy:active { background: rgba(255, 255, 255, 0.24); }
.card-presence {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  font-weight: 500;
}
.card-live-dot {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2BC46A;
}
.card-live-dot::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: rgba(43, 196, 106, 0.5);
  animation: livePulse 1.8s ease-out infinite;
}
@keyframes livePulse { 0% { transform: scale(0.6); opacity: 0.9; } 100% { transform: scale(2.6); opacity: 0; } }

.card-nums {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 18px;
  padding: 0 2px;
}
.card-nums > div {
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding: 0 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}
.card-nums > div:first-child { padding-left: 0; border-left: 0; }
.card-nums b { font-size: 22px; font-weight: 900; letter-spacing: -0.6px; line-height: 1; }
.card-nums span { font-size: 11px; color: rgba(255, 255, 255, 0.66); }

.card-intro {
  margin: 16px 2px 0;
  font-size: 13px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.24);
}
.card-intro.is-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-intro.is-clamp.is-open { display: block; -webkit-line-clamp: initial; }
.card-expand {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 24px;
  margin-top: 5px;
  padding: 0 8px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 10.5px;
}

.card-honors { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.card-honors > span {
  display: inline-flex;
  align-items: center;
  height: 27px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.26);
  color: rgba(255, 255, 255, 0.92);
  font-size: 11.5px;
  font-weight: 500;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.card-network {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}
.card-network-col { display: flex; flex-direction: column; gap: 8px; }
.card-network-label { font-size: 11px; color: rgba(255, 255, 255, 0.62); }
.card-network-line { display: flex; align-items: center; gap: 8px; }
.card-network-line .ava-stack .ava { border-color: rgba(255, 255, 255, 0.95); }
.card-network-line em { font-style: normal; font-size: 11px; font-weight: 600; color: rgba(255, 255, 255, 0.8); }

/* ---------- 白色内容片 ---------- */

.card-sheet {
  position: relative;
  z-index: 2;
  margin-top: -20px;
  min-height: 64vh;
  padding: 8px 0 26px;
  border-radius: 24px 24px 0 0;
  background: #F5F7FB;
  box-shadow: 0 -10px 30px rgba(7, 12, 28, 0.16);
}
.card-grab { width: 36px; height: 4px; margin: 2px auto 2px; border-radius: 999px; background: #D8DFEA; }
.card-tabs { display: flex; align-items: stretch; padding: 0 4px; }
.card-tab {
  position: relative;
  flex: 1;
  padding: 14px 2px 12px;
  color: #8A94A6;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.2px;
}
.card-tab.is-active { color: #2B3446; font-weight: 800; }
.card-tab::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 22px;
  height: 3px;
  border-radius: 999px;
  background: var(--brand);
  transform: translateX(-50%) scaleX(0);
  transition: transform 0.22s;
}
.card-tab.is-active::after { transform: translateX(-50%) scaleX(1); }
.card-panel { padding: 0 12px; }

/* ---------- 服务 ---------- */

.card-hours { margin: 4px 2px 10px; color: #8A94A6; font-size: 12px; }
.card-statgrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 15px 4px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(16, 27, 48, 0.05);
}
.card-stat { position: relative; text-align: center; }
.card-stat + .card-stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: #EDF0F6;
}
.card-stat b {
  display: block;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.4px;
  line-height: 1.2;
  color: #2B3446;
}
.card-stat span { display: block; margin-top: 4px; font-size: 10.5px; color: #8A94A6; }

.card-block {
  margin-top: 11px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(16, 27, 48, 0.05);
}
.card-consult { padding: 14px 14px 0; }
.cc-head { display: flex; align-items: center; gap: 11px; }
.cc-phone {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #EEF3FF;
  color: #3F7FDB;
}
.cc-copy { flex: 1; min-width: 0; }
.cc-copy strong { display: block; font-size: 15.5px; font-weight: 800; color: #2B3446; }
.cc-copy span { display: block; margin-top: 3px; font-size: 11.5px; color: #8A94A6; }
.card-cta {
  flex: 0 0 auto;
  height: 35px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--brand-grad);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 5px 14px rgba(80, 110, 230, 0.28);
}
.card-cta:active { transform: scale(0.97); }
.cc-steps {
  display: flex;
  align-items: flex-start;
  gap: 2px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #F2F5FA;
}
.cc-step { flex: 1; text-align: center; padding: 0 2px; }
.cc-step strong { display: block; font-size: 12.5px; font-weight: 700; color: #2B3446; }
.cc-step span { display: block; margin-top: 3px; font-size: 10px; color: #8A94A6; line-height: 1.4; }
.cc-arrow { flex: 0 0 auto; padding-top: 3px; color: #B9C9EA; font-style: normal; }
.cc-trust {
  display: flex;
  align-items: center;
  gap: 6px;
  width: calc(100% + 28px);
  margin: 12px -14px 0;
  padding: 12px 14px;
  border-top: 1px solid #F2F5FA;
  border-radius: 0 0 14px 14px;
  color: #8A94A6;
  text-align: left;
}
.cc-trust .ico { color: var(--brand); flex: 0 0 auto; }
.cc-trust strong { font-size: 12.5px; font-weight: 700; color: #2B3446; white-space: nowrap; }
.cc-trust span { flex: 1; min-width: 0; font-size: 11.5px; color: #8A94A6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-trust .ico:last-child { color: #C8D2E4; }

.card-files { padding: 13px 14px 14px; }
.cf-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cf-title { display: inline-flex; align-items: center; gap: 6px; color: #D9930D; }
.cf-title strong { font-size: 13.5px; font-weight: 800; color: #2B3446; }
.cf-upload {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #D9930D;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 2px;
}
.cf-empty { margin: 10px 0 0; font-size: 11.5px; line-height: 1.7; color: #8A94A6; }
.cf-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px solid #F2F5FA;
  text-align: left;
}
.cf-icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #FFEDEA;
  color: #E0533D;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2px;
}
.cf-copy { flex: 1; min-width: 0; }
.cf-copy strong { display: block; font-size: 12.5px; font-weight: 600; color: #2B3446; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-copy em { display: block; margin-top: 2px; font-style: normal; font-size: 10px; color: #8A94A6; }
.cf-open { display: inline-flex; align-items: center; gap: 3px; color: var(--brand); font-size: 11.5px; font-weight: 700; }

/* ---------- 作品 ---------- */

.cw-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 2px 11px; }
.cw-count { color: #8A94A6; font-size: 12.5px; }
.cw-filters {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: #EDF1F7;
}
.cw-filter {
  height: 27px;
  padding: 0 10px;
  border-radius: 999px;
  color: #8A94A6;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.cw-filter.is-active {
  background: #fff;
  color: #2B3446;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(16, 27, 48, 0.12);
}
.cw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; align-items: start; }
.cw-card {
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(16, 27, 48, 0.06);
  text-align: left;
  animation: cwIn 0.3s ease both;
  animation-delay: calc(var(--i, 0) * 20ms);
}
@keyframes cwIn { from { opacity: 0; transform: translateY(6px); } }
.cw-card:active { transform: scale(0.985); }
.cw-cover { position: relative; height: 116px; background: #E9EDF4; }
.cw-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cw-follow {
  position: absolute;
  top: 7px;
  right: 7px;
  height: 23px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--brand);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 23px;
  box-shadow: 0 2px 8px rgba(16, 27, 48, 0.14);
}
.cw-play {
  position: absolute;
  left: 8px;
  bottom: 8px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(16, 27, 48, 0.55);
  color: #fff;
}
.cw-body { padding: 9px 10px 10px; }
.cw-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.45;
  color: #2B3446;
}
.cw-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.cw-tags span {
  padding: 2px 6px;
  border-radius: 5px;
  background: #F0F1FF;
  color: #6B63D9;
  font-size: 9.5px;
  white-space: nowrap;
}
.cw-foot { display: flex; align-items: center; gap: 5px; margin-top: 9px; color: #8A94A6; }
.cw-foot .ava { flex: 0 0 auto; }
.cw-foot .cw-author { flex: 1; min-width: 0; font-size: 9.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-foot em { display: inline-flex; align-items: center; gap: 3px; font-style: normal; font-size: 9.5px; }
.cw-card.is-quote { background: #FFF8EA; }
.cw-quote { padding: 13px 12px 2px; }
.cw-kind {
  display: inline-block;
  margin-bottom: 7px;
  padding: 2px 7px;
  border-radius: 5px;
  background: #6B63D9;
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
}
.cw-quote strong {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
  color: #2B3446;
}
.cw-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 34px 18px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(16, 27, 48, 0.05);
  color: #B0B9C8;
}
.cw-empty p { margin: 0; color: #8A94A6; font-size: 12px; }

/* ---------- 印记 ---------- */

.ci-pills {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 1px 0 3px;
  margin-bottom: 14px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.ci-pills::-webkit-scrollbar { display: none; }
.ci-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #E9EEF6;
  color: #5A6578;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(16, 27, 48, 0.03);
}
.ci-pill b { font-size: 10.5px; font-weight: 700; color: #8A94A6; }
.ci-pill.is-active {
  background: var(--brand-grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 5px 14px rgba(80, 110, 230, 0.26);
}
.ci-pill.is-active b { color: rgba(255, 255, 255, 0.8); }
.ci-title { display: flex; align-items: baseline; gap: 7px; margin: 0 2px 10px; }
.ci-title strong { font-size: 15px; font-weight: 800; color: #2B3446; }
.ci-title span { font-size: 10.5px; color: #8A94A6; }
.ci-body { display: flex; flex-direction: column; gap: 10px; }

.ci-shared {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(16, 27, 48, 0.05);
}
.ci-shared > span { display: flex; flex-direction: column; gap: 3px; }
.ci-shared strong { font-size: 12.5px; font-weight: 700; color: #2B3446; }
.ci-shared em { font-style: normal; font-size: 10px; color: #8A94A6; }
.ci-shared .ava-stack .ava { border-color: #fff; }

.ci-people { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ci-person {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 10px 13px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(16, 27, 48, 0.05);
  text-align: center;
}
.ci-person:active { transform: scale(0.985); }
.ci-person strong { margin-top: 8px; font-size: 13px; font-weight: 800; color: #2B3446; }
.ci-person > span:not(.ava) { margin-top: 2px; font-size: 10.5px; color: #5A6578; }
.ci-person > em { margin-top: 3px; font-style: normal; font-size: 9.5px; color: #8A94A6; }

.ci-review {
  padding: 13px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(16, 27, 48, 0.05);
}
.ci-review-head { display: flex; align-items: center; gap: 8px; }
.ci-review-head > div { flex: 1; min-width: 0; }
.ci-review-head strong { display: block; font-size: 12px; font-weight: 800; color: #2B3446; }
.ci-review-head > div span { display: block; margin-top: 1px; font-size: 9.5px; color: #8A94A6; }
.ci-review-head em { font-style: normal; font-size: 10.5px; color: #F0A020; letter-spacing: 1px; }
.ci-review-head i { font-style: normal; font-size: 9.5px; color: #AAB2C0; }
.ci-review p { margin: 9px 0 0; font-size: 12px; line-height: 1.75; color: #3B475C; }

.ci-case {
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(16, 27, 48, 0.06);
}
.ci-case-cover { position: relative; height: 148px; background: #1D2D55; }
.ci-case-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ci-case-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(8, 13, 28, 0.75));
}
.ci-case-metric {
  position: absolute;
  left: 12px;
  bottom: 10px;
  z-index: 1;
  color: #fff;
  font-size: 12px;
}
.ci-case-metric b { font-size: 17px; font-weight: 900; }
.ci-case-metric small { margin-left: 5px; font-size: 9.5px; opacity: 0.75; }
.ci-case-body { padding: 12px 13px 13px; }
.ci-case-body strong { display: block; font-size: 13.5px; font-weight: 800; line-height: 1.5; color: #2B3446; }
.ci-case-body > span { display: block; margin-top: 3px; font-size: 10px; color: #8A94A6; }
.ci-case-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.ci-case-tags i { font-style: normal; padding: 2px 7px; border-radius: 5px; background: #F1F4F9; color: #6B768A; font-size: 9.5px; }
.ci-case-body p { margin: 8px 0 0; font-size: 11px; line-height: 1.7; color: #5A6578; }

.ci-creds { display: flex; flex-direction: column; gap: 9px; }
.ci-cred {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(16, 27, 48, 0.05);
}
.ci-cred-icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #F1F4F9;
  color: #8A94A6;
}
.ci-cred.is-ok .ci-cred-icon { background: #EAF7F0; color: var(--green); }
.ci-cred > div { flex: 1; min-width: 0; }
.ci-cred strong { display: block; font-size: 12.5px; font-weight: 700; color: #2B3446; }
.ci-cred span { display: block; margin-top: 2px; font-size: 9.5px; color: #8A94A6; }
.ci-cred em { font-style: normal; font-size: 10px; font-weight: 700; color: #8A94A6; }
.ci-cred.is-ok em { color: var(--green); }
.ci-cred > i { font-style: normal; font-size: 9.5px; color: #AAB2C0; }

.ci-need {
  padding: 13px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(16, 27, 48, 0.05);
}
.ci-need-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ci-need-head strong { font-size: 13px; font-weight: 800; line-height: 1.5; color: #2B3446; }
.ci-need-head em { flex: 0 0 auto; font-style: normal; font-size: 9.5px; color: #AAB2C0; }
.ci-need p { margin: 6px 0 0; font-size: 11px; line-height: 1.7; color: #5A6578; }
.ci-need-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; }
.ci-need-foot div { display: flex; flex-wrap: wrap; gap: 4px; }
.ci-need-foot i { font-style: normal; padding: 2px 7px; border-radius: 5px; background: #F1F4F9; color: #6B768A; font-size: 9.5px; }
.ci-need-foot b { color: var(--orange); font-size: 12px; font-weight: 800; }

.ci-album { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.ci-photo { position: relative; margin: 0; height: 118px; overflow: hidden; border-radius: 12px; background: #E9EDF4; }
.ci-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ci-photo figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 9px 8px;
  background: linear-gradient(transparent, rgba(8, 13, 28, 0.72));
  color: #fff;
  font-size: 9.5px;
  line-height: 1.4;
}

.ci-kb { display: flex; flex-direction: column; gap: 9px; }
.ci-article {
  padding: 13px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(16, 27, 48, 0.05);
}
.ci-article > strong { display: block; font-size: 13.5px; font-weight: 800; line-height: 1.5; color: #2B3446; }
.ci-article > span { display: block; margin-top: 4px; font-size: 11px; line-height: 1.6; color: #8A94A6; }
.ci-kb-meta { display: flex; align-items: center; gap: 13px; margin-top: 10px; }
.ci-kb-meta em { display: inline-flex; align-items: center; gap: 4px; font-style: normal; font-size: 10px; color: #AAB2C0; }
.ci-kb-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  color: var(--brand);
  font-size: 11px;
  font-weight: 600;
}
.ci-kb-body {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid #F2F5FA;
  font-size: 11.5px;
  line-height: 1.85;
  color: #4A5568;
  white-space: pre-wrap;
}

/* ---------- 底部操作 ---------- */

.card-dock {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 50;
  width: 100%;
  max-width: var(--sheet);
  transform: translateX(-50%);
  padding: 10px 12px calc(8px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(245, 247, 251, 0), #F5F7FB 32%);
  pointer-events: none;
}
.card-dock > * { pointer-events: auto; }
.card-contactbar {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
  padding: 9px 11px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(16, 27, 48, 0.14);
}
.card-contactbar > div { flex: 1; min-width: 0; }
.card-contactbar strong { display: block; font-size: 13px; font-weight: 700; color: #101B30; }
.card-contactbar > div span { display: block; margin-top: 2px; font-size: 10.5px; color: #8A94A6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-contactbar .ava { flex: 0 0 auto; }
.card-contact-cta {
  flex: 0 0 auto;
  height: 31px;
  padding: 0 15px;
  border-radius: 999px;
  background: #EEF3FF;
  color: var(--brand-deep);
  font-size: 12px;
  font-weight: 700;
}
.card-contact-x { flex: 0 0 auto; width: 26px; height: 26px; display: grid; place-items: center; color: #B0B9C8; }
.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(16, 27, 48, 0.16);
}
.card-follow-btn {
  flex: 1;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 999px;
  background: #EAF2FF;
  color: var(--brand-deep);
  font-size: 14px;
  font-weight: 700;
}
.card-follow-btn.is-on { background: #F1F4F9; color: #6B768A; }
.card-chat-btn {
  flex: 1.38;
  height: 46px;
  border-radius: 999px;
  background: var(--brand-grad);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.2px;
  box-shadow: 0 8px 22px rgba(80, 110, 230, 0.32);
}
.card-chat-btn:active, .card-follow-btn:active { transform: scale(0.985); }

/* ---------- 编辑名片 ---------- */

.card-edit-page {
  min-height: 100vh;
  min-height: 100dvh;
  background: #F3F5FA;
  padding-bottom: calc(30px + env(safe-area-inset-bottom));
}
.cedit-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 56px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #EEF1F7;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.cedit-nav strong { font-size: 17px; font-weight: 800; letter-spacing: -0.2px; }
.cedit-cancel { justify-self: start; color: #5A6578; font-size: 14px; padding: 8px 4px; }
.cedit-save {
  justify-self: end;
  height: 32px;
  padding: 0 15px;
  border-radius: 999px;
  background: var(--brand-grad);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(80, 110, 230, 0.28);
}
.cedit-body { display: flex; flex-direction: column; gap: 12px; padding: 12px; }

.cedit-preview {
  position: relative;
  min-height: 168px;
  padding: 16px;
  overflow: hidden;
  border-radius: 16px;
  background-color: #DDE8FF;
  background-size: cover;
  background-position: center 38%;
  box-shadow: 0 6px 18px rgba(16, 27, 48, 0.08);
  isolation: isolate;
}
.cedit-preview.is-brand {
  background-image: linear-gradient(140deg, #DCE9FF 0%, #E8E7FF 55%, #F4EFFF 100%);
}
.cedit-preview .cp-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(248, 250, 255, 0.55));
}
.cp-copy { position: relative; z-index: 1; max-width: calc(100% - 90px); }
.cp-headline { margin: 0; color: #9A7A2E; font-size: 11.5px; font-weight: 700; letter-spacing: 0.5px; }
.cp-name { display: flex; align-items: center; gap: 7px; margin-top: 7px; }
.cp-name strong { font-size: 23px; font-weight: 900; letter-spacing: -0.5px; color: #20283A; }
.cp-seal {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 19px;
  padding: 0 6px;
  border-radius: 5px;
  background: #1B2A44;
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
}
.cp-honors { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.cp-honors span {
  height: 22px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  border-radius: 5px;
  border: 1px solid #D8C49A;
  color: #6B5230;
  font-size: 10px;
}
.cp-org { margin: 11px 0 0; color: #4A5570; font-size: 12.5px; font-weight: 600; }
.cp-avatar { position: absolute; right: 16px; bottom: 20px; z-index: 1; }
.cp-avatar .ava { border: 3px solid #fff; box-shadow: 0 8px 20px rgba(40, 60, 120, 0.22); }

.cedit-card {
  padding: 14px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(16, 27, 48, 0.05);
}
.cedit-title { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.cedit-ico {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #EEF3FF;
  color: var(--brand);
}
.cedit-title strong { font-size: 14px; font-weight: 800; color: #1C2638; }
.cedit-hint { margin: 0 0 12px; color: #8A94A6; font-size: 10.5px; line-height: 1.6; }
.cedit-hint-light { margin: 9px 0 0; }
.cedit-avatar-row { display: flex; align-items: center; gap: 13px; }
.cedit-avatar .ava { border: 2px solid #fff; box-shadow: 0 6px 16px rgba(16, 27, 48, 0.12); }
.cedit-upload {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: #EEF3FF;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.cedit-upload-wide { width: 100%; justify-content: center; margin-top: 4px; background: #F5F7FB; border: 1px dashed #D5DCE7; }
.cedit-bgs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 1px 1px 3px;
  scrollbar-width: none;
}
.cedit-bgs::-webkit-scrollbar { display: none; }
.cedit-bg {
  position: relative;
  flex: 0 0 auto;
  width: 84px;
  height: 104px;
  border-radius: 12px;
  background-color: #1D2D55;
  background-size: cover;
  background-position: center;
  border: 2px solid transparent;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}
.cedit-bg.is-brand { background-image: linear-gradient(150deg, #3247C8, #6A5AE0); }
.cedit-bg.is-brand span {
  position: absolute;
  left: 7px;
  bottom: 7px;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(10, 16, 34, 0.55);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
}
.cedit-bg.is-on { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(63, 142, 247, 0.18); }

.cedit-field {
  display: block;
  margin-bottom: 8px;
  padding: 7px 11px 8px;
  border-radius: 12px;
  background: #F5F7FB;
}
.cedit-field span { display: block; margin-bottom: 1px; color: #8A94A6; font-size: 9.5px; font-weight: 600; }
.cedit-field input, .cedit-field textarea {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  outline: none;
  color: #1C2638;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  resize: none;
}
.cedit-field input[readonly] { color: #7D8797; }
.cedit-field-area textarea { min-height: 96px; font-size: 16px; font-weight: 500; }
.cedit-pair, .cedit-quad { display: grid; gap: 8px; }
.cedit-pair { grid-template-columns: 1fr 1fr; }
.cedit-quad { grid-template-columns: 1fr 1fr; }
.cedit-tags { margin-top: 4px; }
.cedit-sub { display: block; margin: 0 0 7px 1px; color: #8A94A6; font-size: 9.5px; font-weight: 600; }
.cedit-tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.cedit-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 28px;
  padding: 0 5px 0 10px;
  border-radius: 999px;
  background: #EEF4FF;
  color: #3F7FDB;
  font-size: 11.5px;
  font-weight: 600;
}
.cedit-tag button { width: 18px; height: 18px; border-radius: 50%; color: #7BA7E8; font-size: 13px; line-height: 1; }
.cedit-tag-add { display: flex; gap: 7px; margin-top: 9px; }
.cedit-tag-add input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 11px;
  border-radius: 10px;
  border: 1px solid #E6EBF4;
  background: #fff;
  outline: none;
  font-size: 16px;
}
.cedit-tag-add button {
  flex: 0 0 auto;
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  background: #EEF3FF;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
}
.cedit-steps { display: flex; flex-direction: column; gap: 7px; margin-top: 3px; }
.cedit-step { display: grid; grid-template-columns: 20px 1fr 1.25fr; align-items: center; gap: 6px; }
.cedit-step > b {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #EEF3FF;
  color: var(--brand);
  font-size: 10px;
}
.cedit-step .cedit-field { margin: 0; padding: 6px 9px; }
.cedit-step .cedit-field input { font-size: 12.5px; font-weight: 500; }
.cedit-files { display: flex; flex-direction: column; gap: 7px; }
.cedit-file {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 11px;
  background: #F5F7FB;
}
.cedit-file > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: #FFEDEA; color: #E0533D; font-size: 8px; font-weight: 800; }
.cedit-file strong { flex: 1; min-width: 0; font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cedit-file em { font-style: normal; font-size: 9.5px; color: #8A94A6; }
.cedit-file button { width: 22px; height: 22px; color: #AAB2C0; font-size: 15px; }
.cedit-footnote { margin: 2px 0 12px; text-align: center; color: #AAB2C0; font-size: 9.5px; line-height: 1.7; }

/* ---------- 交换名片 ---------- */

.exchange-body { padding: 0; }
.exchange-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #F5F7FB;
  padding-bottom: calc(74px + env(safe-area-inset-bottom));
}
.exchange-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 54px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #F0F2F7;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.exchange-nav strong { flex: 1; text-align: center; font-size: 16px; font-weight: 800; }
.exchange-bolt {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #FFF8E8;
  border: 1px solid #F2DFB4;
  color: #D9930D;
}
.exchange-notice { margin: 9px 0 4px; text-align: center; color: #AAB2C0; font-size: 10px; }
.exchange-flow { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 10px 14px 16px; }
.ex-row { display: flex; align-items: flex-start; gap: 8px; }
.ex-row.is-me { justify-content: flex-end; }
.ex-bubble {
  max-width: 78%;
  padding: 11px 13px;
  border-radius: 15px;
  border-bottom-left-radius: 5px;
  background: #fff;
  color: #2A3448;
  font-size: 13.5px;
  line-height: 1.7;
  box-shadow: 0 3px 12px rgba(16, 27, 48, 0.05);
}
.ex-bubble.is-me {
  border-radius: 15px 15px 5px 15px;
  background: var(--brand-grad);
  color: #fff;
  box-shadow: 0 6px 16px rgba(80, 110, 230, 0.24);
}
.ex-report {
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(160deg, #F5F2FF, #EDF3FF 60%, #F7F9FF);
  border: 1px solid #DCE4FA;
  box-shadow: 0 8px 22px rgba(80, 110, 230, 0.1);
}
.ex-report-head { display: flex; align-items: center; gap: 6px; }
.ex-report-spark {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-grad);
  color: #fff;
}
.ex-report-head strong { flex: 1; font-size: 13.5px; font-weight: 800; color: #3E43B8; }
.ex-report-head em {
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  color: var(--green);
  padding: 3px 8px;
  border-radius: 999px;
  background: #E8F8EF;
}
.ex-report-role { margin: 10px 0 0; font-size: 12.5px; line-height: 1.75; color: #2A3448; }
.ex-report-list { margin: 11px 0 0; padding: 10px 11px; border-radius: 11px; background: rgba(255, 255, 255, 0.72); list-style: none; display: flex; flex-direction: column; gap: 7px; }
.ex-report-list li { position: relative; padding-left: 12px; font-size: 11.5px; line-height: 1.65; color: #3D4757; }
.ex-report-list li::before { content: ""; position: absolute; left: 0; top: 7px; width: 4px; height: 4px; border-radius: 50%; background: var(--brand); }
.ex-report-opener { margin-top: 11px; }
.ex-report-opener span { font-size: 10px; color: #8A94A6; }
.ex-report-opener p { margin: 4px 0 0; font-size: 12.5px; line-height: 1.75; color: #4E4AD6; font-weight: 600; }
.ex-status {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 11px;
  border-radius: 999px;
  background: #1E2A44;
  color: rgba(255, 255, 255, 0.92);
  font-size: 10px;
}
.ex-composer {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: 100%;
  max-width: var(--sheet);
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid #EFF2F8;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.ex-composer input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #E9EDF4;
  background: #F6F7FB;
  outline: none;
  font-size: 16px;
}
.ex-send {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-grad);
  color: #fff;
  box-shadow: 0 5px 14px rgba(80, 110, 230, 0.28);
}

.card-edit-avatar-img { border-radius: 50%; overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .card-avatar, .card-portrait-ring, .card-live-dot::after, .cw-card { animation: none !important; }
}
