/* ============================================================
   portfolio.css — 作品区模块样式
   依赖 style.css 的 CSS 变量，不引入新颜色
   唯一强调色：var(--green)，与主界面一致
   ============================================================ */

:root {
    --pf-accent: #2f6b57;
    --pf-accent-2: #5b8f78;
    --pf-accent-soft: #eef6f1;
    --pf-tag-bg: #edf5f0;
    --pf-tag-text: #2f6b57;
    --pf-text: #666666;
    --pf-shadow: 0 18px 45px rgba(20, 38, 31, .08), 0 4px 14px rgba(20, 38, 31, .04);
    --pf-shadow-hover: 0 28px 65px rgba(20, 38, 31, .12), 0 10px 22px rgba(20, 38, 31, .06);
}

/* ── Header ── */
.pf-meta-compact {
    margin-top: 0;
    margin-bottom: 18px;
}

/* ── Grid Layout ── */
.pf-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
}

@media (max-width: 1400px) {
    .pf-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .pf-meta,
    .pf-meta-compact,
    .pf-filter-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .pf-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .pf-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Card Base ── */
.pc {
    min-width: 0;
}

.pc-body {
    padding: 15px 16px 12px;
    flex: 1;
}

.pc-foot {
    padding: 10px 16px 15px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 10px;
}

.pc-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.pc-cta {
    width: 100%;
}

.pc-video {
    margin: 10px 18px 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
}

.pc-video-play {
    width: 100%;
    justify-content: center;
    min-height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(47, 107, 87, .12);
    background: rgba(245, 248, 246, .95);
    color: var(--ink2);
}

.pc-video-play:hover {
    background: rgba(47, 107, 87, .06);
    color: var(--pf-accent);
    border-color: rgba(47, 107, 87, .2);
}

.pc-video-play-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pf-accent), var(--pf-accent-2));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 9px;
}

.pc-actions {
    display: flex;
    gap: 10px;
    width: 100%;
}

.pc-actions .pc-cta {
    flex: 1;
    width: auto;
}

.pf-hero-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.pf-hero-badge {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--green);
    border: 1px solid var(--green-border);
    background: var(--green-bg);
    border-radius: 999px;
    padding: 6px 10px;
    white-space: nowrap;
}

.pf-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 5px;
    margin-bottom: 20px;
}

.pf-meta-desc {
    font-size: 12px;
    color: var(--ink3);
    line-height: 1.75;
    max-width: 780px;
}

.pf-count {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--ink3);
    white-space: nowrap;
}

.pf-count strong {
    color: var(--pf-accent);
}

.pf-intro-block {
    background: linear-gradient(180deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, .38));
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px 22px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pf-intro-kicker {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--green);
}

.pf-intro-title {
    font-family: var(--serif);
    font-size: 24px;
    line-height: 1.35;
    letter-spacing: -.02em;
    color: var(--ink);
}

.pf-intro-desc {
    font-size: 13px;
    line-height: 1.8;
    color: var(--ink2);
}

.pf-intro-points {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pf-intro-point {
    font-family: var(--mono);
    font-size: 10px;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--ink3);
}

.panel-title {
    font-family: var(--serif);
    font-size: 26px;
    letter-spacing: -.02em;
}

.panel-sub {
    font-family: var(--mono);
    font-size: 11px;
    color: #8b8b84;
}

.pf-filter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 26px;
    flex-wrap: wrap;
}

.pf-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.pf-filter {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.pf-filter-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pf-edit-toggle {
    font-family: var(--mono);
    font-size: 10px;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px dashed var(--border);
    background: transparent;
    color: var(--ink3);
    cursor: pointer;
    transition: all .15s;
    opacity: .65;
}

.pf-edit-toggle.on {
    border-style: solid;
    border-color: var(--green);
    color: var(--green);
    background: var(--green-bg);
}

.pf-edit-toggle:hover {
    border-color: var(--ink2);
    color: var(--ink2);
}

.pf-add-card {
    display: none;
    font-family: var(--mono);
    font-size: 11px;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid var(--green);
    background: var(--green-bg);
    color: var(--green);
    cursor: pointer;
    transition: all .15s;
}

.pf-add-card.on {
    display: inline-flex;
}

.pf-add-card:hover {
    background: var(--green);
    color: #fff;
    border-color: var(--green);
}

/* ── 新建卡片弹层 ── */
.pf-new-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .45);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    z-index: 600;
    padding: 24px;
}

.pf-new-modal.open {
    display: flex;
}

.pf-new-inner {
    background: var(--panel);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 22px 70px rgba(0, 0, 0, .22);
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pf-new-hd {
    padding: 14px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pf-new-title {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .1em;
    color: var(--green);
    text-transform: uppercase;
}

.pf-new-close {
    border: none;
    background: transparent;
    font-size: 16px;
    color: var(--ink3);
    cursor: pointer;
    padding: 0 4px;
}

.pf-new-body {
    padding: 18px 22px 16px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
    row-gap: 12px;
}

.pf-new-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* 链接 / 来源 / 描述 / 标签 占满整行（位置 5,6,7,8） */
.pf-new-body .pf-new-field:nth-child(5),
.pf-new-body .pf-new-field:nth-child(6),
.pf-new-body .pf-new-field:nth-child(7),
.pf-new-body .pf-new-field:nth-child(8) {
    grid-column: 1 / -1;
}

.pf-new-field span {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--ink3);
    letter-spacing: .06em;
}

.pf-new-field input,
.pf-new-field select,
.pf-new-field textarea {
    font-family: var(--sans);
    font-size: 13px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--ink2);
    background: var(--bg);
}

.pf-new-field textarea {
    resize: vertical;
    min-height: 68px;
}

.pf-new-field input:focus,
.pf-new-field select:focus,
.pf-new-field textarea:focus {
    outline: none;
    border-color: var(--green);
    background: #fff;
}

.pf-new-ft {
    padding: 12px 18px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.pf-new-cancel {
    font-family: var(--mono);
    font-size: 11px;
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--ink2);
    cursor: pointer;
}

.pf-new-save {
    font-family: var(--mono);
    font-size: 11px;
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid var(--green);
    background: var(--green);
    color: #fff;
    cursor: pointer;
}

.pf-new-save:hover {
    opacity: .9;
}

.pc-custom-actions {
    display: none;
    justify-content: flex-end;
    gap: 6px;
    padding: 0 15px 10px;
}

body.is-edit-mode .pc-custom-actions {
    display: flex;
}

.pc-custom-btn {
    font-family: var(--mono);
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--ink3);
    cursor: pointer;
    transition: all .15s;
}

.pc-custom-btn:hover {
    border-color: var(--green);
    color: var(--green);
}

.pc-custom-btn.danger {
    border-color: #fecaca;
    color: #dc2626;
}

.pc-custom-btn.danger:hover {
    background: #fef2f2;
}

.pf-chip {
    font-family: var(--mono);
    font-size: 11px;
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--ink3);
    cursor: pointer;
    transition: all .15s;
}

.pf-chip:hover {
    background: var(--bg);
    color: var(--ink2);
    border-color: #c7c3bd;
}

.pf-chip.on {
    background: linear-gradient(135deg, var(--pf-accent), var(--pf-accent-2));
    color: #fafaf9;
    border-color: transparent;
    box-shadow: 0 8px 18px rgba(47, 107, 87, .12);
}

/* ── Split Layout ── */
.pf-split {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
    align-items: start;
}

.pf-left {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-right: 20px;
    border-right: 1px solid var(--border);
}

.pf-right {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 16px;
}

/* 响应式：窄屏改为上下布局，右栏变单列 */
@media (max-width: 1100px) {
    .pf-hero-head,
    .pf-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .pf-split {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .pf-left {
        border-right: none;
        padding-right: 0;
        border-bottom: 1px solid var(--border);
        padding-bottom: 14px;
    }

    .pf-right {
        grid-template-columns: 1fr;
    }

    .pc.featured {
        grid-column: span 1;
        flex-direction: column;
    }

    .pc.featured .pc-left {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .pc.featured .pc-right {
        width: 100%;
        flex-direction: row;
    }

    .pc-side-metric {
        min-width: 0;
    }
}

/* ── Card Base ── */
.pc {
    background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(250, 251, 249, .92));
    border: 1px solid rgba(210, 220, 214, .9);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform .22s cubic-bezier(.4, 0, .2, 1), box-shadow .22s cubic-bezier(.4, 0, .2, 1), border-color .22s;
    animation: pc-in .28s ease both;
    box-shadow: var(--pf-shadow);
    backdrop-filter: blur(10px);
    position: relative;
}

.pc::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(91, 143, 120, .08), transparent 34%);
    pointer-events: none;
}

.pc:hover {
    transform: translateY(-5px);
    box-shadow: var(--pf-shadow-hover);
    border-color: rgba(47, 107, 87, .18);
}

@keyframes pc-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.pc:nth-child(1) {
    animation-delay: .03s
}

.pc:nth-child(2) {
    animation-delay: .07s
}

.pc:nth-child(3) {
    animation-delay: .11s
}

.pc:nth-child(4) {
    animation-delay: .15s
}

.pc:nth-child(5) {
    animation-delay: .19s
}

.pc:nth-child(6) {
    animation-delay: .23s
}

/* 左边框 = 唯一类型区分信号，不用多色 */
.pc[data-type="tool"],
.pc[data-type="doc"],
.pc[data-type="research"] {
    border-left: none;
}

/* ── Head ── */
.pc-head {
    padding: 13px 16px 11px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pc-type {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 4px;
}

.pc-type.tool {
    background: var(--pf-accent-soft);
    color: var(--pf-accent);
    font-weight: 600;
}

.pc-type.doc {
    background: #f5f5f3;
    color: #5a5a52;
    font-weight: 600;
}

.pc-type.research {
    background: #f3f1f8;
    color: #6b5f8a;
    font-weight: 600;
}

.pc-status {
    font-family: var(--mono);
    font-size: 9px;
    padding: 2px 7px;
    border-radius: 4px;
    border: 1px solid transparent;
}

.ps-live {
    background: var(--pf-accent-soft);
    color: var(--pf-accent);
    border-color: rgba(31, 111, 120, .16);
}

.ps-wip {
    background: #f3f6fb;
    color: #5b6470;
    border-color: rgba(91, 100, 112, .15);
}

.ps-pub {
    background: var(--bg);
    color: var(--ink3);
    border-color: var(--border);
}

/* ── Metric Block ── */
.pc-metric {
    padding: 18px 16px 15px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(250, 248, 245, .9), rgba(250, 248, 245, .55));
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.pc-num {
    font-family: var(--serif);
    font-size: 30px;
    line-height: 1;
    letter-spacing: -.03em;
    color: var(--ink);
    /* 默认深色 */
    flex-shrink: 0;
}

.pc-num.positive {
    color: var(--green);
}

/* 正向数字才给绿色 */
.pc-metric-right {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding-top: 2px;
}

.pc-metric-label {
    font-size: 12px;
    color: var(--ink2);
    font-weight: 500;
    line-height: 1.35;
}

.pc-metric-sub {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--ink3);
    line-height: 1.5;
}

/* ── Body ── */
.pc-body {
    padding: 18px 18px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pc-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.4;
    margin-bottom: 8px;
}

.pc-desc {
    font-size: 13px;
    color: var(--pf-text);
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 94px;
}

.pc-head {
    padding: 14px 18px 12px;
}

.pc-foot {
    padding: 12px 18px 18px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 12px;
    margin-top: auto;
}

/* ── Footer ── */
.pc-foot {
    padding: 10px 16px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.pc-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    flex: 1;
}

.pc-tag {
    font-family: var(--mono);
    font-size: 10px;
    background: var(--pf-tag-bg);
    color: var(--pf-tag-text);
    padding: 4px 9px;
    border-radius: 999px;
    font-weight: 500;
}

/* CTA：工具=绿色实心（可体验），文档=边框（可阅读） */
.pc-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .04em;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: all .18s;
    flex-shrink: 0;
    text-decoration: none;
    min-width: 86px;
    position: relative;
    z-index: 1;
}

.cta-tool {
    background: linear-gradient(135deg, var(--pf-accent), var(--pf-accent-2));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 18px rgba(47, 107, 87, .14);
}

.cta-tool:hover {
    transform: translateY(-1px);
    opacity: .97;
}

.cta-doc {
    background: rgba(255, 255, 255, .7);
    color: var(--pf-accent);
    border-color: rgba(47, 107, 87, .16);
}

.cta-doc:hover {
    background: rgba(47, 107, 87, .06);
    color: var(--pf-accent);
    border-color: rgba(47, 107, 87, .28);
}

/* ── Featured Card（最强项目，横跨两列）── */
.pc.featured {
    grid-column: span 2;
    flex-direction: row;
    border-color: #d9d4cc;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .06);
}

.pc.featured .pc-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
    min-width: 0;
}

.pc.featured .pc-right {
    width: 190px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(250, 248, 245, .9), rgba(250, 248, 245, .65));
}

.pc-side-metric {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 14px 18px;
    gap: 4px;
}

.pc-side-metric+.pc-side-metric {
    border-top: 1px solid var(--border);
}

.psm-num {
    font-family: var(--serif);
    font-size: 20px;
    letter-spacing: -.02em;
    color: var(--ink);
    line-height: 1;
}

.psm-num.positive {
    color: var(--green);
}

.psm-lbl {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--ink3);
    line-height: 1.4;
    margin-top: 3px;
}

/* ── Demo Video ── */
.pc-video {
    margin: 8px 15px 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.pc-video-play {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg);
    padding: 6px 10px;
    cursor: pointer;
    font-family: var(--mono);
    font-size: 10px;
    color: var(--ink2);
    transition: all .15s;
}

.pc-video-play:hover {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.pc-video-play-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--green);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 9px;
}

.pc-video-play-text {
    font-weight: 500;
}

.pc-video-meta {
    font-family: var(--mono);
    font-size: 9px;
    color: var(--ink3);
}

.pc-video-upload {
    display: none;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    cursor: pointer;
}

body.is-edit-mode .pc-video-upload {
    display: flex;
}

.pc-video-upload-label {
    font-family: var(--mono);
    font-size: 9px;
    color: var(--ink3);
    text-decoration: underline;
}

.pc-video-input {
    display: none;
}

.pc-video-name {
    font-family: var(--mono);
    font-size: 9px;
    color: var(--green);
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ── Compact card overrides ── */
.pf-hero-head,
.pf-hero-badge,
.pf-meta-desc,
.pf-intro-block,
.pf-split,
.pf-left,
.pc-metric,
.pc-right,
.pc-side-metric {
    display: none !important;
}

.pc.featured {
    grid-column: span 1 !important;
    flex-direction: column !important;
    border-color: var(--border) !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .04) !important;
}

.pc.featured .pc-left,
.pc.featured .pc-right {
    width: auto !important;
    border: none !important;
    display: block !important;
}

.pc-actions {
    display: flex;
    gap: 8px;
    width: 100%;
}

.pc-actions .pc-cta {
    flex: 1;
    width: auto;
}

@media (max-width: 1400px) {
    #pf-right {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    #pf-right {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    #pf-right {
        grid-template-columns: 1fr;
    }
}

.pc-doc-upload {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg);
    border-radius: 6px;
    margin-bottom: 8px;
}

body.is-edit-mode .pc-doc-upload {
    display: flex;
}

.pc-doc-upload-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    background: var(--panel);
    border: 1px solid var(--border);
    transition: all 0.15s;
}

.pc-doc-upload-btn:hover {
    border-color: var(--green);
    color: var(--green);
}

.pc-doc-upload-btn input {
    display: none;
}

.pc-doc-upload-icon {
    font-size: 12px;
}

.pc-doc-upload-label {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--ink3);
}

.pc-doc-upload-btn:hover .pc-doc-upload-label {
    color: var(--green);
}

.pc-doc-name {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--green);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Demo overlay */
.demo-ov {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .6);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 500;
    padding: 20px;
}

.demo-ov.open {
    display: flex;
}

.demo-modal {
    background: var(--panel);
    border-radius: 14px;
    max-width: 900px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(15, 23, 42, .4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

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

.demo-title {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--ink3);
}

.demo-close {
    border: none;
    background: transparent;
    font-size: 16px;
    cursor: pointer;
    color: var(--ink3);
}

.demo-video-wrap {
    background: #000;
    padding: 10px;
}

.demo-player {
    width: 100%;
    max-height: 70vh;
    display: block;
}

/* ==================== 百宝箱工具卡片 ==================== */
.tool-link {
    color: var(--ink);
    text-decoration: none;
}

.tool-link:hover {
    color: var(--green);
    text-decoration: underline;
}

.tool-source {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--ink3);
    background: var(--bg);
    padding: 2px 6px;
    border-radius: 4px;
}

.pc-type.website {
    border-left-color: #3b82f6;
}

.pc-type.article {
    border-left-color: #8b5cf6;
}

.pc-type.tool {
    border-left-color: var(--green);
}

.pc-type.prompt {
    border-left-color: #f59e0b;
}