/* 苏富比艺术品鉴定 - 1:1 还原样式 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --mobile-page-max: 480px;
    --desktop-page-max: 1000px;
    --desktop-breakpoint: 768px;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
    color: #333;
    background: #f5f5f5;
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input { font-family: inherit; border: none; outline: none; background: none; }

/* ==================== 图一：首页 ==================== */
.page-home {
    min-height: 100vh;
    background: linear-gradient(180deg, #7ec0f5 0%, #a8d8f8 28%, #d4ecfc 55%, #eef6fc 78%, #f8fbfe 100%);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.page-home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 220px;
    background:
        radial-gradient(ellipse 120% 80% at 50% -20%, rgba(255,255,255,0.35) 0%, transparent 70%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23ffffff' fill-opacity='0.12' d='M0,192L48,197.3C96,203,192,213,288,229.3C384,245,480,267,576,250.7C672,235,768,181,864,181.3C960,181,1056,235,1152,234.7C1248,235,1344,181,1392,154.7L1440,128L1440,0L1392,0C1344,0,1248,0,1152,0C1056,0,960,0,864,0C768,0,672,0,576,0C480,0,384,0,288,0C192,0,96,0,48,0L0,0Z'%3E%3C/path%3E%3C/svg%3E") no-repeat top center;
    background-size: cover;
    pointer-events: none;
}

.home-header {
    text-align: center;
    padding: 40px 24px 32px;
    color: #fff;
    position: relative;
    z-index: 1;
}

.home-logo {
    margin-bottom: 14px;
}

.home-logo img {
    max-width: 200px;
    max-height: 80px;
    margin: 0 auto;
    object-fit: contain;
}

.home-header h1 {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.65;
    letter-spacing: 2px;
    text-shadow: 0 2px 8px rgba(0, 80, 160, 0.25);
}

.home-container {
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 18px;
    flex: 1;
    position: relative;
    z-index: 1;
}

.card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 6px 24px rgba(74, 144, 226, 0.12);
    padding: 22px 20px 26px;
    margin-bottom: 14px;
}

.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input[type="text"] {
    width: 100%;
    height: 42px;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 0 12px;
    font-size: 14px;
    color: #333;
    background: #fff;
}

.form-group input::placeholder { color: #bbb; }

.captcha-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.captcha-row input { flex: 1; min-width: 0; }

.captcha-img {
    width: auto;
    min-width: 130px;
    max-width: 150px;
    height: 42px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #e8e8e8;
    flex-shrink: 0;
    object-fit: contain;
    background: #fff;
}

.btn-primary {
    display: block;
    width: 100%;
    height: 46px;
    background: linear-gradient(90deg, #4a9fe8 0%, #3d8ee6 100%);
    color: #fff;
    border: none;
    border-radius: 23px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 6px;
    letter-spacing: 1px;
    box-shadow: 0 4px 14px rgba(61, 142, 230, 0.4);
}

.btn-primary:active { opacity: 0.92; }

.alert-error {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: #cf1322;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 14px;
}

/* 帮助文档 */
.help-card { padding: 18px 16px 14px; }

.help-card .help-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 15px;
    font-weight: 700;
    color: #333;
    margin-bottom: 14px;
    padding: 0 2px;
}

.help-icon {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #5aabf0, #3d8ee6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.help-icon svg { width: 18px; height: 18px; fill: #fff; }

.accordion-list { display: flex; flex-direction: column; gap: 10px; }

.accordion-item {
    background: #f5f7fa;
    border-radius: 8px;
    overflow: hidden;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 14px;
    cursor: pointer;
    font-size: 13px;
    color: #555;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.accordion-header .icon-plus {
    color: #aaa;
    font-size: 18px;
    font-weight: 300;
    line-height: 1;
    transition: transform 0.25s;
}

.accordion-item.open .icon-plus { transform: rotate(45deg); }

.accordion-body {
    display: none;
    padding: 0 14px 13px;
    font-size: 12px;
    color: #888;
    line-height: 1.75;
    white-space: pre-line;
}

.accordion-item.open .accordion-body { display: block; }

.home-footer {
    text-align: center;
    padding: 28px 16px 32px;
    color: #999;
    font-size: 11px;
    position: relative;
    z-index: 1;
}

/* ==================== 图二：查询详情 ==================== */
.page-detail {
    background: #f5f5f5;
    min-height: 100vh;
    padding-bottom: 24px;
    max-width: 480px;
    margin: 0 auto;
}

/* 小程序风格顶栏 */
.mp-navbar {
    background: #fff;
    height: 44px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    position: sticky;
    top: 0;
    z-index: 200;
    border-bottom: 1px solid #eee;
}

.mp-navbar .nav-back {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 20px;
    font-weight: 300;
}

.mp-navbar .nav-title {
    flex: 1;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-logo {
    max-height: 28px;
    max-width: 140px;
    object-fit: contain;
}

.mp-navbar .nav-more {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.mp-navbar .nav-more span {
    width: 4px;
    height: 4px;
    background: #333;
    border-radius: 50%;
    display: block;
}

/* 主图横幅 */
.detail-banner {
    background: #fff;
    padding-bottom: 10px;
}

.detail-banner-inner {
    position: relative;
}

.detail-banner-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: rgba(82, 196, 26, 0.92);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    display: none;
}

.detail-banner img {
    width: 100%;
    height: auto;
    cursor: pointer;
    display: block;
}

.detail-banner .tip {
    text-align: center;
    font-size: 12px;
    color: #bbb;
    margin-top: 8px;
    padding: 0 16px;
}

/* 详情卡片区块 */
.detail-block {
    background: #fff;
    margin-top: 8px;
    padding: 14px 16px 16px;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.block-head .section-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 15px;
    font-weight: 700;
    color: #333;
}

.section-title::before {
    content: '';
    width: 3px;
    height: 15px;
    background: #4a9fe8;
    border-radius: 1px;
    flex-shrink: 0;
}

.status-tag {
    font-size: 13px;
    color: #52c41a;
    font-weight: 500;
    white-space: nowrap;
}

.status-prefix {
    display: inline;
}

/* 带复制的信息行 */
.info-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    color: #333;
    line-height: 1.6;
}

.info-line .text { flex: 1; }

.info-line .text .lbl { color: #666; }

.info-line .text .val { color: #333; font-weight: 500; }

.copy-btn {
    width: 22px;
    height: 22px;
    cursor: pointer;
    color: #4a9fe8;
    flex-shrink: 0;
    margin-left: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-btn svg { width: 16px; height: 16px; fill: #4a9fe8; }

/* 详情页摘要区 */
.detail-summary {
    padding-top: 16px;
}

.detail-work-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.4;
    margin-bottom: 10px;
}

.detail-cert-no-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.detail-cert-no-line .val {
    color: #333;
    font-weight: 600;
    word-break: break-all;
}

.detail-summary-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.summary-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    background: #e6f4ff;
    color: #1677ff;
}

.summary-tag-green {
    background: #f6ffed;
    color: #52c41a;
}

.summary-tag-gray {
    background: #f5f5f5;
    color: #666;
}

.detail-pdf-cta {
    display: none;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 10px;
    background: linear-gradient(135deg, #4a9fe8 0%, #357abd 100%);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(74, 159, 232, 0.35);
    transition: transform .15s ease, box-shadow .15s ease;
}

.detail-pdf-cta:active {
    transform: scale(0.98);
}

.detail-pdf-cta-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.detail-pdf-cta-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.detail-pdf-cta-text strong {
    font-size: 15px;
    font-weight: 700;
}

.detail-pdf-cta-text small {
    font-size: 12px;
    opacity: 0.88;
    font-weight: 400;
}

.detail-pdf-cta-arrow {
    flex-shrink: 0;
    font-size: 22px;
    opacity: 0.85;
    line-height: 1;
}

/* 移动端 / 桌面端详情区块切换 */
.detail-mobile-only {
    display: block;
}

.detail-desktop-only {
    display: none;
}

.detail-row-2 {
    display: flex;
    flex-direction: column;
}

.detail-main {
    display: flex;
    flex-direction: column;
}

/* 作品数据 3列×2行 */
.data-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 1px solid #f0f0f0;
    margin-top: 4px;
}

.data-grid-3 .cell {
    padding: 14px 6px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    border-right: 1px solid #f0f0f0;
}

.data-grid-3 .cell:nth-child(3n) { border-right: none; }
.data-grid-3 .cell:nth-child(n+4) { border-bottom: none; }

.data-grid-3 .cell .val {
    font-size: 14px;
    color: #333;
    font-weight: 600;
    margin-bottom: 5px;
    word-break: break-all;
}

.data-grid-3 .cell .lbl {
    font-size: 11px;
    color: #aaa;
}

.data-grid-3 .cell-cert-no {
    min-width: 0;
    overflow: hidden;
}

.data-grid-3 .cell-cert-no .val {
    font-size: 11px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: normal;
    max-width: 100%;
}

/* 作者信息行 */
.author-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
    color: inherit;
}

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    background: #f0f0f0;
    flex-shrink: 0;
}

.author-name {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.author-badge {
    font-size: 12px;
    color: #52c41a;
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    border-radius: 4px;
    padding: 2px 8px;
    flex-shrink: 0;
    display: none;
}

.arrow-right {
    color: #ccc;
    font-size: 18px;
    font-weight: 300;
}

/* ==================== 作者简介独立页 ==================== */
.page-author {
    background: #f5f5f5;
    min-height: 100vh;
    max-width: 480px;
    margin: 0 auto;
    padding-bottom: 24px;
}

.author-page-top {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    padding: 12px 16px;
    margin-top: 8px;
}

.author-page-avatar {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    background: #f0f0f0;
    flex-shrink: 0;
}

.author-page-name {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.author-page-status {
    font-size: 14px;
    color: #52c41a;
    font-weight: 500;
    flex-shrink: 0;
}

.author-page-content {
    background: #fff;
    margin-top: 8px;
    padding: 14px 16px 20px;
}

.author-page-section-title {
    position: relative;
    padding-left: 10px;
    font-size: 15px;
    font-weight: 700;
    color: #333;
    margin-bottom: 14px;
}

.author-page-section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    width: 3px;
    height: 15px;
    background: #4a9fe8;
    border-radius: 1px;
}

.author-page-body {
    font-size: 14px;
    line-height: 1.85;
    color: #333;
    word-break: break-word;
}

.author-page-body p { margin: 0 0 12px; }
.author-page-body ul,
.author-page-body ol { margin: 0 0 12px 18px; padding: 0; }
.author-page-body img { max-width: 100%; height: auto; border-radius: 4px; }
.author-page-body strong { font-weight: 700; }

/* 存录证明图 */
.status-photo img {
    width: 100%;
    border-radius: 4px;
    cursor: pointer;
}

/* 视频区域 */
.video-box {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    background: #000;
    cursor: pointer;
}

.video-box img {
    width: 100%;
    display: block;
}

.video-box .play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.92);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-box .play-btn::after {
    content: '';
    border-style: solid;
    border-width: 9px 0 9px 14px;
    border-color: transparent transparent transparent #4a9fe8;
    margin-left: 3px;
}

.video-box .duration {
    position: absolute;
    right: 8px;
    bottom: 8px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
}

/* 查看证书入口 */
.cert-link-bar {
    display: none;
}

/* 图片预览遮罩 */
.img-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.88);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.img-modal.show { display: flex; }

.img-modal img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.img-modal .close-modal {
    position: absolute;
    top: 16px;
    right: 16px;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
}

/* ==================== 图三：证书预览 ==================== */
.page-preview {
    background: #e8ecf0;
    min-height: 100vh;
    padding: 12px 10px 24px;
    max-width: 480px;
    margin: 0 auto;
}

.preview-nav {
    display: flex;
    align-items: center;
    padding: 6px 4px 12px;
    gap: 8px;
}

.preview-nav .nav-back {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #333;
}

.preview-nav .nav-title {
    flex: 1;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-right: 28px;
}

/* 证书背景 + 内容区（A4 纸张比例 210×297mm，96dpi ≈ 794×1123px） */
.certificate-shell {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    aspect-ratio: 210 / 297;
}

.cert-bg {
    width: 100%;
    height: 100%;
    display: block;
    user-select: none;
    pointer-events: none;
    object-fit: fill;
}

.certificate-content {
    position: absolute;
    top: calc(12.5% - 28px);
    left: 11%;
    width: 78%;
    height: calc(72.5% + 100px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cert-header {
    text-align: center;
    margin-bottom: 15px;
    flex-shrink: 0;
}

.cert-header .org-cn {
    font-size: 13px;
    font-weight: 800;
    color: #000;
    letter-spacing: 2px;
    line-height: 1.4;
}

.cert-header .org-en {
    font-size: 7px;
    color: #000;
    letter-spacing: 0.4px;
    margin-top: 1px;
    font-weight: 600;
}

.cert-header .title-cn {
    font-size: 12px;
    font-weight: 800;
    color: #000;
    letter-spacing: 1px;
    margin-top: 4px;
    line-height: 1.4;
}

.cert-header .title-en {
    font-size: 6px;
    color: #000;
    letter-spacing: 0.2px;
    margin-top: 2px;
    font-weight: 500;
}

.cert-photos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 2px;
    flex-shrink: 0;
    background: transparent;
}

.cert-photo-item {
    text-align: center;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: transparent;
}

.cert-photo-item .photo-label {
    font-size: 8px;
    color: #000;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 2px;
}

.cert-photo-item .photo-label-en {
    font-size: 6px;
    color: #000;
    margin-bottom: 3px;
}

.cert-photo-frame {
    width: 90%;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
    border: 1px solid #ccc;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-sizing: border-box;
}

.cert-photo-frame.dashed {
    border-style: dashed;
    border-color: #888;
}

.cert-photo-frame img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    display: block;
    background: transparent;
}

.cert-photo-item.micro .cert-photo-frame {
    border-style: dashed;
    border-color: #888;
}

.cert-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-top: 1px solid #ccc;
    flex-shrink: 0;
}

.cert-field {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    padding: 4px 6px;
    border-bottom: 1px solid #ddd;
    min-height: 0;
    gap: 1px 6px;
}

.cert-field:nth-child(odd) {
    border-right: 1px solid #ccc;
}

.cert-field-full {
    grid-column: 1 / -1;
    border-right: none !important;
}

/* 备注：左列标签 + 右列内容（与上方双列网格对齐） */
.cert-field-notes-label {
    align-items: flex-start;
    align-content: flex-start;
}

.cert-field-notes-label .f-label-cn {
    order: 1;
    flex: 0 0 auto;
}

.cert-field-notes-label .f-label-en {
    order: 2;
    flex: 0 0 100%;
}

.cert-field-notes-value {
    display: flex;
    align-items: flex-start;
    align-content: flex-start;
    border-right: none;
}

.cert-field-notes-value .f-value {
    order: 1;
    flex: 1;
    width: 100%;
    min-width: 0;
    text-align: left !important;
    align-self: flex-start;
}

.cert-field .f-value.cert-no-value {
    letter-spacing: 0.3px;
}

.cert-field .f-label-cn {
    order: 1;
    font-size: 9px;
    color: #000;
    font-weight: 700;
    line-height: 1.2;
    flex-shrink: 0;
}

.cert-field .f-label-en {
    order: 3;
    flex: 0 0 100%;
    font-size: 6px;
    color: #000;
    line-height: 1.2;
}

.cert-field .f-value {
    order: 2;
    flex: 1;
    min-width: 0;
    font-size: 10px;
    color: #000;
    font-weight: 700;
    word-break: break-all;
    line-height: 1.3;
    text-align: right;
}

.cert-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    min-height: 96px;
    margin-top: 0px;
    padding: 0 4px 0 10px;
    flex-shrink: 0;
    overflow: visible;
}

.cert-seal-area {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    min-width: 0;
    padding-left: 4px;
    margin-top: 53px;
}

.cert-qrcode {
    flex-shrink: 0;
    margin-right: 6px;
    margin-top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateY(-40px);
}

.cert-qrcode img {
    width: 92px;
    height: 92px;
    display: block;
    object-fit: contain;
    background: #fff;
}

.cert-verify-code {
    min-width: 92px;
    max-width: 130px;
    min-height: 14px;
    margin-top: 3px;
    font-size: 9px;
    font-weight: 700;
    color: #000;
    letter-spacing: 0;
    text-align: center;
    line-height: 1.3;
    flex-shrink: 0;
    white-space: nowrap;
}

.cert-seal-box {
    width: 100%;
    max-width: 180px;
    min-height: 0;
    position: relative;
}

.cert-seal-row {
    position: relative;
    min-height: 26px;
    padding-bottom: 14px;
    margin-bottom: 0;
    padding-right: 2px;
}

.cert-issue-row {
    position: relative;
    padding-bottom: 10px;
}

.cert-seal-row-head {
    display: block;
    line-height: 1.2;
}

.cert-seal-row-head .seal-label,
.cert-seal-row-head .date-label {
    display: block;
    font-size: 8px;
    color: #000;
    font-weight: 700;
}

.cert-seal-row-head .seal-label-en,
.cert-seal-row-head .date-label-en {
    display: block;
    font-size: 6px;
    color: #000;
    font-weight: 400;
    margin-top: 1px;
}

.cert-dotted-line {
    border-bottom: 1px dotted #888;
    min-height: 11px;
    margin-top: 3px;
}

.cert-dotted-line.issue-line {
    position: relative;
    min-height: 13px;
}

.cert-dotted-line .date-val {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 1px;
    font-size: 9px;
    color: #000;
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cert-seal-img {
    position: absolute;
    right: 6px;
    top: 4px;
    width: 66px;
    height: 66px;
    object-fit: contain;
    pointer-events: none;
    z-index: 2;
    transform: translateY(-15px);
}

.cert-statement {
    width: 100%;
    text-align: center;
    padding: 0 0 2px;
    margin-top: 0px;
    flex-shrink: 0;
    min-height: 24px;
    line-height: 1.25;
    font-weight: 500;
}

.cert-statement .statement-cn {
    display: block;
    font-size: 8px;
    color: #000;
    line-height: 1.25;
}

.cert-statement .statement-en {
    display: block;
    font-size: 6px;
    color: #000;
    margin-top: 1px;
    line-height: 1.2;
}

.cert-pdf-viewer-wrap {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    aspect-ratio: 210 / 297;
    overflow: hidden;
}

.cert-pdf-viewer {
    width: 100%;
    height: 100%;
    min-height: 480px;
    border: 0;
    display: block;
    background: #fff;
}

.cert-pdf-actions {
    max-width: 520px;
    margin: 16px auto 0;
    text-align: center;
}

.btn-cert-pdf-download {
    display: inline-block;
    padding: 10px 24px;
    background: linear-gradient(90deg, #4a9fe8, #3d8ee6);
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.cert-pdf-missing {
    max-width: 520px;
    margin: 40px auto;
    padding: 32px 20px;
    text-align: center;
    background: #fff;
    border-radius: 8px;
    color: #666;
    font-size: 14px;
    line-height: 1.7;
}

.page-preview.cert-pdf-preview {
    max-width: 960px;
    margin: 0 auto;
    padding: 16px 12px 24px;
    background: #e8ecf0;
    min-height: 100vh;
    box-sizing: border-box;
}

.cert-pdf-preview-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 0 4px;
}

.cert-pdf-back {
    flex-shrink: 0;
    color: #4a9fe8;
    font-size: 14px;
    text-decoration: none;
}

.cert-pdf-title {
    flex: 1;
    min-width: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-cert-pdf-download-head {
    flex-shrink: 0;
    padding: 8px 14px;
    font-size: 13px;
}

.cert-pdf-back-link {
    display: inline-block;
    margin-top: 16px;
    color: #4a9fe8;
    font-size: 14px;
}

.cert-pdf-preview .cert-pdf-viewer-wrap-full {
    max-width: 100%;
    width: 100%;
    height: calc(100vh - 120px);
    min-height: 480px;
    aspect-ratio: auto;
}

.cert-pdf-preview .cert-pdf-viewer {
    min-height: 100%;
    height: 100%;
}

.cert-pdf-preview .cert-pdf-actions {
    max-width: 100%;
    margin: 16px auto 0;
    padding-bottom: 8px;
}

.page-preview.cert-preview-simple {
    max-width: 520px;
    margin: 0 auto;
    padding: 16px 12px 24px;
    background: #e8ecf0;
    min-height: 100vh;
    box-shadow: none;
    border-radius: 0;
}

.cert-preview-simple .certificate-shell {
    max-width: 520px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14);
}

.cert-preview-simple .cert-pdf-actions-simple {
    margin-top: 16px;
    text-align: center;
}

/* ==================== 桌面端自适应（≥768px，内容区 1000px） ==================== */
@media (min-width: 768px) {
    body {
        background: #eef1f5;
    }

    /* ---------- 首页 ---------- */
    .page-home {
        background: linear-gradient(180deg, #7ec0f5 0%, #a8d8f8 22%, #d4ecfc 48%, #eef6fc 72%, #f8fbfe 100%);
    }

    .page-home::before {
        height: 320px;
    }

    .home-header {
        padding: 56px 32px 40px;
    }

    .home-header h1 {
        font-size: 30px;
        letter-spacing: 3px;
    }

    .home-logo img {
        max-width: 260px;
        max-height: 100px;
    }

    .home-container {
        max-width: var(--desktop-page-max);
        padding: 0 32px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px;
        align-items: start;
    }

    .home-container > .alert-error {
        grid-column: 1 / -1;
    }

    .card {
        padding: 28px 28px 32px;
        border-radius: 16px;
        margin-bottom: 0;
    }

    .form-group label {
        font-size: 15px;
    }

    .form-group input[type="text"] {
        height: 46px;
        font-size: 15px;
    }

    .captcha-img {
        min-width: 140px;
        max-width: 160px;
        height: 46px;
    }

    .btn-primary {
        height: 50px;
        font-size: 17px;
        margin-top: 10px;
    }

    .help-card .help-title {
        font-size: 16px;
    }

    .accordion-header {
        font-size: 14px;
        padding: 15px 16px;
    }

    .accordion-body {
        font-size: 13px;
        padding: 0 16px 15px;
    }

    .home-footer {
        max-width: var(--desktop-page-max);
        margin: 0 auto;
        padding: 36px 32px 48px;
        font-size: 12px;
    }

    /* ---------- 详情页：左图右信息 ---------- */
    .page-detail {
        max-width: 1100px;
        margin: 24px auto;
        padding: 0 0 32px;
        background: #eef1f5;
        border-radius: 12px;
        box-shadow: 0 4px 28px rgba(0, 0, 0, 0.08);
        overflow: hidden;
        display: grid;
        grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
        gap: 0 20px;
        align-items: start;
    }

    .page-detail > .mp-navbar {
        grid-column: 1 / -1;
        height: 56px;
        padding: 0 24px;
        border-radius: 12px 12px 0 0;
        background: #fff;
    }

    .page-detail > .mp-navbar .nav-more {
        display: none;
    }

    .page-detail > .mp-navbar .nav-title {
        font-size: 18px;
        font-weight: 700;
    }

    .page-detail > .mp-navbar .nav-logo {
        max-height: 38px;
        max-width: 220px;
    }

    .page-detail > .detail-banner {
        grid-column: 1;
        grid-row: 2 / span 20;
        margin: 20px 0 20px 20px;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        position: sticky;
        top: 76px;
        background: #fff;
    }

    .detail-banner-badge {
        display: block;
    }

    .detail-mobile-only {
        display: none;
    }

    .detail-desktop-only {
        display: block;
    }

    .page-detail .author-badge {
        display: inline-block;
    }

    .page-detail > .detail-main {
        grid-column: 2;
        grid-row: 2;
        margin: 20px 20px 20px 0;
        display: flex;
        flex-direction: column;
        gap: 14px;
        min-width: 0;
    }

    .page-detail .detail-main .detail-block {
        margin: 0;
        border-radius: 12px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        padding: 18px 22px 20px;
        background: #fff;
    }

    .detail-row-2 {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .status-prefix {
        display: none;
    }

    .detail-row-2 .detail-block {
        margin: 0;
        height: 100%;
    }

    .detail-pdf-cta {
        display: flex;
    }

    .detail-pdf-cta:hover {
        box-shadow: 0 6px 20px rgba(74, 159, 232, 0.45);
        transform: translateY(-1px);
    }

    .page-detail > .detail-banner img {
        max-height: 75vh;
        object-fit: contain;
        background: #fafafa;
    }

    .page-detail > .detail-banner .tip {
        font-size: 13px;
        padding: 12px 16px 16px;
        color: #999;
    }

    .detail-work-title {
        font-size: 24px;
    }

    .detail-summary {
        background: linear-gradient(135deg, #fff 0%, #f8fbff 100%);
        border: 1px solid #e8f0fe;
    }

    .block-head .section-title {
        font-size: 17px;
    }

    .info-line {
        font-size: 15px;
        padding: 4px 0;
    }

    .data-grid-3 {
        gap: 12px;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .data-grid-3 .cell-cert-no .val {
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        word-break: normal;
    }

    .page-detail .detail-main .detail-summary {
        padding: 20px 22px;
    }

    .detail-summary-tags {
        gap: 10px;
    }

    .summary-tag {
        padding: 5px 12px;
        font-size: 13px;
    }

    .page-preview.cert-pdf-preview {
        max-width: 1100px;
        margin: 24px auto;
        padding: 20px 24px 32px;
        border-radius: 12px;
        box-shadow: 0 4px 28px rgba(0, 0, 0, 0.08);
        min-height: calc(100vh - 48px);
    }

    .cert-pdf-preview-head {
        padding: 12px 16px;
        background: #fff;
        border-radius: 10px;
        margin-bottom: 16px;
    }

    .cert-pdf-title {
        font-size: 18px;
    }

    .preview-gate-page {
        max-width: 480px;
        padding: 48px 24px;
    }

    .preview-gate-card {
        padding: 32px 28px;
    }

    .data-grid-3 .cell {
        padding: 18px 12px;
        border-radius: 8px;
        background: #f8fafc;
    }

    .data-grid-3 .cell .val {
        font-size: 16px;
        font-weight: 700;
    }

    .data-grid-3 .cell .lbl {
        font-size: 12px;
        margin-top: 6px;
    }

    .author-avatar {
        width: 56px;
        height: 56px;
    }

    .author-name {
        font-size: 17px;
    }

    .status-photo img {
        max-height: 360px;
        object-fit: contain;
        border-radius: 8px;
    }

    .video-box {
        max-height: 320px;
        border-radius: 10px;
        overflow: hidden;
    }

    /* ---------- 作者简介页 ---------- */
    .page-author {
        max-width: var(--desktop-page-max);
        margin: 24px auto;
        padding: 0 0 32px;
        background: #f5f5f5;
        border-radius: 12px;
        box-shadow: 0 4px 28px rgba(0, 0, 0, 0.08);
        overflow: hidden;
        display: grid;
        grid-template-columns: 280px 1fr;
        gap: 0;
        align-items: start;
    }

    .page-author > .mp-navbar {
        grid-column: 1 / -1;
        height: 52px;
        padding: 0 20px;
    }

    .page-author > .author-page-top {
        grid-column: 1;
        grid-row: 2;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 14px;
        padding: 32px 24px;
        margin: 16px 0 16px 16px;
        border-radius: 10px;
        box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
        position: sticky;
        top: 68px;
    }

    .page-author > .author-page-avatar {
        width: 120px;
        height: 120px;
        border-radius: 12px;
    }

    .page-author > .author-page-name {
        font-size: 20px;
    }

    .page-author > .author-page-status {
        font-size: 14px;
    }

    .page-author > .author-page-content {
        grid-column: 2;
        grid-row: 2;
        margin: 16px 16px 16px 0;
        border-radius: 10px;
        padding: 24px 28px 32px;
        box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
    }

    .author-page-section-title {
        font-size: 17px;
        margin-bottom: 18px;
    }

    .author-page-body {
        font-size: 15px;
        line-height: 1.9;
    }

    /* ---------- 证书预览页 ---------- */
    .page-preview {
        max-width: var(--desktop-page-max);
        margin: 24px auto;
        padding: 20px 32px 40px;
        background: #e8ecf0;
        border-radius: 12px;
        box-shadow: 0 4px 28px rgba(0, 0, 0, 0.08);
    }

    .preview-nav {
        padding: 8px 4px 20px;
    }

    .preview-nav .nav-title {
        font-size: 18px;
    }

    .certificate-shell {
        max-width: 520px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14);
    }

    .cert-header .org-cn { font-size: 24px; }
    .cert-header .org-en { font-size: 10px; }
    .cert-header .title-cn { font-size: 18px; }
    .cert-header .title-en { font-size: 9px; }

    .cert-photo-item .photo-label { font-size: 9px; }
    .cert-photo-item .photo-label-en { font-size: 7px; }

    .cert-field {
        padding: 5px 8px;
        gap: 2px 8px;
    }

    .cert-field .f-label-cn { font-size: 10px; }
    .cert-field .f-label-en { font-size: 7px; }
    .cert-field .f-value { font-size: 11px; }
    .cert-field .cert-no-value { font-size: 11px; }

    .cert-qrcode img {
        width: 92px;
        height: 92px;
    }

    .cert-verify-code {
        max-width: 140px;
        font-size: 10px;
    }

    .cert-seal-box {
        max-width: 180px;
        min-height: 0;
    }

    .cert-seal-row-head .seal-label,
    .cert-seal-row-head .date-label { font-size: 9px; }

    .cert-seal-row-head .seal-label-en,
    .cert-seal-row-head .date-label-en { font-size: 7px; }

    .cert-dotted-line .date-val { font-size: 10px; }

    .cert-seal-img {
        width: 100px;
        height: 100px;
        right: 4px;
        top: 2px;
        transform: translateY(-15px);
    }

    .cert-statement .statement-cn { font-size: 9px; }

    .cert-statement .statement-en { font-size: 7px; }

    .cert-pdf-viewer-wrap {
        max-width: 520px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14);
    }

    .img-modal {
        padding: 40px;
    }
}

/* 大屏居中展示，避免超宽拉伸 */
@media (min-width: 1200px) {
    .page-home,
    .page-detail,
    .page-author,
    .page-preview {
        margin-left: auto;
        margin-right: auto;
    }
}
