/* 推广中心共用件（pc/js/promotion-kit.js、promotion-poster.js）：图表、二维码、推广海报与海报弹窗。
   内置推广中心与各推广主题模块共用，类名一律 ls-pk- 开头。 */

:root {
    --ls-pk-num: "DIN Alternate", "Bahnschrift", "SF Pro Display", -apple-system, "Segoe UI", sans-serif;
}

.ls-pk-av {
    display: inline-block;
    flex: none;
    border-radius: 50%;
    overflow: hidden;
    background: #e5e7eb;
    vertical-align: middle;
}

.ls-pk-av > img { display: block; width: 100%; height: 100%; object-fit: cover; }

.ls-pk-qr { display: block; }

.ls-pk-growth { display: inline-flex; align-items: center; gap: 1px; font-size: 12.5px; font-weight: 600; font-family: var(--ls-pk-num); white-space: nowrap; }
.ls-pk-growth.is-up { color: #16a34a; }
.ls-pk-growth.is-down { color: #dc2626; }
.ls-pk-growth.is-flat { color: var(--ls-text-muted); font-weight: 400; font-family: inherit; }

/* ---------- 图表 ---------- */
.ls-pk-chart { position: relative; }
.ls-pk-chart svg { display: block; overflow: visible; }
.ls-pk-chart text { font-family: var(--ls-pk-num); }

.ls-pk-tip {
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    z-index: 5;
    min-width: 128px;
    padding: 9px 11px;
    border-radius: 10px;
    background: rgba(17, 24, 39, .94);
    color: #fff;
    font-size: 12px;
    line-height: 1.5;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity .12s;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}

.ls-pk-tip.is-show { opacity: 1; }
.ls-pk-tip-t { margin-bottom: 4px; font-weight: 600; color: rgba(255, 255, 255, .72); }
.ls-pk-tip-r { display: flex; align-items: center; gap: 8px; }
.ls-pk-tip-r i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.ls-pk-tip-r span { flex: 1; color: rgba(255, 255, 255, .78); }
.ls-pk-tip-r b { font-family: var(--ls-pk-num); font-weight: 600; }
.ls-pk-tip[data-theme="light"] { background: #fff; color: #111827; border: 1px solid #eef0f3; box-shadow: 0 10px 28px rgba(17, 24, 39, .12); }
.ls-pk-tip[data-theme="light"] .ls-pk-tip-t, .ls-pk-tip[data-theme="light"] .ls-pk-tip-r span { color: #6b7280; }
.ls-pk-tip[data-theme="dark"] { background: #262932; border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 12px 30px rgba(0, 0, 0, .5); }

.ls-pk-empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    color: #9ca3af;
    text-align: center;
    pointer-events: none;
}

.ls-pk-empty i { font-size: 28px; color: #cbd5e1; }
.ls-pk-empty b { font-size: 14px; font-weight: 600; color: #6b7280; }

.ls-pk-donut { position: relative; flex: none; }
.ls-pk-donut svg { display: block; }

.ls-pk-donut-c {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
}

/* ---------- 推广海报：底稿 360 宽，竖版 640 高、3:4 480 高 ---------- */
.ls-pk-pp-fit { position: relative; flex: none; overflow: hidden; border-radius: 14px; }
.ls-pk-pp-scale { position: absolute; inset-inline-start: 0; top: 0; transform-origin: 0 0; }

.ls-pk-pp {
    position: relative;
    width: 360px;
    height: 640px;
    overflow: hidden;
    color: #0f172a;
    background: #fff;
    font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
    text-align: start;
}

.ls-pk-pp.ls-pk-pp-r34 { height: 480px; }
.ls-pk-pp h3, .ls-pk-pp p { margin: 0; }
.ls-pk-pp .ls-pk-av { box-shadow: 0 0 0 2px #fff; }

.ls-pk-pp-logo {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: var(--pp-primary);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
}

.ls-pk-pp-site { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.ls-pk-pp-qrbox { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ls-pk-pp-qr { display: block; border-radius: 8px; overflow: hidden; background: #fff; }
.ls-pk-pp-qrbox > span:last-child { font-size: 10px; color: #64748b; }
.ls-pk-pp-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ls-pk-pp-user > div { min-width: 0; }
.ls-pk-pp-user b { display: block; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ls-pk-pp-user span { display: block; margin-top: 3px; font-size: 11px; color: #64748b; white-space: nowrap; }
.ls-pk-pp-user em { font-style: normal; }

/* 晨光：上图下文 */
.ls-pk-pp-photo { position: absolute; inset-inline-start: 16px; inset-inline-end: 16px; top: 16px; height: 340px; border-radius: 16px; overflow: hidden; background: #e2e8f0; }
.ls-pk-pp-photo > img { display: block; width: 100%; height: 100%; object-fit: cover; }

.ls-pk-pp-photo .ls-pk-pp-site {
    position: absolute;
    inset-inline-start: 12px;
    top: 12px;
    padding-block: 5px;
    padding-inline: 5px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .9);
    font-size: 13px;
}

.ls-pk-pp-body { position: absolute; inset-inline-start: 28px; inset-inline-end: 28px; top: 378px; }
.ls-pk-pp-dawn .ls-pk-pp-kicker { font-size: 12px; font-weight: 600; color: var(--pp-primary); letter-spacing: 1px; line-height: 17px; }
.ls-pk-pp-dawn h3 { margin-top: 8px; font-size: 25px; line-height: 1.3; font-weight: 800; }
.ls-pk-pp-dawn p { margin-top: 8px; font-size: 13px; line-height: 1.7; color: #64748b; }

.ls-pk-pp-foot {
    position: absolute;
    inset-inline-start: 16px;
    inset-inline-end: 16px;
    bottom: 16px;
    height: 104px;
    padding-block: 0;
    padding-inline: 16px 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #edf1f6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ls-pk-pp-dawn.ls-pk-pp-r34 .ls-pk-pp-photo { height: 196px; }
.ls-pk-pp-dawn.ls-pk-pp-r34 .ls-pk-pp-body { top: 230px; }
.ls-pk-pp-dawn.ls-pk-pp-r34 h3 { margin-top: 6px; font-size: 22px; }
.ls-pk-pp-dawn.ls-pk-pp-r34 .ls-pk-pp-foot { height: 96px; }

/* 墨夜：深色渐变 + 内容剪影 + 玻璃卡 */
.ls-pk-pp-ink {
    color: #fff;
    background:
        radial-gradient(260px 220px at 92% 6%, rgba(var(--pp-primary-rgb), .55), transparent 70%),
        radial-gradient(240px 240px at 0% 78%, rgba(139, 92, 246, .32), transparent 70%),
        linear-gradient(165deg, #0b1020 0%, #121a2e 55%, #0a0f1d 100%);
}

.ls-pk-pp-ink > .ls-pk-pp-site { position: absolute; inset-inline-start: 26px; top: 26px; }
.ls-pk-pp-hero { position: absolute; inset-inline-start: 26px; inset-inline-end: 26px; top: 86px; }

.ls-pk-pp-ink .ls-pk-pp-kicker {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .16);
    font-size: 11.5px;
    line-height: 13px;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, .86);
}

.ls-pk-pp-ink h3 { margin-top: 16px; font-size: 30px; line-height: 1.25; font-weight: 800; }
.ls-pk-pp-ink h3 em { font-style: normal; background: linear-gradient(90deg, #fff, #c7d2fe 60%, #a5b4fc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ls-pk-pp-ink p { margin-top: 12px; font-size: 13px; line-height: 1.7; color: rgba(255, 255, 255, .66); }
.ls-pk-pp-strip { position: absolute; inset-inline-start: 26px; inset-inline-end: 26px; top: 296px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ls-pk-pp-strip > span { display: block; height: 112px; border-radius: 12px; overflow: hidden; background: rgba(255, 255, 255, .08); }
.ls-pk-pp-strip img { display: block; width: 100%; height: 100%; object-fit: cover; }

.ls-pk-pp-ink .ls-pk-pp-card {
    position: absolute;
    inset-inline-start: 16px;
    inset-inline-end: 16px;
    bottom: 16px;
    height: 112px;
    padding-block: 0;
    padding-inline: 16px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .14);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ls-pk-pp-ink .ls-pk-pp-user span, .ls-pk-pp-ink .ls-pk-pp-qrbox > span:last-child { color: rgba(255, 255, 255, .6); }
.ls-pk-pp-ink .ls-pk-pp-qr { box-shadow: 0 0 0 3px #fff; }
.ls-pk-pp-ink.ls-pk-pp-r34 .ls-pk-pp-hero { top: 74px; }
.ls-pk-pp-ink.ls-pk-pp-r34 h3 { margin-top: 12px; font-size: 27px; }
.ls-pk-pp-ink.ls-pk-pp-r34 .ls-pk-pp-strip { display: none; }
.ls-pk-pp-ink.ls-pk-pp-r34 .ls-pk-pp-card { height: 104px; }

/* 纸笺：满版照片 + 白色卡片 */
.ls-pk-pp-paper { background: #1f2937; }
.ls-pk-pp-full { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.ls-pk-pp-paper::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .28), rgba(0, 0, 0, 0) 26%, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, .3)); }
.ls-pk-pp-paper > .ls-pk-pp-site { position: absolute; inset-inline-start: 18px; top: 18px; z-index: 1; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }

.ls-pk-pp-paper .ls-pk-pp-card {
    position: absolute;
    inset-inline-start: 16px;
    inset-inline-end: 16px;
    bottom: 16px;
    z-index: 1;
    padding: 20px 18px 16px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
}

.ls-pk-pp-paper h3 { font-size: 22px; line-height: 1.3; font-weight: 800; }
.ls-pk-pp-paper p { margin-top: 6px; font-size: 12.5px; line-height: 1.7; color: #64748b; }
.ls-pk-pp-row { margin-top: 14px; padding-top: 14px; border-top: 1px dashed #e2e8f0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ls-pk-pp-paper.ls-pk-pp-r34 .ls-pk-pp-card { padding: 16px 16px 14px; }
.ls-pk-pp-paper.ls-pk-pp-r34 h3 { font-size: 20px; }
.ls-pk-pp-paper.ls-pk-pp-r34 .ls-pk-pp-row { margin-top: 10px; padding-top: 10px; }

/* ---------- 海报弹窗（挂在 LS.ui.modal 里） ---------- */
#ls-pk-poster-dialog .ls-modal-content { border-radius: 18px; overflow: hidden; }
#ls-pk-poster-dialog .ls-modal-body { padding: 0; }
.ls-pk-pd { position: relative; display: flex; }

.ls-pk-pd-x {
    position: absolute;
    inset-inline-end: 14px;
    top: 14px;
    z-index: 2;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.ls-pk-pd-x:hover { background: #e5e7eb; color: #111827; }

.ls-pk-pd-stage {
    flex: none;
    width: 380px;
    padding: 36px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 1px 1px, rgba(15, 23, 42, .08) 1px, transparent 0) 0 0 / 14px 14px, #f3f5f8;
}

.ls-pk-pd-poster .ls-pk-pp-fit { box-shadow: 0 18px 40px rgba(15, 23, 42, .18); }
.ls-pk-pd-side { flex: 1; min-width: 0; padding: 30px 26px 26px; display: flex; flex-direction: column; }
.ls-pk-pd-side h3 { margin: 0; font-size: 18px; font-weight: 700; color: #111827; }
.ls-pk-pd-side > p { margin: 8px 0 0; font-size: 13px; line-height: 1.7; color: #6b7280; text-wrap: pretty; }
.ls-pk-pd-label { margin: 20px 0 10px; font-size: 13px; font-weight: 600; color: #374151; }
.ls-pk-pd-tpls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }

.ls-pk-pd-tpl {
    padding: 8px 6px 9px;
    border-radius: 12px;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}

.ls-pk-pd-tpl:hover { border-color: #cbd5e1; }
.ls-pk-pd-tpl.is-on { border-color: var(--ls-primary); box-shadow: 0 0 0 3px rgba(var(--ls-primary-rgb), .14); }
.ls-pk-pd-thumb { display: block; }
.ls-pk-pd-thumb .ls-pk-pp-fit { border-radius: 6px; box-shadow: 0 0 0 1px rgba(15, 23, 42, .06); }
.ls-pk-pd-tpl b { font-size: 12.5px; font-weight: 600; color: #111827; }
.ls-pk-pd-seg { display: flex; padding: 3px; border-radius: 10px; background: #f3f4f6; }
.ls-pk-pd-seg button { flex: 1; height: 32px; border: 0; border-radius: 8px; background: transparent; font-size: 13px; color: #4b5563; cursor: pointer; }
.ls-pk-pd-seg button.is-on { background: #fff; color: #111827; font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.ls-pk-pd-acts { margin-top: auto; padding-top: 24px; display: flex; flex-direction: column; gap: 10px; }

.ls-pk-pd-acts button {
    height: 42px;
    border-radius: 11px;
    border: 1px solid #e5e7eb;
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
}

.ls-pk-pd-acts button i { font-size: 17px; }
.ls-pk-pd-acts button:hover { border-color: #cbd5e1; }
.ls-pk-pd-acts button.is-primary { background: var(--ls-primary); border-color: var(--ls-primary); color: #fff; }
.ls-pk-pd-acts button.is-primary:hover { filter: brightness(.94); }

/* ---- 移动端：海报弹窗纵向堆叠（桌面为 左海报 380px + 右面板，手机上右面板会被推出屏外） ---- */
@media (max-width: 640px) {
    .ls-pk-pd { flex-direction: column; }
    .ls-pk-pd-stage { width: 100%; padding: 18px 14px; overflow-x: auto; }
    .ls-pk-pd-side { padding: 4px 18px 20px; }
    .ls-pk-pd-x { inset-inline-end: 10px; top: 10px; }
}
