/**
 * 专利证书式详情页（2026-11-20）
 * ---------------------------------------------------------------------------
 * 版式参考专利证书：双线红框 + 卷草角花 + 样张水印 + 著录项区 + 平台核验章。
 * 三型三色：发明 #A6241C / 实用新型 #2F6B4A / 外观设计 #2A5C99（由 [data-ptype] 切换）。
 *
 * ⛔ 合规约束：
 *   - 水印写「琳琅 lin-lang.com · 样张」（品牌 + 域名 + 状态词），不写 CNIPA；
 *   - 不含国徽以外的官方要素；印章是**平台核验章**（沿用首页 .patent-search__stamp 语言）；
 *   - 证书外必带「展示声明」，文案在视图里，⛔ 不要删。
 *
 * 只负责纸面：.pcert 及其子元素。页面骨架/承托/交易卡/模块区见 patent-detail.css。
 */

/* ---------- 纸面 ---------- */
.pcert {
    --accent: #A6241C;
    --paper: #FDFBF3;
    position: relative;
    background: var(--paper);
    border: 2px solid var(--accent);
    padding: 26px 30px 16px;
    overflow: hidden;
    color: #1D1D1D;
    font-size: 13px;
}

.pcert[data-ptype="2"] { --accent: #2F6B4A; }
.pcert[data-ptype="3"] { --accent: #2A5C99; }

/* 四角卷草（mask 着色，随主色变化） */
.pcert__corner {
    position: absolute;
    width: 64px;
    height: 64px;
    background-color: var(--accent);
    opacity: .9;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23000' stroke-width='1.6'%3E%3Cpath d='M2 62V24C2 12 12 2 24 2h38M9 62V27c0-10 8-18 18-18h35M9 27c7 0 12-5 12-12M15 34c5 1 9-2 10-6'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23000' stroke-width='1.6'%3E%3Cpath d='M2 62V24C2 12 12 2 24 2h38M9 62V27c0-10 8-18 18-18h35M9 27c7 0 12-5 12-12M15 34c5 1 9-2 10-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pcert__corner--tl { left: 6px; top: 6px; }
.pcert__corner--tr { right: 6px; top: 6px; transform: scaleX(-1); }
.pcert__corner--bl { left: 6px; bottom: 6px; transform: scaleY(-1); }
.pcert__corner--br { right: 6px; bottom: 6px; transform: scale(-1, -1); }

/* 品牌水印（⛔ 不要改成 CNIPA）：品牌 + 域名 + 状态词，横向居中避免两侧被裁 */
.pcert__wm {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 22px;
    letter-spacing: 3px;
    color: #8A6A44;
    opacity: .09;
    white-space: nowrap;
    pointer-events: none;
    font-weight: 500;
}
.pcert__wm--a { top: 24%; }
.pcert__wm--b { top: 52%; }
.pcert__wm--c { top: 80%; }

/* ---------- 页眉 ---------- */
.pcert__head {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.pcert__no {
    font-family: "Songti SC", SimSun, "Noto Serif SC", serif;
    font-size: 11px;
    letter-spacing: 1px;
    color: #2A2A2A;
}

.pcert__no b { font-weight: 600; letter-spacing: .5px; }

.pcert__qr { text-align: center; }
.pcert__qr-box {
    width: 48px;
    height: 48px;
    border: 1px solid #2A2A2A;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}
.pcert__qr-label { font-size: 10px; color: #4A4A4A; margin-top: 2px; letter-spacing: 1px; }

/* ---------- 标题区 ---------- */
.pcert__emblem { text-align: center; margin-top: -2px; }
.pcert__emblem img { width: 110px; height: 110px; object-fit: contain; }

.pcert__title {
    font-family: "Songti SC", SimSun, "Noto Serif SC", serif;
    font-size: 30px;
    font-weight: 500;
    letter-spacing: 9px;
    text-indent: 9px;
    text-align: center;
    color: #121212;
    margin: 2px 0 0;
}

.pcert__subtitle {
    font-family: "Songti SC", SimSun, "Noto Serif SC", serif;
    font-size: 10.5px;
    letter-spacing: 3px;
    text-align: center;
    color: var(--accent);
    opacity: .8;
    margin-top: 4px;
    text-transform: uppercase;
}

/* ---------- 著录项 ---------- */
.pcert__rows { display: grid; gap: 9px; margin-top: 16px; }

.pcert__row { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: baseline; }
.pcert__row--2 { grid-template-columns: 96px minmax(0, 1fr) 96px minmax(0, 1fr); column-gap: 8px; }

.pcert__k { letter-spacing: 5px; color: #4A443B; }
.pcert__k--s { letter-spacing: 3px; color: #4A443B; }

.pcert__v { min-width: 0; overflow-wrap: anywhere; }
.pcert__v--mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .2px; }
.pcert__v--hi { color: var(--accent); font-weight: 500; }

.pcert__tags { display: flex; flex-wrap: wrap; gap: 5px; }
.pcert__tag {
    font-size: 10px;
    line-height: 1.6;
    border: 1px solid #D9CFBB;
    border-radius: 3px;
    padding: 0 4px;
    color: #5B5245;
    background: rgba(255, 255, 255, .5);
}
.pcert__empty { color: #8A8172; }

/* ---------- 法务段 ---------- */
.pcert__legal {
    font-family: "Songti SC", SimSun, "Noto Serif SC", serif;
    font-size: 11px;
    line-height: 1.85;
    color: #3A3A3A;
    text-align: justify;
    text-indent: 2em;
    margin: 14px 0 0;
}

/* ---------- 页脚：核验信息 + 平台核验章 ---------- */
.pcert__foot {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-top: 10px;
}

.pcert__meta { font-size: 10px; line-height: 1.6; color: #6B6257; }

.pcert__seal {
    position: relative;
    width: 94px;
    height: 94px;
    flex: 0 0 94px;
    transform: rotate(-7deg);
    border: 2px solid var(--accent);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--accent);
    mix-blend-mode: multiply;
}
.pcert__seal::before {
    content: "";
    position: absolute;
    inset: 3.6px;
    border: 1px dashed var(--accent);
    border-radius: 50%;
    opacity: .6;
}
.pcert__seal-star { font-size: 11px; line-height: 1; }
.pcert__seal-text {
    font-family: "Songti SC", SimSun, "Noto Serif SC", serif;
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 2px;
    text-indent: 2px;
    line-height: 1;
}
.pcert__seal-en,
.pcert__seal-date {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 9.5px;
    line-height: 1;
}
.pcert__seal-en { letter-spacing: 1px; opacity: .85; }
.pcert__seal-date { letter-spacing: .5px; opacity: .7; }

.pcert__bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 9px;
}

/* 条码：纯 CSS 条纹（不引图片） */
.pcert__barcode {
    width: 124px;
    height: 18px;
    background-image: repeating-linear-gradient(
        90deg,
        #1A1A1A 0 2px, transparent 2px 4px,
        #1A1A1A 4px 5px, transparent 5px 8px,
        #1A1A1A 8px 11px, transparent 11px 13px
    );
    opacity: .85;
}

.pcert__page { font-family: "Songti SC", SimSun, "Noto Serif SC", serif; font-size: 11px; color: #4A443B; }

/* ---------- 展示声明（证书外，⛔ 不要删） ---------- */
.pcert-note {
    margin-top: 10px;
    border-left: 2px solid #B9A88C;
    padding: 2px 0 2px 10px;
    font-size: 11px;
    line-height: 1.7;
    color: #6B6257;
}
.pcert-note em { font-style: normal; color: #A6241C; }

/* ---------- 响应式（仅纸面；页面栅格见 patent-detail.css） ---------- */
@media (max-width: 720px) {
    .pcert { padding: 20px 18px 14px; }
    .pcert__title { font-size: 22px; letter-spacing: 6px; text-indent: 6px; }
    .pcert__row,
    .pcert__row--2 { grid-template-columns: 84px minmax(0, 1fr); row-gap: 2px; }
    .pcert__row--2 > .pcert__k--s:nth-child(3) { margin-top: 4px; }
    .pcert__seal { width: 88px; height: 88px; flex-basis: 88px; }
}

/* ---------- 打印：只留证书纸面 ---------- */
@media print {
    .pcert { border-color: #A6241C; }
}
