/* 创建个人名片 · 四步流程 */
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: #eef3f8;
  color: #111;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.create-card-phone {
  position: relative;
  width: 390px;
  height: 844px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 18px 44px rgb(42 67 106 / 14%);
  display: flex;
  flex-direction: column;
}

.create-card-nav {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 0 14px;
  background: #fff;
}
.create-card-nav a,
.create-card-nav button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #111;
  background: transparent;
  text-decoration: none;
  cursor: pointer;
}
.create-card-nav svg { width: 22px; height: 22px; }
.create-card-nav-spacer { width: 36px; height: 36px; }

.create-card-head {
  flex: none;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  align-items: end;
  padding: 4px 20px 16px;
  background: #fff;
  border-bottom: 1px solid #eee;
}
.create-card-head h1 {
  margin: 0;
  grid-column: 1;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.create-card-head .step {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  padding-top: 8px;
  color: #9a9a9a;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.create-card-head .step b {
  color: #111;
  font-weight: 700;
}
.create-card-head p {
  margin: 0;
  grid-column: 1 / -1;
  color: #9a9a9a;
  font-size: 13px;
  line-height: 1.4;
}

.create-card-scroll {
  flex: 1 1 auto;
  min-height: 0;
  padding: 16px 16px 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.create-card-scroll::-webkit-scrollbar {
  display: none;
}

.create-card-foot {
  flex: none;
  display: grid;
  gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid #f0f0f0;
}
.create-card-foot--split {
  grid-template-columns: 1fr 1fr;
}
.create-card-btn {
  display: grid;
  place-items: center;
  height: 48px;
  border-radius: 999px;
  border: 0;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.create-card-btn--primary {
  color: #fff;
  background: #111;
}
.create-card-btn--ghost {
  color: #111;
  background: #fff;
  border: 1px solid #d8d8d8;
}

/* —— Step 1 基本信息 —— */
.cci-field {
  display: block;
  margin-bottom: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f5f5f5;
}
.cci-field:focus-within { background: #f0f0f0; }
.cci-label {
  display: block;
  margin-bottom: 6px;
  color: #9a9a9a;
  font-size: 12px;
  line-height: 1.2;
}
.cci-label .req { color: #e54545; margin-left: 1px; }
.cci-input,
.cci-textarea {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  color: #111;
  background: transparent;
  font: inherit;
  font-size: 15px;
  line-height: 1.4;
  outline: none;
}
.cci-textarea {
  min-height: 72px;
  resize: none;
}
.cci-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.cci-row .cci-field { margin-bottom: 0; }
.cci-select {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #111;
  font: inherit;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
}
.cci-select span[data-placeholder] { color: #b0b0b0; font-weight: 400; }
.cci-select svg {
  flex: none;
  width: 16px;
  height: 16px;
  color: #c0c0c0;
}
.cci-sign-wrap { position: relative; }
.cci-sign-wrap .cci-textarea { padding-bottom: 18px; }
.cci-count {
  position: absolute;
  right: 14px;
  bottom: 10px;
  color: #b0b0b0;
  font-size: 11px;
  pointer-events: none;
}

/* —— Step 2 封面 —— */
.cc-hint {
  margin: 0 0 12px;
  color: #c9a227;
  font-size: 12px;
}
.cc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.cc-thumb {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 12px;
  background: #f0f0f0;
}
.cc-thumb[hidden] { display: none !important; }
.cc-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cc-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  padding: 3px 8px;
  border-radius: 4px;
  color: #fff;
  background: rgb(0 0 0 / 55%);
  font-size: 11px;
  font-weight: 600;
}
/* 已设封面：仅右下角圆形删除 */
.cc-del {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 1;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgb(0 0 0 / 55%);
  cursor: pointer;
}
.cc-del svg { width: 13px; height: 13px; }
/* 未设封面：右下角两个分开的小按钮 */
.cc-actions {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cc-set {
  height: 26px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgb(0 0 0 / 55%);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.cc-actions .cc-del {
  position: static;
}
.cc-upload {
  display: grid;
  place-items: center;
  gap: 8px;
  aspect-ratio: 1;
  border: 0;
  border-radius: 12px;
  color: #8a8a8a;
  background: #f2f2f2;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.cc-upload svg { width: 36px; height: 36px; color: #bdbdbd; }

/* —— Step 3 价值亮点 —— */
.ch-tip {
  margin: 0 0 12px;
  color: #9a9a9a;
  font-size: 13px;
}
.ch-list { display: grid; gap: 10px; }
.ch-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ch-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f5f5f5;
  text-decoration: none;
  color: inherit;
}
.ch-card-copy { flex: 1; min-width: 0; }
.ch-card-copy small {
  display: block;
  margin-bottom: 4px;
  color: #9a9a9a;
  font-size: 11px;
}
.ch-card-copy b {
  display: block;
  overflow: hidden;
  color: #111;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.ch-card > svg {
  flex: none;
  width: 16px;
  height: 16px;
  color: #c0c0c0;
}
.ch-remove {
  flex: none;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: #e53935;
  cursor: pointer;
}
.ch-remove svg { width: 14px; height: 14px; }
.ch-add {
  display: grid;
  place-items: center;
  width: 100%;
  height: 48px;
  margin-top: 2px;
  border: 0;
  border-radius: 10px;
  color: #111;
  background: #f5f5f5;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

/* —— Step 4 风格 —— */
.cs-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 4px 0 20px;
  padding: 3px;
  border-radius: 10px;
  background: #f0f0f0;
}
.cs-tabs button {
  height: 36px;
  border: 0;
  border-radius: 8px;
  color: #111;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.cs-tabs button[aria-selected="true"] {
  color: #fff;
  background: #111;
}
.cs-stage { margin: 0 0 8px; }
.cs-stage [data-panel][hidden] { display: none !important; }
.cs-preview {
  position: relative;
  min-height: 210px;
  margin: 0 4px;
  padding: 22px 18px 16px;
  overflow: hidden;
  border-radius: 14px;
  color: #1a1a1a;
  background:
    linear-gradient(135deg, rgb(255 255 255 / 40%), transparent 40%),
    linear-gradient(160deg, #f7f5f2 0%, #ebe7e1 45%, #f4f1ec 100%);
  box-shadow: 0 10px 28px rgb(40 50 70 / 10%);
}
.cs-preview--business {
  background:
    linear-gradient(145deg, rgb(255 255 255 / 55%) 0%, transparent 42%),
    linear-gradient(160deg, #f6f4f1 0%, #ebe6df 48%, #f3f0eb 100%);
}
.cs-preview--business::before {
  content: "";
  position: absolute;
  inset: 16% -18% auto;
  height: 78px;
  background: rgb(170 170 170 / 16%);
  border-radius: 50%;
  transform: rotate(-18deg) scaleX(1.55);
  filter: blur(1px);
}
.cs-preview--business::after {
  content: "";
  position: absolute;
  inset: auto -20% 8% ;
  height: 56px;
  background: rgb(190 190 190 / 10%);
  border-radius: 50%;
  transform: rotate(-18deg) scaleX(1.4);
}
.cs-preview-top,
.cs-preview-contact { position: relative; z-index: 1; }
.cs-preview-top b {
  display: inline;
  font-size: 24px;
  font-weight: 800;
}
.cs-preview-top .en {
  margin-left: 4px;
  color: #8a8a8a;
  font-size: 13px;
  font-weight: 400;
}
.cs-preview-top .role {
  display: block;
  margin-top: 8px;
  color: #8a8a8a;
  font-size: 13px;
}
.cs-preview-top .company {
  display: block;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 700;
}
.cs-preview-contact {
  display: grid;
  gap: 6px;
  margin-top: 48px;
  padding-right: 56px;
  color: #8a8a8a;
  font-size: 11px;
}
.cs-preview-contact span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cs-preview-contact svg {
  width: 13px;
  height: 13px;
  flex: none;
}
.cs-logo {
  position: absolute;
  z-index: 1;
  right: 16px;
  bottom: 16px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: #c9c9c9;
}
.cs-logo svg { width: 22px; height: 22px; }

/* 时尚：左图右文 + 配色条 */
.cs-preview--fashion {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: 220px;
  margin: 0 4px;
  padding: 0;
  color: #fff;
  background: #2b2b2b;
  box-shadow: 0 10px 28px rgb(40 50 70 / 14%);
}
.cs-fashion-media {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  background: #1a1a1a;
}
.cs-fashion-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cs-fashion-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 20px 16px;
  background: #3a3a3a;
}
.cs-fashion-copy b {
  margin-bottom: 4px;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
}
.cs-fashion-copy span {
  color: rgb(255 255 255 / 72%);
  font-size: 13px;
  line-height: 1.35;
}
.cs-fashion-company { margin-top: 10px; }
.cs-preview--fashion[data-variant="2"] .cs-fashion-copy { background: #111; }
.cs-preview--fashion[data-variant="3"] {
  grid-template-columns: 0.95fr 1.05fr;
}
.cs-preview--fashion[data-variant="3"] .cs-fashion-media { order: 2; }
.cs-preview--fashion[data-variant="3"] .cs-fashion-copy {
  order: 1;
  background: #111;
}
.cs-preview--fashion[data-variant="4"] .cs-fashion-copy { background: #1f1f1f; }

.cs-variants {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 16px 4px 8px;
}
.cs-variant {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  padding: 0;
  background: #eee;
  cursor: pointer;
}
.cs-variant-swatch {
  display: block;
  width: 100%;
  height: 100%;
}
.cs-variant-swatch--1 {
  background: linear-gradient(135deg, #d8d8d8 0 50%, #4a4a4a 50% 100%);
}
.cs-variant-swatch--2 {
  background: linear-gradient(135deg, #fff 0 50%, #111 50% 100%);
}
.cs-variant-swatch--3 {
  background: linear-gradient(135deg, #111 0 50%, #fff 50% 100%);
}
.cs-variant-swatch--4 {
  background: linear-gradient(135deg, #111 0 50%, #5a5a5a 50% 100%);
}
.cs-variant-mark,
.cs-variant-num {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.cs-variant-num {
  width: 28px;
  height: 28px;
  margin: auto;
  border-radius: 50%;
  color: #111;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 28px;
  text-align: center;
  box-shadow: 0 2px 8px rgb(0 0 0 / 18%);
}
.cs-variant:not(.is-active) .cs-variant-mark { display: none; }
.cs-variant.is-active .cs-variant-num { display: none; }

/* 简约：全幅图 + 底部文案 */
.cs-preview--minimal {
  min-height: 240px;
  margin: 0 4px;
  padding: 0;
  color: #fff;
  background: #111;
  box-shadow: 0 10px 28px rgb(40 50 70 / 14%);
}
.cs-minimal-bg {
  display: block;
  width: 100%;
  height: 240px;
  object-fit: cover;
}
.cs-minimal-copy {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  padding: 48px 18px 18px;
  background: linear-gradient(180deg, transparent, rgb(0 0 0 / 78%));
}
.cs-minimal-copy span {
  display: block;
  color: rgb(255 255 255 / 88%);
  font-size: 12px;
  line-height: 1.4;
}
.cs-minimal-copy b {
  display: block;
  margin-top: 6px;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
}

/* —— Preview 主页 —— */
.cp-phone {
  display: flex;
  flex-direction: column;
  background: #f5f6f8;
}
.cp-hero {
  position: relative;
  flex: none;
  height: 280px;
  background: center / cover no-repeat;
}
.cp-hero-nav {
  position: absolute;
  z-index: 2;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cp-hero-nav a {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  color: #111;
  background: rgb(255 255 255 / 92%);
  text-decoration: none;
  box-shadow: 0 2px 8px rgb(0 0 0 / 8%);
}
.cp-dots {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 88px;
  display: flex;
  gap: 5px;
  transform: translateX(-50%);
}
.cp-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgb(255 255 255 / 45%);
}
.cp-dots i:first-child {
  width: 14px;
  border-radius: 999px;
  background: #fff;
}
.cp-profile {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  margin-top: -72px;
  border-radius: 24px 24px 0 0;
  background: #fff;
  box-shadow: 0 -8px 24px rgb(0 0 0 / 8%);
  overflow: hidden;
}
.cp-profile-main {
  flex: none;
  padding: 22px 16px 14px;
  background: #fff;
}
.cp-profile-main h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  text-align: center;
}
.cp-role {
  margin: 6px 0 14px;
  color: #8b9199;
  font-size: 14px;
  text-align: center;
}
.cp-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.cp-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.cp-badge svg {
  width: 14px;
  height: 14px;
  flex: none;
}
.cp-badge--green { color: #0d8f5f; background: #e8f8f1; }
.cp-badge--blue { color: #1769e8; background: #edf4ff; }
.cp-badge--orange { color: #c47a00; background: #fff6e8; }
.cp-lines {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid #f0f1f3;
}
.cp-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
  color: #a0a6ae;
  font-size: 12px;
  line-height: 1.45;
}
.cp-line:last-child { margin-bottom: 0; }
.cp-line svg {
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 1px;
  color: #b8bcc4;
}
.cp-tabs {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 12px;
  overflow-x: auto;
  scrollbar-width: none;
  background: #f5f6f8;
  border-top: 1px solid #f0f1f3;
  -webkit-overflow-scrolling: touch;
}
.cp-tabs::-webkit-scrollbar { display: none; }
.cp-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  height: 40px;
  padding: 0 14px;
  border: 1px solid #e8eaed;
  border-radius: 999px;
  background: #fff;
  color: #6b7280;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.cp-tab svg {
  width: 16px;
  height: 16px;
  flex: none;
}
.cp-tab.active {
  border-color: #1a1a1a;
  background: #1a1a1a;
  color: #fff;
}
.cp-scroll {
  flex: 1 1 auto;
  min-height: 0;
  padding: 4px 16px 96px;
  overflow-y: auto;
  background: #f5f6f8;
  scrollbar-width: none;
}
.cp-scroll::-webkit-scrollbar { display: none; }
.cp-panel[hidden] { display: none; }
.cp-section { margin-bottom: 16px; }
.cp-section > h2 {
  margin: 0 0 10px;
  padding-left: 2px;
  color: #9aa0a8;
  font-size: 13px;
  font-weight: 600;
}
.cp-card {
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 4px rgb(0 0 0 / 4%);
}
.cp-company {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cp-company-icon {
  display: grid;
  flex: none;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  color: #1769e8;
  background: #edf4ff;
}
.cp-company b {
  flex: 1;
  min-width: 0;
  color: #1769e8;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}
.cp-empty {
  margin: 0;
  color: #9aa0a8;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}
.cp-save-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid #f0f0f0;
}

@media (max-width: 390px) {
  .create-card-phone {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }
}
