/* ============ 分享页 Share Page ============ */

.sp-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.sp-hero {
    text-align: center;
    padding: 48px 16px 32px;
    border-radius: 20px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #fff;
}

.sp-hero h1 {
    font-size: 30px;
    margin: 0 0 10px;
}

.sp-subtitle {
    color: #a5b4c8;
    font-size: 15px;
    margin: 0 auto 24px;
    max-width: 640px;
}

.sp-form {
    display: flex;
    gap: 10px;
    max-width: 680px;
    margin: 0 auto;
}

.sp-form input {
    flex: 1;
    height: 48px;
    border-radius: 12px;
    border: 1px solid #334155;
    background: #0b1220;
    color: #fff;
    padding: 0 16px;
    font-size: 15px;
    outline: none;
}

.sp-form input:focus {
    border-color: #7c6cf7;
}

.sp-form select {
    height: 48px;
    max-width: 150px;
    border-radius: 12px;
    border: 1px solid #334155;
    background: #0b1220;
    color: #fff;
    padding: 0 12px;
    font-size: 15px;
}

.sp-form button {
    height: 48px;
    padding: 0 26px;
    border: 0;
    border-radius: 12px;
    background: #7c6cf7;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.sp-form button:hover {
    background: #6a58f0;
}

.sp-error {
    color: #f87171;
    margin-top: 12px;
    font-size: 14px;
}

.sp-formats {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 28px;
    padding: 0;
    margin: 26px 0 0;
    color: #cbd5e1;
    font-size: 13px;
}

.sp-formats li {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sp-formats span {
    color: #64748b;
}

.sp-steps {
    display: flex;
    gap: 16px;
    margin-top: 28px;
}

.sp-step {
    flex: 1;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.sp-step span {
    flex: 0 0 28px;
    height: 28px;
    border-radius: 50%;
    background: #7c6cf7;
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.sp-step p {
    margin: 4px 0 0;
    font-size: 14px;
    color: #334155;
    line-height: 1.5;
}

/* ---- 应用分享预览页 ---- */

.sp-appbar {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px 18px;
}

.sp-appbar img {
    border-radius: 12px;
}

.sp-appbar-info {
    flex: 1;
    min-width: 0;
}

.sp-appbar-info h1 {
    font-size: 20px;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-appbar-info p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

.sp-detail-link {
    flex: 0 0 auto;
    border: 1px solid #7c6cf7;
    color: #7c6cf7;
    border-radius: 10px;
    padding: 8px 16px;
    font-size: 13px;
    text-decoration: none;
}

.sp-detail-link:hover {
    background: #7c6cf7;
    color: #fff;
}

.sp-form-compact {
    margin: 18px 0;
    max-width: none;
}

.sp-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 22px;
}

.sp-card {
    margin: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
}

.sp-card figcaption {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}

.sp-card figcaption span {
    color: #94a3b8;
    font-weight: 400;
    font-size: 12px;
}

.sp-card a {
    display: block;
}

.sp-card img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.sp-download {
    margin-top: 12px;
    text-align: center;
    background: #0f172a;
    color: #fff !important;
    border-radius: 10px;
    padding: 10px 0;
    font-size: 14px;
    text-decoration: none;
}

.sp-download:hover {
    background: #7c6cf7;
}

@media (max-width: 760px) {
    .sp-steps {
        flex-direction: column;
    }

    .sp-form {
        flex-direction: column;
    }

    .sp-appbar {
        flex-wrap: wrap;
    }
}

/* =============================================================================
   Share Page (Share/App.cshtml)
   全部规则以 .sharex / .sx- 前缀作用域化:
   - 设计稿里的 .wrap / .grid / .facts 是通用名,会撞站点全局样式,故不复用;
   - 上方 .sp-* 一段保留给 Share/Index.cshtml(链接解析落地页),未改动。
   配色沿用站点深色主题 token(卡片绘制端同一套值)。
   ========================================================================== */

.sharex {
    /* ===== 主题变量:基础值 = iOS26(默认风格);dark/light/aurora 在下方覆盖 =====
       页面外观与卡片 PNG 共用这一套 DOM,切主题 = 换变量,预览与导出天然同款 */
    --sx-page-bg: linear-gradient(180deg, #f7f9fc 0%, #eef2f8 100%);
    --sx-bg: #ffffff;            /* hero/面板渐变亮端 */
    --sx-bg2: #f2f6fc;           /* hero/面板渐变暗端 */
    --sx-line: rgba(15, 23, 42, .10);
    --sx-line2: rgba(15, 23, 42, .16);
    --sx-text: #0f172a;
    --sx-text-soft: #334155;
    --sx-dim: #64748b;
    --sx-accent: #0a84ff;
    --sx-accent2: #0066cc;
    --sx-gold: #d97706;
    --sx-surface: rgba(15, 23, 42, .04);   /* 截图条/分享条/评分槽等浅表面 */
    --sx-input-bg: #ffffff;
    --sx-select-bg: #ffffff;
    --sx-chip-bg: rgba(15, 23, 42, .06);
    --sx-pricechip-bg: rgba(10, 132, 255, .12);
    --sx-pricechip-text: #0066cc;
    --sx-av-bg: rgba(10, 132, 255, .18);
    /* 卡片画布 */
    --sx-card-bg1: #ffffff;
    --sx-card-bg2: #eef4fb;
    --sx-card-text: #0f172a;
    --sx-card-dim: #64748b;
    --sx-cat-bg: rgba(10, 132, 255, .12);
    --sx-cat-text: #0066cc;
    --sx-catsub-bg: rgba(10, 132, 255, .08);
    --sx-catsub-text: #3b82d8;
    --sx-card-shotbg: rgba(15, 23, 42, .05);
    --sx-pill-paid: #334155;
    max-width: 1180px;
    margin: 16px auto 40px;
    padding: 8px 24px 48px;
    background: var(--sx-page-bg);
    border: 1px solid var(--sx-line);
    border-radius: 18px;
    color: var(--sx-text);
}

/* ── dark:站点原深色风格 ── */
.sharex.sx-theme-dark {
    --sx-page-bg: linear-gradient(180deg, #0b1220 0%, #0f172a 100%);
    --sx-bg: #0f172a;
    --sx-bg2: #1e293b;
    --sx-line: rgba(255, 255, 255, .10);
    --sx-line2: rgba(255, 255, 255, .18);
    --sx-text: #f8fafc;
    --sx-text-soft: #cbd5e1;
    --sx-dim: #a5b4c8;
    --sx-accent: #7c6cf7;
    --sx-accent2: #bcafff;
    --sx-gold: #f5b301;
    --sx-surface: rgba(255, 255, 255, .04);
    --sx-input-bg: rgba(255, 255, 255, .05);
    --sx-select-bg: #0b1220;
    --sx-chip-bg: rgba(255, 255, 255, .08);
    --sx-pricechip-bg: rgba(124, 108, 247, .22);
    --sx-pricechip-text: #ffffff;
    --sx-av-bg: rgba(124, 108, 247, .28);
    --sx-card-bg1: #0f172a;
    --sx-card-bg2: #1e293b;
    --sx-card-text: #ffffff;
    --sx-card-dim: #a5b4c8;
    --sx-cat-bg: rgba(124, 108, 247, .24);
    --sx-cat-text: #bcafff;
    --sx-catsub-bg: rgba(124, 108, 247, .12);
    --sx-catsub-text: #a89bf5;
    --sx-card-shotbg: rgba(255, 255, 255, .05);
    --sx-pill-paid: #334155;
}

/* ── light:素雅扁平白 ── */
.sharex.sx-theme-light {
    --sx-page-bg: linear-gradient(180deg, #ffffff 0%, #f4f5f7 100%);
    --sx-bg: #ffffff;
    --sx-bg2: #f1f3f6;
    --sx-line: rgba(2, 6, 23, .08);
    --sx-line2: rgba(2, 6, 23, .14);
    --sx-text: #111827;
    --sx-text-soft: #374151;
    --sx-dim: #6b7280;
    --sx-accent: #0285e5;
    --sx-accent2: #0369a1;
    --sx-gold: #d97706;
    --sx-surface: rgba(2, 6, 23, .03);
    --sx-input-bg: #ffffff;
    --sx-select-bg: #ffffff;
    --sx-chip-bg: rgba(2, 6, 23, .05);
    --sx-pricechip-bg: rgba(2, 133, 229, .10);
    --sx-pricechip-text: #0369a1;
    --sx-av-bg: rgba(2, 133, 229, .15);
    --sx-card-bg1: #ffffff;
    --sx-card-bg2: #f7f9fb;
    --sx-card-text: #111827;
    --sx-card-dim: #6b7280;
    --sx-cat-bg: rgba(2, 133, 229, .10);
    --sx-cat-text: #0369a1;
    --sx-catsub-bg: rgba(2, 133, 229, .06);
    --sx-catsub-text: #4b86c9;
    --sx-card-shotbg: rgba(2, 6, 23, .04);
    --sx-pill-paid: #475569;
}

/* ── aurora:极光深紫 ── */
.sharex.sx-theme-aurora {
    --sx-page-bg: linear-gradient(180deg, #171233 0%, #0e1226 100%);
    --sx-bg: #1b1440;
    --sx-bg2: #2a1f5c;
    --sx-line: rgba(167, 139, 250, .16);
    --sx-line2: rgba(167, 139, 250, .28);
    --sx-text: #f3f0ff;
    --sx-text-soft: #cfc6f2;
    --sx-dim: #b3a9dd;
    --sx-accent: #a78bfa;
    --sx-accent2: #d8b4fe;
    --sx-gold: #fbbf24;
    --sx-surface: rgba(167, 139, 250, .08);
    --sx-input-bg: rgba(167, 139, 250, .10);
    --sx-select-bg: #1b1440;
    --sx-chip-bg: rgba(167, 139, 250, .12);
    --sx-pricechip-bg: rgba(167, 139, 250, .22);
    --sx-pricechip-text: #ffffff;
    --sx-av-bg: rgba(167, 139, 250, .25);
    --sx-card-bg1: #241b4d;
    --sx-card-bg2: #120e2b;
    --sx-card-text: #f3f0ff;
    --sx-card-dim: #b3a9dd;
    --sx-cat-bg: rgba(167, 139, 250, .22);
    --sx-cat-text: #d8b4fe;
    --sx-catsub-bg: rgba(167, 139, 250, .10);
    --sx-catsub-text: #c4b5fd;
    --sx-card-shotbg: rgba(255, 255, 255, .06);
    --sx-pill-paid: #3b3663;
}

.sharex a { color: var(--sx-accent2); }
.sharex b { font-weight: 600; }
.sx-dim { color: var(--sx-dim); font-weight: 400; }
.sx-empty { color: var(--sx-dim); padding: 20px 0; }

/* ── 顶部压细的链接解析入口 ───────────────────────────────── */
.sx-resolve {
    display: flex;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid var(--sx-line);
}

.sx-resolve input {
    flex: 1;
    min-width: 0;
    padding: 7px 12px;
    border: 1px solid var(--sx-line2);
    border-radius: 8px;
    background: var(--sx-input-bg);
    color: var(--sx-text);
    font-size: 13px;
}

.sx-resolve select {
    max-width: 130px;
    padding: 7px 8px;
    border: 1px solid var(--sx-line2);
    border-radius: 8px;
    /* 原生 select 不支持半透明背景(Windows Chrome 退成白底),必须给不透明底色 */
    background: var(--sx-select-bg);
    color: var(--sx-text);
    font-size: 13px;
}

/* 弹出 option 列表部分平台白底,显式配色避免白底白字 */
.sx-resolve select option,
.sp-form select option { background: var(--sx-select-bg); color: var(--sx-text); }

/* storefront 未上架/取数失败的常驻横幅(可关) */
.sx-sfnote {
    position: fixed;
    top: 74px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 150;
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: min(88vw, 640px);
    padding: 11px 16px;
    border: 1px solid #e43f3f;
    border-radius: 11px;
    background: #1a1020;
    color: #fecaca;
    font-size: 13px;
    line-height: 1.45;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .45);
}

.sx-sfnote-x {
    flex: none;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 6px;
    background: rgba(228, 63, 63, .2);
    color: #fecaca;
    font-size: 14px;
    cursor: pointer;
}

.sx-resolve button {
    padding: 7px 16px;
    border: 0;
    border-radius: 8px;
    background: var(--sx-accent);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}

/* ── 应用头部 ─────────────────────────────────────────────── */
.sx-hero {
    margin: 20px 0 0;
    background: linear-gradient(135deg, var(--sx-bg) 0%, var(--sx-bg2) 100%);
    border: 1px solid var(--sx-line);
    border-radius: 18px;
    padding: 24px;
}

.sx-id {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.sx-icon {
    width: 88px;
    height: 88px;
    border-radius: 20px;
    flex: none;
    background: var(--sx-surface);
}

.sx-idmain { flex: 1; min-width: 0; }

.sx-crumbs {
    font-size: 12px;
    color: var(--sx-dim);
    margin-bottom: 6px;
}

.sx-crumbs a { color: var(--sx-dim); text-decoration: none; }
.sx-crumbs a:hover { color: var(--sx-accent2); }
.sx-crumbs span { margin: 0 6px; }

.sharex .sx-idmain h1 {
    margin: 0 0 6px;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.2;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.sx-dev { margin: 0 0 12px; font-size: 14px; color: var(--sx-dim); }

.sx-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 13px;
}

.sx-chip {
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--sx-chip-bg);
    color: var(--sx-dim);
}

.sx-chip.sx-price { background: var(--sx-pricechip-bg); color: var(--sx-pricechip-text); font-weight: 600; }

.sx-stars { color: var(--sx-gold); }
.sx-stars .sx-dim { margin-left: 6px; }

.sx-cta { display: flex; flex-wrap: wrap; gap: 10px; }

.sx-btn {
    display: inline-flex;
    align-items: center;
    padding: 9px 18px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
}

.sx-btn-go { background: var(--sx-accent); color: #fff; }
.sx-btn-ghost { background: transparent; border-color: var(--sx-line2); color: var(--sx-text); }
.sx-btn-ghost:hover { border-color: var(--sx-accent); }

.sx-qr {
    margin: 0;
    flex: none;
    text-align: center;
    background: #fff;
    padding: 10px;
    border-radius: 12px;
}

.sx-qr .sx-qrbox svg { width: 116px; height: 116px; display: block; }
.sx-qr figcaption {
    color: #111827;
    font-size: 9px;
    letter-spacing: .12em;
    margin-top: 6px;
    font-weight: 700;
}

/* ── 顶部全幅截图条 ───────────────────────────────────────── */
.sx-striprow { margin: 24px 0 0; }

.sx-shothead {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 12px;
}

.sharex .sx-shothead h2,
.sharex .sx-sechead h2 { margin: 0; font-size: 17px; font-weight: 600; }
.sx-hint { margin-left: auto; font-size: 12px; color: var(--sx-dim); }

.sx-strip {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}

.sx-shot {
    flex: none;
    padding: 0;
    border: 0;
    background: var(--sx-surface);
    border-radius: 12px;
    overflow: hidden;
    cursor: zoom-in;
    scroll-snap-align: start;
    line-height: 0;
}

/* Apple CDN 原图按真实比例显示 —— 零裁剪,横竖图各自等比 */
.sx-shot img {
    display: block;
    width: 300px;
    height: auto;
}

/* ── 分享平台条 ───────────────────────────────────────────── */
.sx-sharebar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 20px 0 0;
    padding: 12px 16px;
    border: 1px solid var(--sx-line);
    border-radius: 14px;
    background: var(--sx-surface);
    font-size: 13px;
}

.sx-ttl { font-weight: 600; }
.sx-shrow { display: flex; flex-wrap: wrap; gap: 8px; }

.sx-sh {
    padding: 5px 12px;
    border: 1px solid var(--sx-line2);
    border-radius: 999px;
    text-decoration: none;
    color: var(--sx-text);
    background: transparent;
    font-size: 13px;
    cursor: pointer;
}

.sx-sh:hover { border-color: var(--sx-accent); color: var(--sx-accent2); }

.sx-badge {
    margin-left: 5px;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(245, 179, 1, .22);
    color: var(--sx-gold);
    font-size: 9px;
    font-weight: 700;
    vertical-align: middle;
}

.sx-note { color: var(--sx-dim); font-size: 12px; }

/* ── Facts ────────────────────────────────────────────────── */
.sx-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 28px;
    margin: 16px 0 0;
    padding: 16px 18px;
    border: 1px solid var(--sx-line);
    border-radius: 14px;
}

.sx-f { display: flex; flex-direction: column; gap: 3px; }
.sx-facts dt { color: var(--sx-dim); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.sx-facts dd { margin: 0; font-size: 15px; font-weight: 600; }

/* ── 内容区块 ─────────────────────────────────────────────── */
.sx-sec { margin: 36px 0 0; }

.sx-sechead {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--sx-line);
}

.sx-sub { color: var(--sx-dim); font-size: 13px; }

.sx-about { font-size: 14px; line-height: 1.75; white-space: pre-wrap; color: var(--sx-text-soft); }

/* ── 评价 ─────────────────────────────────────────────────── */
.sx-rvsum { margin-bottom: 18px; }

.sx-drow {
    display: grid;
    grid-template-columns: 92px 1fr 92px;
    align-items: center;
    gap: 10px;
    padding: 3px 0;
    font-size: 12px;
    color: var(--sx-dim);
}

.sx-drow-store {
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--sx-line);
}

.sx-bar { height: 7px; border-radius: 999px; background: var(--sx-surface); overflow: hidden; }
.sx-bar i { display: block; height: 100%; background: var(--sx-accent); }
.sx-drow-store .sx-bar i { background: var(--sx-gold); }
.sx-n { text-align: right; }

.sx-rvlist { list-style: none; margin: 0; padding: 0; }

.sx-rvlist li {
    padding: 14px 0;
    border-bottom: 1px solid var(--sx-line);
}

.sx-rvhd { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; }

.sx-av {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--sx-av-bg);
    color: #fff;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
}

.sx-rvrate { color: var(--sx-gold); letter-spacing: .05em; }
.sharex .sx-rvlist h5 { margin: 8px 0 4px; font-size: 14px; font-weight: 600; }
.sx-rvlist p { margin: 0; font-size: 13px; line-height: 1.65; color: var(--sx-text-soft); }

/* ── 分享卡片:DOM 即最终样式,下载时前端 JS 光栅化 ────────── */
.sx-cardrow {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.sx-card { margin: 0; }

.sx-cardstage {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--sx-line);
    border-radius: 14px;
    background: var(--sx-bg);
}

.sx-card figcaption {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 8px;
    font-size: 12px;
}

/* X Full 条带卡独占整行:超宽长条塞进单列会缩成一条缝,整行才摆得开 */
.sharex .sx-card[data-sx-card="xfull"] { grid-column: 1 / -1; }

/* 「Share cards」锚点:跳转落点让出吸顶页头(64px);标题自锚与分享条跳转链接 */
.sharex .sx-cardsec { scroll-margin-top: 76px; }
.sx-anch { margin-left: 4px; font-size: 13px; font-weight: 400; color: var(--sx-dim); text-decoration: none; }
.sx-anch:hover { color: var(--sx-accent2); }
.sx-jump { margin-left: 12px; font-size: 12px; color: var(--sx-accent2); text-decoration: none; }
.sx-jump:hover { text-decoration: underline; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* ── 风格切换器:页面外观与卡片 PNG 共用主题变量 ── */
.sx-themes {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin: 10px 0 0;
    padding: 6px 10px;
    border: 1px solid var(--sx-line);
    border-radius: 999px;
    background: var(--sx-surface);
}

.sx-themes-label { font-size: 12px; color: var(--sx-dim); margin-right: 2px; }

.sx-theme-btn {
    padding: 4px 13px;
    border: 1px solid var(--sx-line2);
    border-radius: 999px;
    background: transparent;
    color: var(--sx-dim);
    font-size: 12px;
    cursor: pointer;
    transition: color .15s, border-color .15s, background .15s;
}

.sx-theme-btn:hover { color: var(--sx-text); border-color: var(--sx-accent); }
.sx-theme-btn.active { background: var(--sx-accent); border-color: var(--sx-accent); color: #fff; font-weight: 600; }

.sx-dl {
    margin-left: auto;
    border: 0;
    border-radius: 8px;
    background: var(--sx-accent);
    color: #fff;
    padding: 6px 14px;
    font-size: 12px;
    cursor: pointer;
}

.sx-dl:hover { filter: brightness(.92); }
.sx-dl[disabled] { opacity: .6; cursor: default; }

/* 卡片本体:固定原生像素尺寸,页面里按 stage 宽度 transform 等比缩放,
   下载时把该节点 1:1 光栅化 —— 所见即所得。字体走系统 CJK 栈,不额外下载字体。 */
.sx-cv {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 0 0;
    visibility: hidden; /* JS 算出缩放后再显示,避免未缩放的巨型卡片闪现 */
    overflow: hidden;
    color: var(--sx-card-text);
    background: linear-gradient(135deg, var(--sx-card-bg1) 0%, var(--sx-card-bg2) 100%);
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.2;
}

/* 铁律:卡片内所有图片只等比缩放(object-fit:contain),绝不裁剪 */
.sx-cv img { object-fit: contain; }

/* ── 卡片小件(颜色全部走主题变量,页面与导出 PNG 同源) ── */
.sxcv-icon { background: var(--sx-card-shotbg); }
.sxcv-name { font-weight: 700; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sxcv-cat { background: var(--sx-cat-bg); color: var(--sx-cat-text); border-radius: 999px; white-space: nowrap; flex: none; }
.sxcv-cat:empty { display: none; }
/* 子分类 pill(storefront 覆盖时由 JS 插入),比主分类降一档;放不下时省略号收敛,不侵占截图区 */
.sxcv-catsub { background: var(--sx-catsub-bg); color: var(--sx-catsub-text); flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sxcv-catsub i { font-style: normal; opacity: .65; margin-right: 8px; font-size: .82em; }
.sxcv-catrow { display: flex; gap: 12px; align-items: center; min-width: 0; }
.sxcv-rating { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.sxcv-star { color: var(--sx-gold); font-weight: 700; }
.sxcv-rcount { color: var(--sx-card-dim); }
.sxcv-pillrow { display: flex; align-items: center; gap: 16px; }
.sxcv-pill {
    display: inline-flex;
    align-items: center;
    height: calc(var(--pfs) + 26px);
    padding: 0 22px;
    border-radius: 999px;
    font-size: var(--pfs);
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}
.sxcv-pill.free { background: #16a34a; }
.sxcv-pill.limited { background: #e43f3f; }
.sxcv-pill.paid { background: var(--sx-pill-paid); }
.sxcv-oldprice { color: var(--sx-card-dim); text-decoration: line-through; font-size: calc(var(--pfs) - 6px); }
.sxcv-qrrow { display: flex; align-items: center; gap: 24px; }
.sxcv-qr { flex: none; background: #fff; border-radius: 20px; padding: 10px; box-sizing: border-box; }
.sxcv-qr svg { display: block; width: 100%; height: 100%; }
.sxcv-brand { display: flex; flex-direction: column; gap: 6px; font-weight: 700; }
.sxcv-brand span { font-weight: 400; color: var(--sx-card-dim); }
.sxcv-scancol { display: flex; flex-direction: column; gap: 10px; }
.sxcv-brandline { color: var(--sx-card-dim); }
.sxcv-shots { display: flex; gap: 24px; }
.sxcv-shot { flex: 1; border-radius: 24px; overflow: hidden; background: var(--sx-card-shotbg); }
.sxcv-shot img { width: 100%; height: 100%; display: block; }
/* 横屏截图:改用更少槽位避免小图,依然等比(JS 检测首图方向后加 .land) */
.sxcv-x .sxcv-shots.land .sxcv-shot:nth-child(n+3),
.sxcv-pin .sxcv-shots.land .sxcv-shot:nth-child(n+2),
.sxcv-xhs .sxcv-shots.land .sxcv-shot:nth-child(n+2) { display: none; }

/* ── X 横版 1600×900(xfull 与其共用左栏几何,画布宽度由 JS 按截图张数改写) ── */
.sxcv-x, .sxcv-xfull { width: 1600px; height: 900px; }
.sxcv-x .sxcv-icon, .sxcv-xfull .sxcv-icon { position: absolute; left: 64px; top: 72px; width: 168px; height: 168px; border-radius: 38px; }
.sxcv-x .sxcv-name, .sxcv-xfull .sxcv-name { position: absolute; left: 64px; top: 286px; width: 524px; font-size: 62px; line-height: 76px; }
.sxcv-x .sxcv-catrow, .sxcv-xfull .sxcv-catrow { position: absolute; left: 64px; top: 448px; max-width: 524px; }
.sxcv-x .sxcv-cat, .sxcv-xfull .sxcv-cat { height: 52px; line-height: 52px; padding: 0 24px; font-size: 30px; }
.sxcv-x .sxcv-rating, .sxcv-xfull .sxcv-rating { position: absolute; left: 64px; top: 556px; }
.sxcv-x .sxcv-star, .sxcv-xfull .sxcv-star { font-size: 44px; }
.sxcv-x .sxcv-rcount, .sxcv-xfull .sxcv-rcount { font-size: 30px; }
.sxcv-x .sxcv-pillrow, .sxcv-xfull .sxcv-pillrow { position: absolute; left: 64px; top: 632px; --pfs: 32px; }
.sxcv-x .sxcv-qrrow, .sxcv-xfull .sxcv-qrrow { position: absolute; left: 64px; top: 706px; }
.sxcv-x .sxcv-qr, .sxcv-xfull .sxcv-qr { width: 176px; height: 176px; }
.sxcv-x .sxcv-brand, .sxcv-xfull .sxcv-brand { font-size: 32px; }
.sxcv-x .sxcv-brand span, .sxcv-xfull .sxcv-brand span { font-size: 26px; }
.sxcv-x .sxcv-shots { position: absolute; left: 648px; top: 64px; width: 888px; height: 772px; }
/* xfull 条带:槽宽 = 772 × 该图真实比例,由 JS 内联写死;容器不设宽,收缩包住全部槽位。
   图片槽比例与图一致,contain 即满格 —— 零缝隙零裁剪。 */
.sxcv-xfull .sxcv-shots { position: absolute; left: 648px; top: 64px; height: 772px; }
.sxcv-xfull .sxcv-shot { flex: 0 0 auto; height: 100%; }

/* ── Pinterest 竖版 1000×1500 ── */
.sxcv-pin { width: 1000px; height: 1500px; }
.sxcv-pin .sxcv-icon { position: absolute; left: 56px; top: 56px; width: 120px; height: 120px; border-radius: 28px; }
.sxcv-pin .sxcv-headmain { position: absolute; left: 200px; top: 58px; right: 56px; }
.sxcv-pin .sxcv-name { font-size: 44px; line-height: 54px; }
.sxcv-pin .sxcv-catrow { margin-top: 12px; flex-wrap: wrap; }
.sxcv-pin .sxcv-cat { display: inline-block; padding: 5px 18px; font-size: 28px; }
.sxcv-pin .sxcv-shots { position: absolute; left: 56px; right: 56px; top: 232px; height: 724px; }
.sxcv-pin .sxcv-rating { position: absolute; left: 56px; top: 1022px; }
.sxcv-pin .sxcv-star { font-size: 40px; }
.sxcv-pin .sxcv-rcount { font-size: 28px; }
.sxcv-pin .sxcv-pillrow { position: absolute; left: 56px; top: 1078px; --pfs: 32px; }
.sxcv-pin .sxcv-qrrow { position: absolute; left: 56px; top: 1160px; }
.sxcv-pin .sxcv-qr { width: 184px; height: 184px; border-radius: 22px; }
.sxcv-pin .sxcv-scan { font-size: 34px; font-weight: 700; }
.sxcv-pin .sxcv-brandline { font-size: 28px; }
.sxcv-pin .sxcv-tagline { position: absolute; left: 56px; right: 56px; bottom: 44px; text-align: center; font-size: 26px; color: var(--sx-card-dim); }

/* ── 小红书竖版 1242×1660(文案固定中文) ── */
.sxcv-xhs { width: 1242px; height: 1660px; }
.sxcv-xhs .sxcv-icon { position: absolute; left: 60px; top: 60px; width: 132px; height: 132px; border-radius: 32px; }
.sxcv-xhs .sxcv-headmain { position: absolute; left: 222px; top: 62px; right: 60px; }
.sxcv-xhs .sxcv-name { font-size: 52px; line-height: 64px; }
.sxcv-xhs .sxcv-catrow { margin-top: 12px; flex-wrap: wrap; }
.sxcv-xhs .sxcv-cat { display: inline-block; padding: 5px 20px; font-size: 30px; }
.sxcv-xhs .sxcv-shots { position: absolute; left: 60px; right: 60px; top: 256px; height: 888px; }
.sxcv-xhs .sxcv-rating { position: absolute; left: 60px; top: 1216px; }
.sxcv-xhs .sxcv-star { font-size: 44px; }
.sxcv-xhs .sxcv-rcount { font-size: 30px; }
.sxcv-xhs .sxcv-pillrow { position: absolute; left: 60px; top: 1276px; --pfs: 34px; }
.sxcv-xhs .sxcv-qrrow { position: absolute; left: 60px; top: 1348px; }
.sxcv-xhs .sxcv-qr { width: 200px; height: 200px; }
.sxcv-xhs .sxcv-scan { font-size: 36px; font-weight: 700; }
.sxcv-xhs .sxcv-brandline { font-size: 30px; }
.sxcv-xhs .sxcv-tagline { position: absolute; left: 60px; right: 60px; bottom: 36px; text-align: center; font-size: 28px; color: var(--sx-card-dim); }

/* ── 相关应用 ─────────────────────────────────────────────── */
.sx-rel {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 12px;
}

.sx-rel a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--sx-line);
    border-radius: 12px;
    text-decoration: none;
    color: var(--sx-text);
}

.sx-rel a:hover { border-color: var(--sx-accent); }
.sx-rel img { border-radius: 12px; flex: none; background: var(--sx-surface); }
.sx-relmain { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; }
.sx-relmain b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-relmain .sx-dim { font-size: 12px; }

/* ── 灯箱 ─────────────────────────────────────────────────── */
.sx-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(2, 6, 23, .93);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.sx-lightbox[hidden] { display: none; }
.sx-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }

.sx-lbclose {
    position: absolute;
    top: 16px;
    right: 20px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 720px) {
    .sx-id { flex-wrap: wrap; }
    .sharex .sx-idmain h1 { font-size: 22px; }
    .sx-qr { display: none; }
    .sx-facts { gap: 12px 20px; }
    .sx-drow { grid-template-columns: 64px 1fr 64px; }
}
