/* 推广工作台 — 选品 / 素材库 */
:root {
    --pw-brand: #00b38a;
    --pw-brand-dark: #009a77;
    --pw-brand-light: #e8f8f3;
    --pw-earn-bg: #fff7ed;
    --pw-earn-border: #fed7aa;
    --pw-earn-text: #ea580c;
    --pw-earn-amount: #ff7a00;
    --pw-earn-banner: linear-gradient(135deg, #ff9500 0%, #ff6b00 100%);
    --pw-text: #1a1a1a;
    --pw-text-secondary: #6b7280;
    --pw-border: #e8eaed;
    --pw-bg: #f0f2f5;
    --pw-card-bg: #fff;
    --pw-radius: 12px;
    --pw-radius-sm: 8px;
    --pw-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    --pw-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.pw-page {
    max-width: 1280px;
    margin: 0 auto;
    padding-bottom: 24px;
}

/* 页头 */
.pw-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.pw-header-main {
    flex: 1;
    min-width: 0;
}

.pw-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--pw-text);
    margin: 0 0 6px;
    line-height: 1.3;
}

.pw-subtitle {
    font-size: 0.875rem;
    color: var(--pw-text-secondary);
    margin: 0;
    line-height: 1.5;
}

.pw-header-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    align-items: center;
    flex-wrap: wrap;
}

.pw-gen-summary {
    font-size: 0.75rem;
    color: var(--pw-text-secondary);
    max-width: 320px;
    line-height: 1.35;
}

.pw-gen-mode-hint {
    font-size: 0.75rem;
    color: var(--pw-text-secondary);
}

.pw-gen-mode-hint.is-ok { color: var(--pw-brand-dark, #0a8f6e); }
.pw-gen-mode-hint.is-err { color: #c62828; }

body.pw-modal-open { overflow: hidden; }

.pw-modal[hidden] { display: none !important; }

.pw-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pw-modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(20, 28, 40, 0.45);
}

.pw-modal-panel {
    position: relative;
    z-index: 1;
    width: min(760px, 100%);
    max-height: min(88vh, 900px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(15, 40, 80, 0.18);
    overflow: hidden;
}

.pw-modal-body {
    padding: 16px 20px 8px;
    overflow: auto;
    /* 给悬停预览留出上下空间，减少被裁切 */
    padding-top: 28px;
}

.pw-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--pw-border);
}

.pw-modal-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.pw-modal-close {
    border: none;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    color: #888;
    cursor: pointer;
    padding: 0 4px;
}

.pw-modal-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 20px 16px;
    border-top: 1px solid var(--pw-border);
}

.pw-modal-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.pw-config-section {
    margin-bottom: 20px;
}

.pw-config-h {
    margin: 0 0 4px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--pw-text);
}

.pw-config-desc {
    margin: 0 0 12px;
    font-size: 0.8rem;
    color: var(--pw-text-secondary);
}

.pw-config-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

@media (min-width: 640px) {
    .pw-config-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.pw-config-card {
    position: relative;
    display: block;
    padding: 12px 12px 12px 14px;
    border: 1px solid var(--pw-border);
    border-radius: 12px;
    background: #fafbfc;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.pw-config-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pw-config-card:hover {
    border-color: var(--pw-brand);
    background: var(--pw-brand-light);
}

.pw-config-card.is-on {
    border-color: var(--pw-brand);
    background: var(--pw-brand-light);
    box-shadow: 0 0 0 2px rgba(0, 179, 138, 0.15);
}

.pw-config-card-name {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--pw-text);
    margin-bottom: 4px;
}

.pw-config-card-desc {
    display: block;
    font-size: 0.75rem;
    color: var(--pw-text-secondary);
    line-height: 1.4;
}

/* 封面/图片模式：示意缩略图 + 悬停放大 */
.pw-config-card--media {
    padding-top: 10px;
    overflow: visible;
    z-index: 1;
}

.pw-config-card--media:hover,
.pw-config-card--media:focus-within {
    z-index: 5;
}

.pw-preview {
    position: relative;
    display: block;
    width: 100%;
    height: 72px;
    margin-bottom: 10px;
    border-radius: 10px;
    background: #eef1f5;
    border: 1px solid #e2e6ec;
    overflow: hidden;
    box-sizing: border-box;
}

.pw-preview--lg {
    height: 180px;
    margin-bottom: 0;
    border-radius: 12px;
}

.pw-preview i {
    display: block;
    position: absolute;
    box-sizing: border-box;
    font-style: normal;
}

.pw-pv-mark {
    inset: 0;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: #7a8699;
    background: repeating-linear-gradient(
        -45deg, #eef1f5, #eef1f5 8px, #e6ebf2 8px, #e6ebf2 16px
    );
}

.pw-preview--lg .pw-pv-mark { font-size: 18px; }

/* cover 1: 标题 + 多图 + 列表 */
.pw-preview--cover-1 { background: #f4f6f8; }
.pw-preview--cover-1 .pw-pv-title {
    left: 18%; right: 18%; top: 8%; height: 10%;
    background: #2c3340; border-radius: 3px;
}
.pw-preview--cover-1 .pw-pv-grid {
    left: 10%; right: 10%; top: 26%; height: 42%;
    display: grid !important;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 4px;
    position: absolute;
}
.pw-preview--cover-1 .pw-pv-grid b {
    display: block; height: 100%; border-radius: 3px;
    background: linear-gradient(145deg, #9ec9ff, #6aa8f0);
}
.pw-preview--cover-1 .pw-pv-grid b:nth-child(2) { background: linear-gradient(145deg, #b8e0c2, #7bc48f); }
.pw-preview--cover-1 .pw-pv-grid b:nth-child(3) { background: linear-gradient(145deg, #f7c9a0, #ef9f6a); }
.pw-preview--cover-1 .pw-pv-list {
    left: 14%; right: 14%; bottom: 8%; height: 16%;
    background:
        linear-gradient(#c5ccd6, #c5ccd6) 0 20%/100% 18% no-repeat,
        linear-gradient(#c5ccd6, #c5ccd6) 0 50%/80% 18% no-repeat,
        linear-gradient(#c5ccd6, #c5ccd6) 0 80%/90% 18% no-repeat;
}

/* cover 2: 纯色大字 */
.pw-preview--cover-2 { background: #ffd54f; }
.pw-preview--cover-2 .pw-pv-solid {
    inset: 0;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8%;
    position: absolute;
}
.pw-preview--cover-2 .pw-pv-solid b {
    display: block; width: 55%; height: 10%;
    background: #1f1f1f; border-radius: 3px;
}
.pw-preview--cover-2 .pw-pv-solid b:last-child { width: 40%; }

/* cover 3: 单图叠字 */
.pw-preview--cover-3 .pw-pv-photo {
    inset: 0;
    background:
        radial-gradient(circle at 30% 35%, #8fbf88 0 18%, transparent 19%),
        linear-gradient(160deg, #6b9e6a 0%, #3f6f4f 55%, #2b4a35 100%);
}
.pw-preview--cover-3 .pw-pv-overlay {
    left: 12%; right: 12%; top: 28%;
    display: flex !important;
    flex-direction: column;
    gap: 8px;
    position: absolute;
}
.pw-preview--cover-3 .pw-pv-overlay b {
    display: block; height: 10px; border-radius: 2px;
    background: #fff; box-shadow: 0 0 0 2px #222;
}
.pw-preview--cover-3 .pw-pv-overlay b:last-child { width: 70%; height: 9px; }

/* cover 4: 左图右卡 */
.pw-preview--cover-4 { background: #1e3a5f; }
.pw-preview--cover-4 .pw-pv-split {
    left: 8%; right: 8%; top: 18%; bottom: 10%;
    display: grid !important;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 6px;
    position: absolute;
}
.pw-preview--cover-4 .pw-pv-split b {
    display: block; height: 100%; border-radius: 6px; background: #fff;
}
.pw-preview--cover-4 .pw-pv-split b.l {
    background: linear-gradient(160deg, #7eb6ff, #3d7dd6);
}
.pw-preview--cover-4 .pw-pv-split b.r {
    background:
        linear-gradient(#e8eef8, #e8eef8) 12% 18%/35% 22% no-repeat,
        linear-gradient(#e8eef8, #e8eef8) 55% 18%/35% 22% no-repeat,
        linear-gradient(#e8eef8, #e8eef8) 12% 55%/35% 22% no-repeat,
        linear-gradient(#e8eef8, #e8eef8) 55% 55%/35% 22% no-repeat,
        #fff;
}

/* cover 5/6: 上下课件 + 中间标题 */
.pw-preview--cover-5,
.pw-preview--cover-6 { background: #f3ebe0; }
.pw-pv-jx {
    inset: 6%;
    display: grid !important;
    grid-template-rows: 1.15fr 0.7fr 1.15fr;
    gap: 4px;
    position: absolute;
}
.pw-pv-jx b {
    display: block; border-radius: 4px; border: 1px dashed #555;
    background: #fff;
}
.pw-pv-jx b.t,
.pw-pv-jx b.b {
    background:
        linear-gradient(135deg, #cfe3f8 25%, transparent 26%),
        linear-gradient(160deg, #9fc4ea, #6ea0d4);
    border-style: solid;
    border-color: #333;
}
.pw-pv-jx b.m {
    background:
        linear-gradient(#e57373, #e57373) 18% 30%/14% 40% no-repeat,
        linear-gradient(#e57373, #e57373) 36% 30%/14% 40% no-repeat,
        linear-gradient(#e57373, #e57373) 54% 30%/14% 40% no-repeat,
        linear-gradient(#e57373, #e57373) 72% 30%/14% 40% no-repeat,
        #fff;
    border-color: #ddd;
    border-style: solid;
}
.pw-pv-jx--badge b.m {
    background: transparent;
    border: none;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.pw-pv-jx--badge b.m em {
    width: 78%;
    height: 28%;
    border-radius: 5px;
    background: #c4a478;
    box-shadow: 0 14px 0 0 #c4a478;
}

/* cover 7 / 7_stack: 教材封面叠字（单本 / 错落叠加） */
.pw-preview--cover-7,
.pw-preview--cover-7_stack { background: #f7f4ef; }
.pw-pv-textbook {
    inset: 8%;
    position: absolute;
    border: 1.5px dashed #333;
    border-radius: 6px;
    background:
        linear-gradient(180deg, #f2d6b5 0 42%, #9ec9ef 42% 100%);
    overflow: hidden;
}
.pw-pv-textbook b {
    display: block;
    position: absolute;
    box-sizing: border-box;
}
.pw-pv-textbook b.book {
    inset: 0;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    transform: none;
}
.pw-pv-textbook b.book2 {
    inset: 10% 8% 18% 22%;
    left: auto;
    transform: rotate(-10deg);
    background: linear-gradient(180deg, #e8c9a0 0 40%, #8eb8e0 40% 100%);
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 3px;
    z-index: 1;
    box-shadow: 2px 2px 0 rgba(0,0,0,.08);
}
.pw-pv-textbook b.txt {
    left: 14%;
    right: 14%;
    top: 34%;
    width: auto;
    height: 32%;
    transform: none;
    background:
        linear-gradient(#e53935, #e53935) 0 10%/100% 18% no-repeat,
        linear-gradient(#e53935, #e53935) 0 42%/100% 18% no-repeat,
        linear-gradient(#e53935, #e53935) 0 74%/100% 18% no-repeat;
    filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 2px #fff);
    z-index: 2;
}

/* 7_stack：上下错落教材封面 + 中间米色横幅田字格 */
.pw-preview--cover-7_stack { background: #f5f0e8; }
.pw-pv-tstack {
    inset: 0;
    position: absolute;
    overflow: hidden;
    background: #f5f0e8;
}
.pw-pv-tstack b.bk {
    position: absolute;
    display: block;
    border-radius: 3px;
    border: 1px solid rgba(0,0,0,.12);
    background: linear-gradient(180deg, #f2d6b5 0 38%, #9ec9ef 38% 100%);
    box-shadow: 1px 2px 0 rgba(0,0,0,.08);
}
.pw-pv-tstack b.a { left: 8%; top: 6%; width: 34%; height: 28%; transform: rotate(-12deg); }
.pw-pv-tstack b.b { left: 36%; top: 2%; width: 30%; height: 26%; transform: rotate(7deg); z-index: 1; }
.pw-pv-tstack b.c { right: 6%; top: 8%; width: 28%; height: 24%; transform: rotate(11deg); }
.pw-pv-tstack b.d { left: 10%; bottom: 6%; width: 36%; height: 26%; transform: rotate(8deg); }
.pw-pv-tstack b.e { right: 8%; bottom: 4%; width: 34%; height: 28%; transform: rotate(-8deg); }
.pw-pv-tstack b.band {
    position: absolute;
    left: 0; right: 0;
    top: 38%; height: 24%;
    z-index: 3;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: #f8f4ec;
    border-top: 1px solid #d2c8b9;
    border-bottom: 1px solid #d2c8b9;
    transform: none;
}
.pw-pv-tstack b.band em {
    width: 14%;
    height: 62%;
    border: 1.5px solid #dc7878;
    background:
        linear-gradient(#f3c8c8, #f3c8c8) 0 50%/100% 1px no-repeat,
        linear-gradient(#f3c8c8, #f3c8c8) 50% 0/1px 100% no-repeat,
        #fff;
    box-shadow: inset 0 0 0 1px rgba(200, 30, 30, .15);
}

/* cover 8: 上下双列黄文件夹 + 中间灰条田字格 */
.pw-preview--cover-8 { background: #f3f3f3; }
.pw-pv-dir2 {
    inset: 0;
    position: absolute;
    display: flex !important;
    flex-direction: column;
    background: #f7f7f7;
    overflow: hidden;
}
.pw-pv-dir2 b.rows {
    flex: 1;
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 1fr;
    gap: 3px 8px;
    padding: 6px 8px;
    align-content: center;
}
.pw-pv-dir2 b.rows s {
    display: block;
    height: 7px;
    border-radius: 1px;
    background:
        linear-gradient(#ffd64a, #ffd64a) 0 0/7px 7px no-repeat,
        linear-gradient(#cfcfcf, #cfcfcf) 11px 2px/calc(100% - 11px) 3px no-repeat;
}
.pw-pv-dir2 b.band {
    flex: 0 0 28%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: #d9d9d9;
}
.pw-pv-dir2 b.band em {
    width: 12%;
    height: 58%;
    border: 1.5px solid #d07070;
    background:
        linear-gradient(#e7bdbd, #e7bdbd) 0 50%/100% 1px no-repeat,
        linear-gradient(#e7bdbd, #e7bdbd) 50% 0/1px 100% no-repeat,
        #fff;
}

/* image: 2-col staggered collage — 左栏顶齐，右栏整体下移 */
.pw-preview--image-jiangxiao_grid { background: #e7ebf0; }
.pw-pv-stagger {
    inset: 6% 7%;
    position: absolute;
    display: flex !important;
    gap: 5px;
}
.pw-pv-stagger .col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.pw-pv-stagger .col.r { margin-top: 12px; }
.pw-pv-stagger b {
    display: block;
    border-radius: 3px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(20, 30, 50, .16);
    min-height: 0;
}
.pw-pv-stagger .l b:nth-child(1) { flex: 1.25; background: linear-gradient(#d7eafc, #fff 70%); }
.pw-pv-stagger .l b:nth-child(2) { flex: 0.85; background: linear-gradient(#fff3e0, #fff 70%); }
.pw-pv-stagger .l b:nth-child(3) { flex: 1.05; background: linear-gradient(#e3f2fd, #fff 70%); }
.pw-pv-stagger .l b:nth-child(4) { flex: 0.75; background: linear-gradient(#efebe9, #fff 70%); }
.pw-pv-stagger .r b:nth-child(1) { flex: 0.9; background: linear-gradient(#e8f5e9, #fff 70%); }
.pw-pv-stagger .r b:nth-child(2) { flex: 1.2; background: linear-gradient(#f3e5f5, #fff 70%); }
.pw-pv-stagger .r b:nth-child(3) { flex: 0.8; background: linear-gradient(#fce4ec, #fff 70%); }
.pw-pv-stagger .r b:nth-child(4) { flex: 1; background: linear-gradient(#e8eaf6, #fff 70%); }

.pw-copy-sample {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e6ebf2;
    color: #344054;
    font-size: 12px;
    line-height: 1.55;
    white-space: pre-line;
}

/* image: original stack */
.pw-preview--image-original { background: #edf0f4; }
.pw-pv-stack {
    inset: 10% 18%;
    position: absolute !important;
}
.pw-pv-stack b {
    position: absolute; inset: 0;
    border-radius: 5px; border: 1px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.pw-pv-stack b:nth-child(1) {
    transform: translate(-6px, 6px) rotate(-4deg);
    background: linear-gradient(145deg, #a5d6a7, #66bb6a);
}
.pw-pv-stack b:nth-child(2) {
    transform: translate(4px, -2px) rotate(3deg);
    background: linear-gradient(145deg, #90caf9, #42a5f5);
}
.pw-pv-stack b:nth-child(3) {
    background: linear-gradient(145deg, #ffcc80, #ffa726);
}

/* image: 1-col stack collage */
.pw-preview--image-jiangxiao_stack { background: #e9ecef; }
.pw-pv-rows {
    inset: 8% 18%;
    display: grid !important;
    grid-template-rows: 1.2fr 0.9fr 1.1fr;
    gap: 4px;
    position: absolute;
}
.pw-pv-rows b {
    display: block; border-radius: 4px; background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
.pw-pv-rows b:nth-child(1) { background: linear-gradient(#d7eafc, #fff 60%); }
.pw-pv-rows b:nth-child(2) { background: linear-gradient(#e8f5e9, #fff 60%); }
.pw-pv-rows b:nth-child(3) { background: linear-gradient(#fff3e0, #fff 60%); }

.pw-preview--image-random .pw-pv-mark,
.pw-preview--cover-random .pw-pv-mark { font-size: 20px; }

.pw-preview-pop {
    display: none;
}

.pw-preview-float {
    position: fixed;
    z-index: 1300;
    width: 240px;
    padding: 10px;
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e5e9ef;
    box-shadow: 0 14px 36px rgba(20, 40, 70, 0.2);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.12s ease;
}

.pw-preview-float.is-on {
    opacity: 1;
    visibility: visible;
}

.pw-preview-float .pw-preview {
    margin-bottom: 0;
}

.pw-preview-float .pw-preview-cap {
    margin-top: 8px;
}

.pw-preview-cap {
    display: block;
    font-size: 0.72rem;
    color: #667085;
    line-height: 1.4;
}

.pw-config-card--media:hover > .pw-preview:not(.pw-preview--lg),
.pw-config-card--media:focus-within > .pw-preview:not(.pw-preview--lg) {
    box-shadow: 0 0 0 2px rgba(0, 179, 138, 0.35);
}

/* 保留旧选择器无害，实际用 float */
.pw-config-grid .pw-config-card--media:nth-last-child(-n+3) .pw-preview-pop {
    bottom: auto;
    top: calc(100% + 10px);
}

/* 按钮 */
.pw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
    border-radius: var(--pw-radius-sm);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s, transform 0.1s;
    white-space: nowrap;
}

.pw-btn:active {
    transform: scale(0.98);
}

.pw-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.pw-btn-primary {
    background: var(--pw-brand);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 179, 138, 0.25);
}

.pw-btn-primary:hover {
    background: var(--pw-brand-dark);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 179, 138, 0.3);
}

.pw-btn-ghost {
    background: var(--pw-card-bg);
    color: var(--pw-text);
    border: 1px solid var(--pw-border);
    box-shadow: var(--pw-shadow);
}

.pw-btn-ghost:hover {
    background: var(--pw-brand-light);
    border-color: var(--pw-brand);
    color: var(--pw-brand-dark);
    text-decoration: none;
}

.pw-btn-sm {
    padding: 6px 12px;
    font-size: 0.8125rem;
}

.pw-btn-block {
    width: 100%;
}

.pw-btn-link {
    background: transparent;
    color: var(--pw-text-secondary);
    padding: 6px 10px;
}

.pw-btn-link:hover {
    color: var(--pw-brand);
    text-decoration: none;
}

/* 筛选区 */
.pw-filter {
    background: var(--pw-card-bg);
    border: 1px solid var(--pw-border);
    border-radius: var(--pw-radius);
    padding: 18px 20px;
    margin-bottom: 24px;
    box-shadow: var(--pw-shadow);
}

.pw-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px 16px;
    align-items: end;
}

@media (max-width: 991.98px) {
    .pw-filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575.98px) {
    .pw-filter-grid {
        grid-template-columns: 1fr;
    }
}

.pw-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--pw-text-secondary);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.pw-select {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    font-size: 0.875rem;
    color: var(--pw-text);
    background: #fafbfc;
    border: 1px solid var(--pw-border);
    border-radius: var(--pw-radius-sm);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.pw-select:focus {
    outline: none;
    border-color: var(--pw-brand);
    box-shadow: 0 0 0 3px rgba(0, 179, 138, 0.12);
    background-color: #fff;
}

.pw-field-search {
    margin-bottom: 14px;
}

.pw-input {
    width: 100%;
    height: 40px;
    padding: 0 14px;
    font-size: 0.875rem;
    color: var(--pw-text);
    background: #fafbfc;
    border: 1px solid var(--pw-border);
    border-radius: var(--pw-radius-sm);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.pw-input::placeholder {
    color: #9ca3af;
}

.pw-input:focus {
    outline: none;
    border-color: var(--pw-brand);
    box-shadow: 0 0 0 3px rgba(0, 179, 138, 0.12);
    background-color: #fff;
}

.pw-filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pw-filter-actions .pw-btn-primary {
    flex: 1;
}

.pw-tags {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--pw-border);
}

.pw-tags-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--pw-text-secondary);
    margin-bottom: 10px;
    display: block;
}

.pw-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pw-tag-chip {
    position: relative;
    cursor: pointer;
}

.pw-tag-chip input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.pw-tag-chip span {
    display: inline-block;
    padding: 6px 14px;
    font-size: 0.8125rem;
    color: var(--pw-text-secondary);
    background: #f3f4f6;
    border: 1px solid transparent;
    border-radius: 20px;
    transition: all 0.15s;
}

.pw-tag-chip input:checked + span {
    background: var(--pw-brand-light);
    color: var(--pw-brand-dark);
    border-color: rgba(0, 179, 138, 0.35);
    font-weight: 500;
}

.pw-tag-chip:hover span {
    border-color: var(--pw-border);
}

/* 选品网格（无限下拉） */
.pw-picks-wrap {
    width: 100%;
}

.pw-picks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 16px;
}

@media (min-width: 1200px) {
    .pw-picks-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 200px));
    }
}

.pw-pick-card {
    background: var(--pw-card-bg);
    border: 1px solid var(--pw-border);
    border-radius: var(--pw-radius);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
}

.pw-pick-card:hover {
    box-shadow: var(--pw-shadow-hover);
    transform: translateY(-2px);
}

.pw-pick-cover-wrap {
    position: relative;
    padding: 12px 12px 0;
    background: linear-gradient(180deg, #f8f9fa 0%, #fff 100%);
}

.pw-pick-cover {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: var(--pw-radius-sm);
    display: block;
    background: #eef0f2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.pw-pick-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--pw-text-secondary);
}

.pw-pick-body {
    padding: 12px 14px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pw-pick-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--pw-text);
    line-height: 1.45;
    margin: 0 0 6px;
    word-break: break-word;
    /* 完整展示标题，不再截断 */
    display: block;
    overflow: visible;
}

.pw-pick-info-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.pw-info-tag {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
    background: #eef2ff;
    color: #4338ca;
    line-height: 1.45;
}

.pw-pick-meta {
    font-size: 0.75rem;
    color: var(--pw-text-secondary);
    margin: 0 0 8px;
    line-height: 1.4;
}

.pw-pick-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.pw-badge {
    font-size: 0.6875rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
    line-height: 1.5;
}

.pw-badge-soft {
    background: var(--pw-brand-light);
    color: var(--pw-brand-dark);
}

.pw-pick-estimate {
    font-size: 0.8125rem;
    font-weight: 600;
    margin: 0 0 10px;
    line-height: 1.35;
    color: var(--pw-earn-text);
}

.pw-pick-footer {
    margin-top: auto;
    padding-top: 4px;
}

/* 列表卡片：与详情页一致的橙色收益块 */
.pw-pick-earn-box {
    display: block;
    background: #fff8f3;
    border: 1px solid #ffdcc2;
    border-radius: 8px;
    padding: 8px 10px;
    margin: 0 0 10px;
    line-height: 1.3;
    min-height: 52px;
    box-sizing: border-box;
}

.pw-pick-card .pw-earn-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #ea580c;
    margin-bottom: 2px;
}

.pw-pick-card .pw-earn-amount {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    color: #ff6b00;
    letter-spacing: -0.02em;
}

.pw-pick-estimate-slot {
    margin: 0 0 10px;
    padding: 0;
    min-height: 52px;
}

.pw-pick-estimate-loading {
    font-size: 0.75rem;
    color: var(--pw-text-secondary);
    margin: 0 0 10px;
    line-height: 1.4;
    min-height: 52px;
    display: flex;
    align-items: center;
}

.pw-earn-highlight {
    display: block;
    padding: 6px 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.pw-earn-highlight .pw-earn-label {
    color: var(--pw-earn-text);
    font-weight: 600;
}

.pw-earn-highlight .pw-earn-amount {
    color: var(--pw-earn-amount);
    font-weight: 800;
    font-size: 0.9375rem;
    letter-spacing: -0.02em;
}

.pw-earn-card {
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
    margin-bottom: 16px;
}

.pw-earn-banner {
    padding: 14px 16px;
    border-radius: var(--pw-radius);
    background: var(--pw-earn-banner);
    color: #fff;
    box-shadow: 0 4px 14px rgba(255, 122, 0, 0.28);
}

.pw-earn-banner-label {
    font-size: 0.8125rem;
    font-weight: 600;
    opacity: 0.95;
    margin: 0 0 4px;
}

.pw-earn-banner-amount {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0;
    line-height: 1.2;
}

.pw-earn-banner-sub {
    font-size: 0.75rem;
    opacity: 0.88;
    margin: 8px 0 0;
    line-height: 1.45;
}

.pw-earn-card-main {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--pw-earn-text);
    line-height: 1.4;
    margin: 0;
}

.pw-earn-card-main .pw-earn-amount {
    color: var(--pw-earn-amount);
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.pw-earn-card-sub {
    font-size: 0.75rem;
    color: var(--pw-text-secondary);
    margin: 8px 0 0;
    line-height: 1.45;
}

.pw-pick-estimate .pw-muted {
    color: var(--pw-text-secondary);
    font-weight: 400;
}

.pw-pick-body .pw-btn {
    margin-top: auto;
}

/* 素材库列表 */
.pw-material-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.pw-material-card {
    background: var(--pw-card-bg);
    border: 1px solid var(--pw-border);
    border-radius: var(--pw-radius);
    overflow: hidden;
    transition: box-shadow 0.2s;
    display: flex;
    flex-direction: row;
    min-height: 120px;
}

.pw-material-card:hover {
    box-shadow: var(--pw-shadow-hover);
}

.pw-material-thumb {
    width: 100px;
    flex-shrink: 0;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pw-material-thumb img {
    width: 100%;
    height: 100%;
    min-height: 120px;
    object-fit: cover;
}

.pw-material-thumb-empty {
    font-size: 0.7rem;
    color: var(--pw-text-secondary);
    padding: 8px;
    text-align: center;
}

.pw-material-body {
    flex: 1;
    padding: 14px 16px;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.pw-material-book {
    font-size: 0.75rem;
    color: var(--pw-text-secondary);
    margin: 0 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pw-material-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--pw-text);
    margin: 0 0 8px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pw-material-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-bottom: 10px;
}

.pw-material-estimate {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--pw-earn-amount);
}

.pw-material-time {
    font-size: 0.75rem;
    color: var(--pw-text-secondary);
}

.pw-status {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    line-height: 1.4;
}

.pw-status-pending {
    background: #fef3c7;
    color: #b45309;
}

.pw-status-done {
    background: var(--pw-brand-light);
    color: var(--pw-brand-dark);
}

.pw-status-fail {
    background: #fee2e2;
    color: #b91c1c;
}

.pw-material-footer {
    margin-top: auto;
}

/* 空状态 */
.pw-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 24px;
    background: var(--pw-card-bg);
    border: 1px dashed var(--pw-border);
    border-radius: var(--pw-radius);
}

.pw-empty-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    color: #d1d5db;
}

.pw-empty-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--pw-text);
    margin: 0 0 8px;
}

.pw-empty-desc {
    font-size: 0.875rem;
    color: var(--pw-text-secondary);
    margin: 0 0 20px;
}

/* 分页 */
.pw-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
}

.pw-pagination-info {
    font-size: 0.875rem;
    color: var(--pw-text-secondary);
}

.pw-count-badge {
    font-size: 0.8125rem;
    color: var(--pw-text-secondary);
    background: #f3f4f6;
    padding: 4px 12px;
    border-radius: 20px;
}

.pw-picks-load-more {
    text-align: center;
    padding: 12px 0 24px;
}

.pw-picks-load-more .pw-btn[disabled] {
    opacity: 0.65;
    cursor: wait;
}

.pw-picks-sentinel {
    height: 1px;
    width: 100%;
}

.pw-picks-status {
    text-align: center;
    padding: 8px 0 20px;
    font-size: 0.8125rem;
    color: var(--pw-text-secondary);
}

.pw-picks-status[hidden] {
    display: none;
}

.pw-picks-status.is-loading::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 8px;
    border: 2px solid #d1d5db;
    border-top-color: var(--pw-brand, #f97316);
    border-radius: 50%;
    vertical-align: -2px;
    animation: pw-spin 0.7s linear infinite;
}

@keyframes pw-spin {
    to { transform: rotate(360deg); }
}

/* 详情页 */
.pw-detail-layout {
    display: grid;
    grid-template-columns: minmax(220px, 280px) 1fr;
    gap: 20px;
    align-items: start;
}

@media (max-width: 767.98px) {
    .pw-detail-layout {
        grid-template-columns: 1fr;
    }
}

.pw-detail-sidebar {
    background: var(--pw-card-bg);
    border: 1px solid var(--pw-border);
    border-radius: var(--pw-radius);
    padding: 16px;
    box-shadow: var(--pw-shadow);
}

.pw-detail-cover {
    width: 100%;
    max-width: 220px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: var(--pw-radius-sm);
    display: block;
    margin: 0 auto 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.pw-detail-meta {
    font-size: 0.8125rem;
    color: var(--pw-text-secondary);
    text-align: center;
    margin: 0 0 14px;
    line-height: 1.45;
}

.pw-detail-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pw-panel {
    background: var(--pw-card-bg);
    border: 1px solid var(--pw-border);
    border-radius: var(--pw-radius);
    box-shadow: var(--pw-shadow);
    margin-bottom: 16px;
    overflow: hidden;
}

.pw-panel-head {
    padding: 12px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--pw-text);
    border-bottom: 1px solid var(--pw-border);
    background: #fafbfc;
}

.pw-panel-body {
    padding: 16px;
    font-size: 0.875rem;
    color: var(--pw-text);
    line-height: 1.55;
}

.pw-field-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--pw-text-secondary);
    margin-bottom: 8px;
    text-transform: none;
    letter-spacing: 0.02em;
}

.pw-pre {
    white-space: pre-wrap;
    word-break: break-word;
    background: #f8f9fb;
    border: 1px solid var(--pw-border);
    padding: 14px 16px;
    border-radius: var(--pw-radius-sm);
    font-size: 0.875rem;
    line-height: 1.65;
    color: var(--pw-text);
    margin: 0;
}

.pw-code {
    display: block;
    padding: 10px 12px;
    background: #f3f4f6;
    border: 1px solid var(--pw-border);
    border-radius: var(--pw-radius-sm);
    font-size: 0.8125rem;
    word-break: break-all;
    color: #374151;
}

.pw-detail-images img {
    width: 100%;
    border-radius: var(--pw-radius-sm);
    margin-bottom: 10px;
    border: 1px solid var(--pw-border);
}

.pw-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pw-topic-tag {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--pw-brand-light);
    color: var(--pw-brand-dark);
}

.pw-back-bar {
    margin-top: 20px;
}

.pw-alert {
    padding: 14px 16px;
    border-radius: var(--pw-radius-sm);
    font-size: 0.875rem;
    margin-bottom: 16px;
}

.pw-alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
}

.pw-alert-fail {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

/* ========== 选品详情页（宽度与列表页 pw-page 一致） ========== */
.pd-topbar {
    margin-bottom: 16px;
}

.pd-nav {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    padding: 11px 18px;
    background: var(--pw-card-bg);
    border: 1px solid var(--pw-border);
    border-radius: var(--pw-radius);
    box-shadow: var(--pw-shadow);
    font-size: 0.875rem;
    line-height: 1.4;
}

.pd-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--pw-brand-dark);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s;
}

.pd-nav-link svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.pd-nav-link:hover {
    color: var(--pw-brand);
    text-decoration: none;
}

.pd-nav-sep {
    margin: 0 12px;
    color: #cbd5e1;
    font-size: 0.875rem;
    line-height: 1;
    user-select: none;
}

.pd-nav-current {
    color: var(--pw-text-secondary);
    font-weight: 500;
}

.pd-sheet {
    background: var(--pw-card-bg);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.pd-main {
    display: flex;
    gap: 0;
}

@media (max-width: 767.98px) {
    .pd-main {
        flex-direction: column;
    }
}

.pd-cover-col {
    flex: 0 0 320px;
    background: linear-gradient(160deg, #f0faf7 0%, #f8f9fa 55%, #fff 100%);
    padding: 36px 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 767.98px) {
    .pd-cover-col {
        flex: none;
        padding: 24px 20px 16px;
    }
}

.pd-cover-frame {
    width: 100%;
    max-width: 220px;
}

.pd-cover-frame img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
}

.pd-cover-placeholder {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 10px;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    color: #9ca3af;
}

.pd-info-col {
    flex: 1;
    min-width: 0;
    padding: 32px 40px 36px;
    display: flex;
    flex-direction: column;
}

@media (max-width: 767.98px) {
    .pd-info-col {
        padding: 20px;
    }
}

.pd-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.pd-tag {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--pw-brand-light);
    color: var(--pw-brand-dark);
}

.pd-tag-info {
    background: #eef2ff;
    color: #4338ca;
}

.pd-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.45;
    margin: 0 0 10px;
    letter-spacing: -0.01em;
}

.pd-meta-line {
    font-size: 0.8125rem;
    color: #9ca3af;
    margin: 0 0 20px;
    line-height: 1.5;
}

.pd-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.pd-metric {
    text-align: center;
    padding: 12px 8px;
    background: #f9fafb;
    border-radius: 10px;
    border: 1px solid #f3f4f6;
}

.pd-metric em {
    display: block;
    font-style: normal;
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
    margin-bottom: 4px;
}

.pd-metric span {
    font-size: 0.6875rem;
    color: #9ca3af;
    font-weight: 500;
}

.pd-earn-box {
    background: #fff8f3;
    border: 1px solid #ffdcc2;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 24px;
}

.pd-earn-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.pd-earn-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #ea580c;
}

.pd-earn-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #ff6b00;
    letter-spacing: -0.03em;
    line-height: 1;
}

.pd-earn-foot {
    margin-top: 8px;
    font-size: 0.75rem;
    color: #b45309;
    opacity: 0.75;
    line-height: 1.45;
}

.pd-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pd-action-form {
    margin: 0;
}

.pd-btn-calc {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 360px;
    padding: 11px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    color: #334155;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.pd-btn-calc:hover {
    border-color: var(--pw-brand, #00b38a);
    background: #f8fffc;
    color: var(--pw-brand-dark, #008f6f);
}

.pd-btn-generate {
    display: block;
    width: 100%;
    max-width: 360px;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: var(--pw-brand);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 179, 138, 0.35);
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}

.pd-btn-generate:hover {
    background: var(--pw-brand-dark);
    box-shadow: 0 6px 18px rgba(0, 179, 138, 0.4);
}

.pd-btn-generate:active {
    transform: scale(0.98);
}

.pd-btn-regen {
    display: inline-block;
    margin-top: 12px;
    padding: 0;
    font-size: 0.8125rem;
    color: #9ca3af;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.pd-btn-regen:hover {
    color: var(--pw-text-secondary);
}

.pd-divider {
    height: 8px;
    background: #f3f4f6;
}

.pd-features {
    padding: 28px 40px 32px;
}

@media (max-width: 767.98px) {
    .pd-features {
        padding: 20px;
    }
}

.pd-features-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 16px;
}

.pd-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (max-width: 767.98px) {
    .pd-feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.pd-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    background: #fafafa;
    border-radius: 10px;
    border: 1px solid #f0f0f0;
}

.pd-feature-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--pw-brand-light);
    color: var(--pw-brand-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pd-feature-icon svg {
    width: 18px;
    height: 18px;
}

.pd-feature-text strong {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 2px;
}

.pd-feature-text span {
    font-size: 0.6875rem;
    color: #9ca3af;
    line-height: 1.4;
}

/* ========== 素材详情页 ========== */
.md-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.md-topbar-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.md-hero {
    background: var(--pw-card-bg);
    border: 1px solid var(--pw-border);
    border-radius: var(--pw-radius);
    box-shadow: var(--pw-shadow);
    padding: 22px 24px;
    margin-bottom: 20px;
}

.md-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 10px;
}

.md-hero-id,
.md-hero-book {
    font-size: 0.8125rem;
    color: var(--pw-text-secondary);
}

.md-copy-id {
    cursor: pointer;
    border-radius: 4px;
    padding: 1px 4px;
    margin: -1px -4px;
    transition: background .15s ease, color .15s ease;
}
.md-copy-id:hover {
    background: rgba(37, 99, 235, .08);
    color: #2563eb;
}
.md-copy-id.is-copied {
    background: rgba(22, 163, 74, .12);
    color: #16a34a;
}

.md-hero-book {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.md-hero-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.md-hero-earn {
    margin: 10px 0 0;
    font-size: 0.9375rem;
    color: #ea580c;
    font-weight: 600;
}

.md-hero-earn strong {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ff6b00;
}

.md-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.md-section-title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #111827;
}

.md-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.md-image-card {
    margin-bottom: 14px;
    border: 1px solid var(--pw-border);
    border-radius: var(--pw-radius-sm);
    overflow: hidden;
    background: #fff;
}

.md-image-card img {
    width: 100%;
    display: block;
    margin: 0;
    border: none;
    border-radius: 0;
}

.md-image-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: #fafbfc;
    border-top: 1px solid var(--pw-border);
}

.md-image-label {
    font-size: 0.75rem;
    color: var(--pw-text-secondary);
    font-weight: 500;
}

.md-topics-raw {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.md-topics-chips {
    margin-top: 0;
}

.md-qr-block {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.md-qr-img {
    width: 180px;
    height: 180px;
    border-radius: 10px;
    border: 1px solid var(--pw-border);
    background: #fff;
    flex-shrink: 0;
}

.md-qr-title {
    margin: 0 0 6px;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #111827;
}

.md-qr-desc {
    margin: 0 0 12px;
    font-size: 0.8125rem;
    color: var(--pw-text-secondary);
    line-height: 1.55;
    max-width: 360px;
}

.md-howto {
    margin-top: 14px;
    padding: 14px 16px;
    background: #f8faf9;
    border: 1px solid #e6f2ee;
    border-radius: var(--pw-radius-sm);
}

.md-howto-title {
    margin: 0 0 8px;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--pw-brand-dark);
}

.md-howto-list {
    margin: 0;
    padding-left: 18px;
    font-size: 0.8125rem;
    color: #4b5563;
    line-height: 1.7;
}

.md-howto-list code {
    font-size: 0.75rem;
    background: #eef2f0;
    padding: 1px 5px;
    border-radius: 4px;
}

.pw-pick-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 0;
}

.pw-pick-actions .pw-btn-block {
    width: 100%;
}

.pw-pick-link {
    display: block;
    text-align: center;
    font-size: 0.75rem;
    color: var(--pw-text-secondary);
    text-decoration: none;
    padding: 4px 0;
}

.pw-pick-link:hover {
    color: var(--pw-brand);
    text-decoration: none;
}

.pd-actions-extra {
    margin-top: 12px;
}

/* ========== 佣金试算工具 ========== */
.pw-sim {
    background: #fff;
    border: 1px solid var(--pw-border);
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 20px;
    box-shadow: var(--pw-shadow);
}

.pw-sim-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.pw-sim-title {
    font-size: 1.0625rem;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--pw-text);
    letter-spacing: -0.02em;
}

.pw-sim-desc,
.pw-sim-lead {
    font-size: 0.8125rem;
    color: var(--pw-text-secondary);
    margin: 0 0 16px;
    line-height: 1.55;
}

.pw-sim-lead {
    padding: 10px 12px;
    background: linear-gradient(135deg, #f0faf7 0%, #f8fffc 100%);
    border: 1px solid #d8f0e8;
    border-radius: 10px;
    color: #0f766e;
}

.pw-sim-toggle {
    flex-shrink: 0;
    border: 1px solid var(--pw-border);
    background: #fafafa;
    color: var(--pw-text-secondary);
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
}

.pw-sim-presets {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.pw-sim-presets-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--pw-text-secondary);
}

.pw-sim-preset-group {
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 3px;
    background: #f3f4f6;
    border-radius: 10px;
}

.pw-sim-preset {
    border: none;
    background: transparent;
    color: #4b5563;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 7px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.pw-sim-preset:hover {
    color: var(--pw-brand-dark);
}

.pw-sim-preset.is-active {
    background: #fff;
    color: var(--pw-brand-dark);
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.pw-sim-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 14px;
}

@media (max-width: 575.98px) {
    .pw-sim-grid {
        grid-template-columns: 1fr;
    }
}

.pw-sim-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
}

.pw-sim-field > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #4b5563;
}

.pw-sim-lock {
    font-style: normal;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--pw-brand-dark);
    background: var(--pw-brand-light);
    border-radius: 999px;
    padding: 1px 7px;
}

.pw-sim .pw-input {
    height: 42px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-variant-numeric: tabular-nums;
    -moz-appearance: textfield;
}

.pw-sim .pw-input::-webkit-outer-spin-button,
.pw-sim .pw-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pw-sim .pw-input:hover {
    border-color: #cbd5e1;
}

.pw-sim .pw-input:focus {
    border-color: var(--pw-brand);
    box-shadow: 0 0 0 3px rgba(0, 179, 138, 0.14);
    background: #fff;
}

.pw-sim .pw-input.is-locked,
.pw-sim .pw-input[readonly] {
    background: #f8fafc;
    color: #64748b;
    cursor: default;
    border-style: dashed;
}

.pw-sim-field-narrow {
    grid-column: 1 / -1;
    max-width: 160px;
}

.pw-sim-hint {
    font-size: 0.75rem;
    color: #b45309;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 8px 10px;
    margin: 12px 0 0;
}

.pw-sim-cvr-note {
    font-size: 0.75rem;
    color: #0e7490;
    background: #ecfeff;
    border: 1px solid #a5f3fc;
    border-radius: 10px;
    padding: 10px 12px;
    margin: 12px 0 0;
    line-height: 1.5;
}

.pw-sim-results {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 10px;
    margin-top: 18px;
    padding: 4px;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    border: 1px solid #eef2f7;
    border-radius: 14px;
}

.pw-sim-result {
    background: #fff;
    border-radius: 12px;
    padding: 14px 16px;
    border: 1px solid transparent;
}

.pw-sim-result-main {
    background: linear-gradient(145deg, #fff8f1 0%, #fff 70%);
    border-color: #ffe0c2;
    box-shadow: 0 4px 14px rgba(255, 107, 0, 0.08);
}

.pw-sim-result-meta {
    grid-column: 1 / -1;
    background: transparent;
    padding: 2px 10px 10px;
    font-size: 0.8125rem;
    color: var(--pw-text-secondary);
}

.pw-sim-result-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 6px;
}

.pw-sim-result-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--pw-text);
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.pw-sim-result-highlight {
    color: #ff6b00;
    font-size: 1.625rem;
}

.pw-sim-formula {
    font-size: 0.75rem;
    color: #64748b;
    margin: 14px 0 0;
    line-height: 1.55;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 10px;
    border-left: 3px solid var(--pw-brand);
}

.pw-sim-disclaimer {
    font-size: 0.6875rem;
    color: #94a3b8;
    margin: 10px 0 0;
    line-height: 1.5;
}

.pd-sheet .pw-sim {
    margin-top: 0;
    margin-bottom: 20px;
}

/* 推广员首页 bootstrap 风格 */
.pw-sim-bootstrap {
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.pw-sim-bootstrap .pw-sim-title {
    font-size: 0.9375rem;
}

.pw-sim-bootstrap .pw-input {
    width: 100%;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 0.875rem;
}

.pw-sim-in-modal {
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    background: transparent;
}

.pw-sim-in-modal .pw-sim-head {
    display: none;
}

body.pw-sim-modal-open {
    overflow: hidden;
}

.pw-sim-modal {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.pw-sim-modal[hidden] {
    display: none !important;
}

.pw-sim-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(2px);
}

.pw-sim-modal-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 32px);
    overflow: auto;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.pw-sim-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 12px;
    gap: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.pw-sim-modal-title {
    font-size: 1.125rem;
    font-weight: 800;
    margin: 0;
    color: var(--pw-text);
    letter-spacing: -0.02em;
}

.pw-sim-modal-close {
    border: none;
    background: #f1f5f9;
    color: #64748b;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}

.pw-sim-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.pw-sim-modal-body {
    padding: 16px 20px 20px;
}

/* 主题栏目模式 */
.pw-theme-panel {
    margin: 0 0 20px;
    padding: 18px 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
}
.pw-theme-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.pw-theme-title {
    margin: 0 0 6px;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--pw-text, #0f172a);
}
.pw-theme-desc {
    margin: 0;
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.45;
}
.pw-theme-body { margin-top: 14px; }
.pw-theme-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    align-items: flex-end;
}
.pw-theme-topic { flex: 1 1 280px; min-width: 200px; }
.pw-theme-actions-field { flex: 0 0 auto; }
.pw-theme-hint {
    margin: 10px 0 0;
    font-size: 0.8rem;
    color: #94a3b8;
}
.pw-theme-angle {
    margin: 12px 0 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #2563eb;
}
.pw-theme-picks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    margin-top: 14px;
}
.pw-theme-pick {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
}
.pw-theme-pick:has(input:checked) {
    border-color: #2563eb;
    box-shadow: 0 0 0 1px #2563eb;
}
.pw-theme-pick input {
    position: absolute;
    top: 10px;
    right: 10px;
    margin: 0;
}
.pw-theme-pick-cover {
    width: 56px;
    height: 72px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
}
.pw-theme-pick-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pw-theme-pick-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 0.7rem;
    color: #94a3b8;
}
.pw-theme-pick-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding-right: 22px;
}
.pw-theme-pick-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pw-theme-pick-meta {
    font-size: 0.75rem;
    color: #94a3b8;
}
.pw-theme-pick-reason {
    font-size: 0.75rem;
    color: #475569;
    line-height: 1.35;
}
.pw-theme-pick-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.pw-theme-foot {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}
.pw-theme-status {
    font-size: 0.85rem;
    color: #64748b;
}
.pw-theme-status.is-err { color: #dc2626; }
.md-theme-books {
    margin: 0 0 16px;
    padding: 14px 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}
.md-theme-books h3 {
    margin: 0 0 8px;
    font-size: 0.9rem;
    font-weight: 700;
}
.md-theme-books ul {
    margin: 0;
    padding-left: 18px;
    color: #475569;
    font-size: 0.875rem;
    line-height: 1.55;
}
.pw-badge-theme {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    color: #1d4ed8;
    background: #dbeafe;
    padding: 2px 8px;
    border-radius: 6px;
    margin-right: 6px;
    vertical-align: middle;
}
