/* /u/{username} 电子名片 */
:root {
    --pp-accent: #e60012;
    --pp-bg: #f7f7f7;
    --pp-text: #333;
    --pp-muted: #555;
    --pp-card-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --pp-radius: 10px;
    --pp-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC",
        "Microsoft YaHei", sans-serif;
    /* 移动端先保证可读性，不要过大 */
    --pp-size-name: 2.2rem;
    --pp-size-body: 1.7rem;
}

/* 全宽浅灰背景 + 内层 Bootstrap container 控制正常页宽 */
.pp-outer {
    background: var(--pp-bg);
    min-height: calc(100vh - 56px);
    padding-bottom: 24px;
}

.pp-page {
    padding-top: 12px;
    padding-bottom: 12px;
    min-height: inherit;
    display: flex;
    flex-direction: column;
}

.pp-card {
    background: #fff;
    border-radius: var(--pp-radius);
    box-shadow: var(--pp-card-shadow);
}

.pp-header-card .pp-header-body {
    display: flex;
    gap: 14px;
    padding: 12px;
    align-items: flex-start;
    border-radius: var(--pp-radius);
    overflow: hidden;
}

.pp-header-text {
    flex: 1;
    min-width: 0;
    font-family: var(--pp-font);
    color: var(--pp-text);
    background: #f0f0f4;
    border-radius: 8px;
    padding: 12px;
}

/* 方形头像列 */
.pp-header-photo {
    flex: 0 0 auto;
    width: min(38%, 150px);
    max-width: 150px;
    background: #ffffff;
    border-radius: 8px;
    padding: 8px;
    box-shadow: inset 0 0 0 1px #efefef;
}

.pp-header-photo img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    object-fit: cover;
    aspect-ratio: 1 / 1;
    background: #eee;
}

.pp-photo-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    background: linear-gradient(145deg, #eee, #e2e2e2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 2.5rem;
}

/* 首屏：姓名略大，公司 / 职位 / 简介 / 联系方式与 body 字号一致 */
.pp-name {
    font-family: var(--pp-font);
    font-size: var(--pp-size-name);
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--pp-text);
    line-height: 1.2;
}

.pp-name-sub {
    font-family: var(--pp-font);
    font-weight: 600;
    color: #222;
    margin: 0 0 6px;
    font-size: var(--pp-size-body);
    line-height: 1.35;
}

.pp-title {
    font-family: var(--pp-font);
    color: var(--pp-muted);
    font-size: var(--pp-size-body);
    margin: 0 0 10px;
    line-height: 1.4;
}

.pp-about {
    margin: 0 0 12px;
}

.pp-about-label {
    font-family: var(--pp-font);
    font-size: var(--pp-size-body);
    font-weight: 600;
    color: var(--pp-text);
    margin: 0 0 6px;
    line-height: 1.3;
}

.pp-about-text {
    font-family: var(--pp-font);
    font-size: var(--pp-size-body);
    line-height: 1.45;
    color: #333;
    margin: 0;
    white-space: pre-wrap;
    text-align: justify;
}

.pp-contact-lines {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pp-contact-lines li {
    font-family: var(--pp-font);
    color: #333;
    margin-bottom: 6px;
    font-size: var(--pp-size-body);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.45;
}

.pp-contact-lines .fa {
    color: #666;
    margin-top: 5px;
    width: 1.1em;
    flex-shrink: 0;
    font-size: 1em;
}

.pp-contact-lines a {
    color: var(--pp-text);
    word-break: break-all;
}

.pp-actions {
    display: flex;
    gap: 12px;
    margin: 12px 0;
}

.pp-btn {
    flex: 1;
    text-align: center;
    padding: 10px 10px;
    border-radius: 4px;
    font-size: 1.2rem;
    text-decoration: none !important;
    border: 1px solid var(--pp-accent);
    transition: opacity 0.15s ease;
    font-family: var(--pp-font);
}

.pp-btn:hover,
.pp-btn:focus {
    opacity: 0.92;
    text-decoration: none !important;
}

.pp-btn-ghost {
    background: #fff;
    color: var(--pp-accent) !important;
}

button.pp-btn-ghost {
    cursor: pointer;
    width: 100%;
}

.pp-btn-primary {
    background: var(--pp-accent);
    color: #fff !important;
    border-color: var(--pp-accent);
}

/* 与上方名片卡、按钮同宽；两列均分 */
.pp-quick-row {
    display: flex;
    align-items: stretch;
    gap: 12px;
    width: 100%;
    margin-bottom: 16px;
}

.pp-quick-card {
    flex: 1 1 0;
    min-width: 0;
    background: #fff;
    border-radius: var(--pp-radius);
    padding: 12px 10px;
    box-shadow: var(--pp-card-shadow);
    text-decoration: none !important;
    color: inherit !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-family: var(--pp-font);
}

.pp-quick-card--center {
    justify-content: center;
    align-items: center;
    text-align: center;
}

.pp-quick-icon {
    color: var(--pp-accent);
    font-size: 1.9rem;
    line-height: 1;
    display: block;
    margin-bottom: 8px;
}

.pp-quick-icon .fa {
    font-size: inherit;
    width: auto;
}

.pp-quick-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--pp-text);
    display: block;
    margin-bottom: 4px;
    line-height: 1.3;
}

.pp-quick-value {
    font-size: 1.05rem;
    color: var(--pp-text);
    word-break: break-all;
    line-height: 1.3;
    width: 100%;
}

/* 底部区域撑满剩余高度，使左右卡等高；WhatsApp 侧放二维码 */
.pp-quick-footer {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    min-height: 0;
    margin-top: 8px;
}

.pp-quick-qr {
    width: 100%;
    max-width: 120px;
    height: auto;
    display: block;
    border-radius: 4px;
}

.pp-qr-wrap {
    position: relative;
    display: inline-block;
}

.pp-qr-avatar {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24%;
    height: 24%;
    min-width: 28px;
    min-height: 28px;
    max-width: 42px;
    max-height: 42px;
    transform: translate(-50%, -50%);
    border-radius: 6px;
    object-fit: cover;
    background: #fff;
    padding: 2px;
    box-shadow: 0 0 0 2px #fff;
}

/* H5 优先：小屏改为单列，减少拥挤，触控更友好 */
@media (max-width: 767px) {
    :root {
        --pp-size-name: 2rem;
        --pp-size-body: 1rem;
    }

    .pp-page {
        padding-left: 8px;
        padding-right: 8px;
    }

    .pp-header-card .pp-header-body {
        flex-direction: column-reverse;
    }

    .pp-header-photo {
        width: 120px;
        max-width: 120px;
        align-self: center;
    }

    .pp-actions {
        flex-direction: column;
        gap: 8px;
    }

    .pp-quick-row {
        flex-direction: column;
        gap: 8px;
    }

    .pp-quick-card {
        align-items: flex-start;
        text-align: left;
    }

    .pp-quick-card--center {
        align-items: center;
        text-align: center;
    }

    .pp-quick-footer {
        align-items: flex-start;
    }

    .pp-quick-qr {
        max-width: 140px;
    }
}

@media (min-width: 768px) {
    :root {
        --pp-size-name: 2.5rem;
        --pp-size-body: 1.22rem;
    }

    .pp-page {
        padding-top: 24px;
    }

    .pp-header-photo {
        width: min(34%, 180px);
        max-width: 180px;
    }

    .pp-quick-icon {
        font-size: 2.1rem;
        margin-bottom: 10px;
    }

    .pp-quick-qr {
        max-width: 150px;
    }
}
