/* 名片详情 — 参考 3721 布局 + 爆品汇黄灰主题 */
.cd-page {
    --cd-accent: #fff000;
    --cd-accent-hover: #f5e800;
    --cd-dark: #595757;
    --cd-dark-deep: #454343;
    --cd-muted: #888;
    --cd-line: #e8e8e8;
    --cd-lock: #0d8a6a;
    --cd-max: 32rem;
    background: #f0f0f0;
    padding-bottom: 4.5rem;
    min-height: calc(100vh - 5rem);
    box-sizing: border-box;
}

.cd-shell {
    width: 100%;
    max-width: var(--cd-max);
    margin: 0 auto;
    padding: 0 0 1rem;
    box-sizing: border-box;
}

/* —— 顶栏 —— */
.cd-header {
    position: sticky;
    top: 5rem;
    z-index: 40;
    display: grid;
    grid-template-columns: 2.5rem 1fr auto;
    align-items: center;
    gap: 0.35rem;
    padding: 0.65rem 0.85rem;
    background: var(--cd-dark);
    color: #fff;
    box-sizing: border-box;
}
.cd-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    color: #fff;
    text-decoration: none;
    font-size: 1.35rem;
    line-height: 1;
    border-radius: 6px;
}
.cd-back:hover {
    background: rgba(255, 255, 255, 0.12);
}
.cd-header h1 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}
.cd-share-hint {
    appearance: none;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 6px !important;
    padding: 0.25rem 0.15rem !important;
    margin: 0 !important;
    min-height: 0 !important;
    min-width: 0 !important;
    width: auto !important;
    display: inline !important;
    cursor: pointer;
    font-size: 0.86rem !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    color: #fff000 !important;
    -webkit-text-fill-color: #fff000 !important;
    white-space: nowrap;
    line-height: 1.25;
    text-align: right;
    transform: none !important;
}
.cd-share-hint:hover,
.cd-share-hint:active,
.cd-share-hint:focus {
    background: transparent !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    box-shadow: none !important;
    transform: none !important;
}
.cd-share-tip {
    position: fixed;
    left: 50%;
    top: 6.5rem;
    z-index: 80;
    transform: translateX(-50%);
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: #111;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}
.cd-share-tip.is-on { opacity: 1; }

/* —— 主名片白卡 —— */
.cd-card {
    margin: 0.65rem 0.75rem 0;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
    border: 1px solid #ebebeb;
}

.cd-profile {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 1rem 1rem 0.75rem;
}
.cd-avatar {
    flex: 0 0 4.25rem;
    width: 4.25rem;
    height: 4.25rem;
    border-radius: 50%;
    background: #ececec;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 1.35rem;
    font-weight: 900;
    color: #666;
}
.cd-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cd-profile-info {
    min-width: 0;
    flex: 1;
}
.cd-name {
    margin: 0 0 0.2rem;
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--cd-dark);
    line-height: 1.2;
}
.cd-title {
    margin: 0 0 0.15rem;
    font-size: 0.88rem;
    color: var(--cd-muted);
}
.cd-company {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: #111;
    line-height: 1.35;
}
.cd-badge-inline {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.05rem 0.35rem;
    border-radius: 4px;
    background: var(--cd-accent);
    color: #111;
    font-size: 0.65rem;
    font-weight: 800;
    vertical-align: middle;
}

/* —— 字段列表 —— */
.cd-fields {
    margin: 0;
    padding: 0 1rem 0.5rem;
}
.cd-field {
    display: grid;
    grid-template-columns: 4.5rem 1fr;
    gap: 0.5rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid #f3f3f3;
    font-size: 0.88rem;
    line-height: 1.45;
}
.cd-field:last-child {
    border-bottom: 0;
}
.cd-field dt {
    margin: 0;
    color: var(--cd-muted);
    font-weight: 600;
}
.cd-field dd {
    margin: 0;
    color: #333;
    min-width: 0;
    word-break: break-word;
}
.cd-field dd.is-locked {
    color: var(--cd-lock);
    font-weight: 600;
}

.cd-hometown-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}
.cd-hometown-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}
.cd-hometown-tag {
    display: inline-flex;
    padding: 0.12rem 0.45rem;
    border: 1px solid var(--cd-dark);
    border-radius: 4px;
    color: var(--cd-dark);
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    background: #fff;
}
.cd-hometown-tag:hover {
    background: #fafafa;
    border-color: var(--cd-accent);
}
.cd-hometown-tip {
    font-size: 0.68rem;
    color: var(--cd-lock);
    white-space: nowrap;
}

/* —— 二维码（左对齐，与上方字段标签列对齐） —— */
.cd-qrcode {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.75rem 1rem 0.85rem;
    border-top: 1px solid #f3f3f3;
}
.cd-qrcode-box {
    width: 7.5rem;
    height: 7.5rem;
    border: 1px solid var(--cd-line);
    border-radius: 8px;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.cd-qrcode-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.cd-qrcode-label {
    margin: 0.45rem 0 0;
    width: 7.5rem;
    font-size: 0.82rem;
    color: var(--cd-muted);
    font-weight: 600;
    text-align: center;
}

/* —— 底部标签行 —— */
.cd-tagbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.65rem 1rem 0.85rem;
    border-top: 1px solid #f3f3f3;
    background: #fafafa;
}
.cd-tagbar-label {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--cd-dark);
    margin-right: 0.15rem;
}
.cd-tag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.22rem 0.55rem;
    border: 1px solid var(--cd-dark);
    border-radius: 4px;
    background: #fff;
    color: var(--cd-dark);
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
}
.cd-tag-btn:hover,
.cd-tag-btn.is-on {
    background: var(--cd-accent);
    border-color: var(--cd-accent);
    color: #111;
}

/* —— 分享激励条 —— */
.cd-share-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 0.65rem 0.75rem 0;
    padding: 0.65rem 0.85rem;
    background: var(--cd-dark);
    color: #fff;
    border-radius: 10px;
    box-sizing: border-box;
}
.cd-share-bar p {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.35;
    flex: 1;
    min-width: 0;
}
.cd-share-actions {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
}
.cd-share-btn {
    padding: 0.35rem 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 6px;
    background: transparent;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}
.cd-share-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* —— 社交互动条 —— */
.cd-social-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 0.55rem 0.75rem 0;
    padding: 0.55rem 0.75rem;
    background: #fff;
    border: 1px solid var(--cd-line);
    border-radius: 10px;
}
.cd-views {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    color: var(--cd-muted);
    min-width: 0;
}
.cd-view-avatars {
    display: flex;
}
.cd-view-dot {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    background: #ddd;
    border: 2px solid #fff;
    margin-left: -0.35rem;
}
.cd-view-dot:first-child {
    margin-left: 0;
}
.cd-social-actions {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
}
.cd-social-btn {
    padding: 0.3rem 0.55rem;
    border: 1px solid var(--cd-line);
    border-radius: 6px;
    background: #fff;
    color: #444;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}
.cd-social-btn:hover {
    border-color: var(--cd-accent);
}

.cd-cases {
    margin: 0.75rem 1rem 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #eee;
    text-align: left;
}
.cd-cases h3 {
    margin: 0 0 0.6rem;
    font-size: 0.95rem;
    font-weight: 700;
}
.cd-cases-back { margin: 0 0 0.5rem; font-size: 0.85rem; }
.cd-cases-summary { margin: 0 0 0.6rem; color: #666; font-size: 0.85rem; }
.cd-cases-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.cd-case-item { color: inherit; text-decoration: none; }
.cd-case-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 88px;
    border-radius: 8px;
    background: #f4f4f4;
    overflow: hidden;
    color: #999;
    font-size: 12px;
}
.cd-case-cover img,
.cd-cases-grid > a img {
    width: 100%;
    height: 88px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}
.cd-case-item strong { display: block; margin-top: 4px; font-size: 0.82rem; font-weight: 600; }

/* —— 简介区 —— */
.cd-intro {
    margin: 0.65rem 0.75rem 0;
    padding: 0.85rem 1rem 1rem;
    background: #e8e8e8;
    border-radius: 10px;
    text-align: center;
}
.cd-intro h2 {
    margin: 0 0 0.55rem;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--cd-dark);
}
.cd-intro p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--cd-muted);
    line-height: 1.55;
    text-align: left;
}
.cd-intro-empty {
    color: #aaa;
    text-align: center;
}

/* —— 扩展区块（留言/评价等） —— */
.cd-extra {
    margin: 0.85rem 0.75rem 0;
}
.cd-extra .cd-panel {
    background: #fff;
    border: 1px solid var(--cd-line);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.65rem;
}
.cd-extra h3,
.cd-extra h4 {
    margin: 0 0 0.65rem;
    font-size: 0.95rem;
    color: var(--cd-dark);
}
.cd-flash {
    margin: 0.65rem 0.75rem 0;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    font-size: 0.88rem;
}
.cd-flash.is-ok {
    background: #e8f5e9;
    color: #2e7d32;
}
.cd-flash.is-err {
    background: #ffebee;
    color: #c62828;
}

/* —— 底部固定导航 —— */
.cd-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--cd-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    max-width: var(--cd-max);
    margin: 0 auto;
    box-sizing: border-box;
}
@media (min-width: 32rem) {
    .cd-bottom-nav {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: 100%;
    }
}
.cd-bottom-nav form {
    display: contents;
}
.cd-bottom-nav a,
.cd-bottom-nav button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0.25rem;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    border: 0;
    background: transparent;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    cursor: pointer;
    font-family: inherit;
    position: relative;
}
.cd-bottom-nav a:last-child,
.cd-bottom-nav button:last-child {
    border-right: 0;
}
.cd-bottom-nav a.is-active,
.cd-bottom-nav button.is-active {
    background: rgba(255, 240, 0, 0.18);
    color: var(--cd-accent);
}
.cd-nav-badge {
    position: absolute;
    top: 0.35rem;
    right: 0.65rem;
    min-width: 1rem;
    height: 1rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: #e53935;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1rem;
    text-align: center;
}

/* —— 解锁弹层（保留，适配新主题） —— */
.card-paywall-panel {
    border-radius: 14px 14px 0 0;
    overflow: hidden;
}
.card-paywall-tips {
    background: var(--cd-dark) !important;
}
.card-paywall-actions .pw-pay {
    background: var(--cd-accent) !important;
    color: #111 !important;
}
.card-paywall-actions .pw-vip {
    background: var(--cd-dark) !important;
}

@media (min-width: 48rem) {
    .cd-page {
        padding-top: 0.5rem;
    }
    .cd-header {
        top: 5rem;
        border-radius: 12px 12px 0 0;
        max-width: var(--cd-max);
        margin: 0 auto;
    }
}
