/* 界智通 · AI 提示词库 */
.jp-wrap {
    --jp-bg: var(--background-color, #f7f7fb);
    --jp-card: var(--front-bg-color, #fff);
    --jp-title: var(--title-color, #222);
    --jp-text: var(--text-color, #333);
    --jp-muted: var(--light-text-color, #888);
    --jp-line: var(--line-color, #eee);
    --jp-accent: var(--primary-color, #4e73df);
    --jp-grad: linear-gradient(135deg, #7c3aed 0%, #c026d3 55%, #f43f5e 100%);
    --jp-radius: 14px;
    max-width: 1680px;
    margin: 0 auto;
    padding: 12px 24px 40px;
    color: var(--jp-text);
    box-sizing: border-box;
}
.jp-wrap *, .jp-modal *, .jp-lightbox * { box-sizing: border-box; }
html.jp-lock { overflow: hidden; }
.jp-wrap [hidden], .jp-modal [hidden], .jp-lightbox [hidden] { display: none !important; }

/* ---------- Hero ---------- */
.jp-hero {
    position: relative;
    border-radius: 22px;
    padding: 44px 32px 30px;
    margin-bottom: 26px;
    overflow: hidden;
    background:
        radial-gradient(900px 300px at 10% -20%, rgba(124, 58, 237, .28), transparent 60%),
        radial-gradient(700px 280px at 95% 0%, rgba(244, 63, 94, .22), transparent 60%),
        radial-gradient(600px 260px at 50% 120%, rgba(59, 130, 246, .18), transparent 60%),
        var(--jp-card);
    border: 1px solid var(--jp-line);
}
.jp-hero-inner { max-width: 760px; margin: 0 auto; text-align: center; }
.jp-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--jp-muted); margin: 0 0 14px;
    padding: 5px 12px; border-radius: 99px; border: 1px solid var(--jp-line);
    background: color-mix(in srgb, var(--jp-card) 70%, transparent);
}
.jp-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .18); }
.jp-hero-title { font-size: clamp(26px, 4vw, 44px); line-height: 1.15; margin: 0 0 12px; color: var(--jp-title); font-weight: 800; letter-spacing: -.02em; }
.jp-hero-title em { font-style: normal; background: var(--jp-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.jp-hero-sub { font-size: 15px; color: var(--jp-muted); margin: 0 auto 22px; max-width: 620px; line-height: 1.7; }
.jp-search {
    display: flex; align-items: center; gap: 10px;
    max-width: 620px; margin: 0 auto; padding: 0 8px 0 18px; height: 54px;
    border-radius: 16px; background: var(--jp-card); color: var(--jp-muted);
    border: 1px solid var(--jp-line);
    box-shadow: 0 18px 40px -20px rgba(76, 29, 149, .35);
    transition: border-color .2s, box-shadow .2s; cursor: text;
}
.jp-search:focus-within { border-color: #a855f7; box-shadow: 0 0 0 4px rgba(168, 85, 247, .15), 0 18px 40px -20px rgba(76, 29, 149, .45); }
.jp-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 15px; color: var(--jp-title); }
.jp-search input::-webkit-search-cancel-button { cursor: pointer; }
.jp-search kbd { font: 12px/1 ui-monospace, monospace; padding: 6px 9px; border-radius: 8px; border: 1px solid var(--jp-line); color: var(--jp-muted); }
.jp-hero-stats { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 26px; margin-top: 20px; font-size: 13px; color: var(--jp-muted); }
.jp-hero-stats b { color: var(--jp-title); font-size: 16px; margin-right: 3px; }

/* ---------- Section head ---------- */
.jp-sec-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px; }
.jp-sec-head h2 { font-size: 18px; margin: 0; color: var(--jp-title); font-weight: 700; }
.jp-scroll-btns { display: flex; gap: 6px; }
.jp-icon-btn {
    width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--jp-line);
    background: var(--jp-card); color: var(--jp-title); font-size: 18px; line-height: 1; cursor: pointer;
}
.jp-icon-btn:hover { border-color: var(--jp-accent); color: var(--jp-accent); }

/* ---------- Trending ---------- */
.jp-trending { margin-bottom: 26px; }
.jp-trending-row {
    display: grid; grid-auto-flow: column; grid-auto-columns: 168px; gap: 14px;
    overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: none;
}
.jp-trending-row::-webkit-scrollbar { display: none; }
.jp-trend {
    position: relative; display: block; scroll-snap-align: start; border-radius: 12px; overflow: hidden;
    aspect-ratio: 3 / 4; background: var(--jp-line); color: #fff !important; text-decoration: none;
}
.jp-trend-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.jp-trend-img { position: absolute; inset: 0; }
.jp-trend:hover .jp-trend-img img { transform: scale(1.06); }
.jp-trend::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, .78)); }
.jp-trend-rank {
    position: absolute; left: 8px; top: 8px; z-index: 2; min-width: 26px; height: 26px; padding: 0 6px;
    border-radius: 8px; font-weight: 800; font-size: 14px; display: grid; place-items: center;
    background: rgba(0, 0, 0, .55); backdrop-filter: blur(6px);
}
.jp-trend-rank.r1 { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.jp-trend-rank.r2 { background: linear-gradient(135deg, #a855f7, #6366f1); }
.jp-trend-rank.r3 { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.jp-trend-info { position: absolute; left: 10px; right: 10px; bottom: 9px; z-index: 2; }
.jp-trend-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; font-weight: 600; line-height: 1.35; }
.jp-trend-meta { display: block; font-size: 11px; opacity: .8; margin-top: 3px; }

/* ---------- Toolbar ---------- */
.jp-toolbar {
    position: sticky; top: 60px; z-index: 20; margin: 0 -24px 14px; padding: 12px 24px 10px;
    background: color-mix(in srgb, var(--jp-bg) 88%, transparent);
    backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid transparent;
}
.jp-toolbar-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.jp-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
.jp-chips::-webkit-scrollbar { display: none; }
.jp-chip {
    flex: none; height: 36px; padding: 0 15px; border-radius: 99px; cursor: pointer;
    border: 1px solid var(--jp-line); background: var(--jp-card); color: var(--jp-text);
    font-size: 14px; white-space: nowrap; transition: all .18s;
}
.jp-chip i { font-style: normal; font-size: 12px; color: var(--jp-muted); margin-left: 2px; }
.jp-chip:hover { border-color: var(--jp-title); }
.jp-chip.is-active { background: var(--jp-title); border-color: var(--jp-title); color: var(--jp-card); }
.jp-chip.is-active i { color: inherit; opacity: .7; }
.jp-chips-sm .jp-chip { height: 30px; padding: 0 12px; font-size: 13px; }
.jp-seg { flex: none; display: inline-flex; padding: 3px; border-radius: 10px; background: var(--jp-card); border: 1px solid var(--jp-line); }
.jp-seg button { border: 0; background: transparent; color: var(--jp-muted); height: 28px; padding: 0 12px; border-radius: 7px; font-size: 13px; cursor: pointer; }
.jp-seg button.is-active { background: var(--jp-bg); color: var(--jp-title); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.jp-result-line { font-size: 13px; color: var(--jp-muted); min-height: 0; margin: 0 0 10px; }
.jp-result-line:empty { display: none; }
.jp-result-line b { color: var(--jp-title); }
.jp-link { border: 0; background: none; padding: 0; color: var(--jp-accent) !important; cursor: pointer; font-size: inherit; text-decoration: none; }

/* ---------- Grid / Card ---------- */
.jp-grid { columns: 240px; column-gap: 16px; }
.jp-grid .jp-card { break-inside: avoid; margin-bottom: 16px; }
.jp-grid.is-masonry { columns: auto; display: flex; gap: var(--jp-gap, 16px); align-items: flex-start; }
.jp-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: var(--jp-gap, 16px); }
.jp-grid.is-masonry .jp-card { margin: 0; }

.jp-card {
    position: relative; border-radius: var(--jp-radius); background: var(--jp-card);
    border: 1px solid var(--jp-line); overflow: hidden;
    transition: transform .25s, box-shadow .25s;
    animation: jpIn .4s both;
}
@keyframes jpIn { from { opacity: 0; transform: translateY(8px); } }
.jp-card:hover { transform: translateY(-3px); box-shadow: 0 22px 40px -22px rgba(30, 20, 80, .45); }
.jp-card-media { position: relative; display: block; overflow: hidden; background: var(--jp-line); max-height: 560px; }
.jp-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.jp-card:hover .jp-card-media img { transform: scale(1.04); }
.jp-card-badges { position: absolute; left: 8px; top: 8px; display: flex; gap: 5px; z-index: 2; }
.jp-chip-sm {
    display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px;
    font-size: 11.5px; font-weight: 600; letter-spacing: .01em;
    background: var(--jp-bg); color: var(--jp-text) !important; border: 1px solid var(--jp-line); text-decoration: none;
}
.jp-card .jp-chip-sm { background: rgba(0, 0, 0, .5); color: #fff !important; border-color: transparent; backdrop-filter: blur(8px); }
.jp-chip-model { color: #7c3aed !important; }
.jp-chip-new { background: linear-gradient(135deg, #f43f5e, #f97316) !important; }
.jp-card-count {
    position: absolute; right: 8px; bottom: 8px; z-index: 2; display: inline-flex; align-items: center; gap: 4px;
    height: 22px; padding: 0 7px; border-radius: 6px; font-size: 11.5px; color: #fff;
    background: rgba(0, 0, 0, .5); backdrop-filter: blur(8px);
}
.jp-card-hover {
    position: absolute; inset: 0; z-index: 1; display: flex; align-items: flex-end; padding: 40px 12px 12px;
    background: linear-gradient(180deg, transparent 30%, rgba(8, 6, 20, .86));
    opacity: 0; transition: opacity .25s;
}
.jp-card-prompt {
    color: rgba(255, 255, 255, .92); font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace;
    display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
}
.jp-card:hover .jp-card-hover { opacity: 1; }
.jp-card:hover .jp-card-count { opacity: 0; }
.jp-card-copy {
    position: absolute; right: 8px; top: 8px; z-index: 3; display: inline-flex; align-items: center; gap: 5px;
    height: 30px; padding: 0 11px; border-radius: 9px; border: 0; cursor: pointer;
    background: rgba(255, 255, 255, .94); color: #111; font-size: 12.5px; font-weight: 600;
    opacity: 0; transform: translateY(-4px); transition: all .2s; box-shadow: 0 6px 16px rgba(0, 0, 0, .2);
}
.jp-card:hover .jp-card-copy, .jp-card-copy:focus-visible { opacity: 1; transform: none; }
.jp-card-copy:hover { background: #fff; color: #7c3aed; }
.jp-card-copy.is-done { background: #22c55e; color: #fff; }
.jp-card-copy.is-done span::after { content: "成功"; }
.jp-card-copy.is-done span { font-size: 0; }
.jp-card-copy.is-done span::after { font-size: 12.5px; }
.jp-card-body { padding: 10px 12px 11px; }
.jp-card-title { margin: 0 0 6px; font-size: 14px; line-height: 1.4; font-weight: 600; }
.jp-card-title a { color: var(--jp-title) !important; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jp-card-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--jp-muted); }
.jp-cats { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jp-stat, .jp-like { display: inline-flex; align-items: center; gap: 3px; }
.jp-like { border: 0; background: none; padding: 0; color: var(--jp-muted); cursor: pointer; font-size: 12px; transition: color .2s, transform .2s; }
.jp-like b { font-weight: 500; }
.jp-like:hover { color: #f43f5e; }
.jp-like.is-liked { color: #f43f5e; }
.jp-like:active { transform: scale(1.2); }

.jp-empty { text-align: center; padding: 70px 0; color: var(--jp-muted); }
.jp-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 42px; padding: 0 18px;
    border-radius: 11px; border: 1px solid var(--jp-line); background: var(--jp-card); color: var(--jp-title) !important;
    font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; transition: all .18s;
}
.jp-btn:hover { border-color: var(--jp-title); }
.jp-btn-primary { flex: 1; border: 0; color: #fff !important; background: var(--jp-grad); box-shadow: 0 10px 24px -12px rgba(192, 38, 211, .8); }
.jp-btn-primary:hover { filter: brightness(1.08); }
.jp-btn-icon { width: 42px; padding: 0; gap: 3px; }
.jp-btn-icon.jp-like { width: auto; padding: 0 12px; font-size: 13px; color: var(--jp-title); }
.jp-btn-icon.jp-like.is-liked { color: #f43f5e !important; border-color: rgba(244, 63, 94, .4); background: rgba(244, 63, 94, .07); }

/* ---------- About ---------- */
.jp-about { margin-top: 40px; padding: 26px 28px; border-radius: 18px; background: var(--jp-card); border: 1px solid var(--jp-line); }
.jp-about h2 { margin: 0 0 8px; font-size: 17px; color: var(--jp-title); }
.jp-about p { margin: 0; color: var(--jp-muted); line-height: 1.8; font-size: 14px; }
.jp-howto { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 20px 0 0; padding: 0; }
.jp-howto li { counter-increment: s; padding: 14px 16px; border-radius: 12px; background: var(--jp-bg); }
.jp-howto li::before { content: counter(s); display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--jp-grad); color: #fff; font-size: 12px; font-weight: 700; margin-right: 8px; }
.jp-howto b { color: var(--jp-title); }
.jp-howto span { display: block; margin-top: 6px; font-size: 13px; color: var(--jp-muted); line-height: 1.6; }

/* ---------- Prompt blocks (shared) ---------- */
.jp-prompts { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.jp-prompt { border-radius: 12px; border: 1px solid var(--jp-line); background: var(--jp-bg); overflow: hidden; position: relative; }
.jp-prompt-head { display: flex; align-items: center; gap: 8px; padding: 9px 10px 9px 13px; border-bottom: 1px solid var(--jp-line); font-size: 12.5px; }
.jp-prompt-label { font-weight: 700; color: var(--jp-title); flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jp-lang { flex: none; font-size: 10.5px; font-weight: 700; padding: 2px 6px; border-radius: 5px; background: rgba(124, 58, 237, .12); color: #7c3aed; }
.jp-prompt[data-lang="zh"] .jp-lang { background: rgba(244, 63, 94, .12); color: #e11d48; }
.jp-prompt-len { flex: 1; color: var(--jp-muted); font-size: 11.5px; }
.jp-copy-btn {
    flex: none; height: 28px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--jp-line);
    background: var(--jp-card); color: var(--jp-title); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .15s;
}
.jp-copy-btn:hover { border-color: #a855f7; color: #7c3aed; }
.jp-copy-btn.is-done { background: #22c55e; border-color: #22c55e; color: #fff; }
.jp-prompt-text {
    margin: 0 !important; padding: 12px 14px !important; border: 0 !important; background: transparent !important;
    white-space: pre-wrap; word-break: break-word; color: var(--jp-text);
    font: 13px/1.75 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; max-height: none;
}
.jp-prompt.is-clamp .jp-prompt-text { max-height: 260px; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); mask-image: linear-gradient(180deg, #000 70%, transparent); }
.jp-prompt.is-clamp.is-open .jp-prompt-text { max-height: none; -webkit-mask-image: none; mask-image: none; }
.jp-prompt-more { display: block; width: 100%; border: 0; border-top: 1px solid var(--jp-line); background: var(--jp-card); color: var(--jp-muted); padding: 7px; font-size: 12.5px; cursor: pointer; }
.jp-prompt-more:hover { color: var(--jp-title); }
.jp-note { margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; font-size: 13px; color: var(--jp-text); background: rgba(245, 158, 11, .1); border: 1px dashed rgba(245, 158, 11, .45); }
.jp-side-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.jp-side-title { font-size: 21px; line-height: 1.4; margin: 12px 0 8px; color: var(--jp-title); font-weight: 750; }
.jp-side-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 12.5px; color: var(--jp-muted); }
.jp-side-meta a { color: inherit; }
.jp-author { display: inline-flex; align-items: center; gap: 6px; color: var(--jp-title) !important; font-weight: 600; text-decoration: none; }
.jp-author img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.jp-side-desc { font-size: 13.5px; color: var(--jp-muted); line-height: 1.75; margin: 14px 0 0; }
.jp-side-kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 14px; }
.jp-side-kv > div { padding: 9px 11px; border-radius: 10px; background: var(--jp-bg); border: 1px solid var(--jp-line); min-width: 0; }
.jp-side-kv dt { font-size: 11.5px; color: var(--jp-muted); margin-bottom: 3px; }
.jp-side-kv dd { margin: 0; font-size: 13px; font-weight: 600; color: var(--jp-title); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jp-side-kv small { font-weight: 400; color: var(--jp-muted); margin-left: 5px; font-size: 11px; }
.jp-tag-list { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 14px; }
.jp-tag-list a { font-size: 12.5px; color: var(--jp-muted) !important; text-decoration: none; }
.jp-tag-list a:hover { color: var(--jp-accent) !important; }
.jp-side-actions { display: flex; gap: 8px; }

/* ---------- Stage / thumbs ---------- */
.jp-stage { position: relative; display: grid; place-items: center; overflow: hidden; background: #0b0b10; isolation: isolate; }
.jp-stage::before { content: ""; position: absolute; inset: -40px; background: var(--jp-bg-img, none) center / cover; filter: blur(40px) brightness(.55); z-index: -1; }
.jp-stage img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; cursor: zoom-in; }
.jp-stage > img, .jp-stage-item > img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; }
.jp-zoom {
    position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 5px;
    height: 32px; padding: 0 11px; border: 0; border-radius: 9px; background: rgba(0, 0, 0, .55); color: #fff;
    font-size: 12.5px; cursor: pointer; backdrop-filter: blur(8px);
}
.jp-zoom:hover { background: rgba(0, 0, 0, .75); }
.jp-cap { position: absolute; left: 12px; top: 12px; padding: 4px 9px; border-radius: 7px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; }
.jp-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 10px 2px 2px; scrollbar-width: thin; }
.jp-thumbs:empty { display: none; }
.jp-thumbs button { flex: none; width: 62px; height: 62px; padding: 0; border-radius: 10px; overflow: hidden; border: 2px solid transparent; cursor: pointer; opacity: .6; background: var(--jp-line); transition: all .15s; }
.jp-thumbs button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jp-thumbs button.is-active, .jp-thumbs button:hover { opacity: 1; border-color: #a855f7; }

/* ---------- Modal ---------- */
.jp-modal { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; padding: 28px 70px; }
.jp-modal[hidden] { display: none; }
.jp-modal-mask { position: absolute; inset: 0; background: rgba(6, 4, 14, .72); backdrop-filter: blur(6px); opacity: 0; transition: opacity .25s; }
.jp-modal-box {
    --jp-bg: var(--background-color, #f7f7fb); --jp-card: var(--front-bg-color, #fff); --jp-title: var(--title-color, #222);
    --jp-text: var(--text-color, #333); --jp-muted: var(--light-text-color, #888); --jp-line: var(--line-color, #eee);
    --jp-accent: var(--primary-color, #4e73df); --jp-grad: linear-gradient(135deg, #7c3aed 0%, #c026d3 55%, #f43f5e 100%);
    position: relative; width: min(1280px, 100%); height: min(860px, 100%);
    display: grid; grid-template-columns: minmax(0, 1fr) 420px;
    border-radius: 20px; overflow: hidden; background: var(--jp-card); color: var(--jp-text);
    box-shadow: 0 40px 120px -30px rgba(0, 0, 0, .7);
    transform: translateY(14px) scale(.985); opacity: 0; transition: transform .28s cubic-bezier(.2, .8, .2, 1), opacity .22s;
}
.jp-modal.is-in .jp-modal-mask { opacity: 1; }
.jp-modal.is-in .jp-modal-box { transform: none; opacity: 1; }
.jp-modal-media { display: flex; flex-direction: column; min-height: 0; background: #0b0b10; }
.jp-modal-media .jp-stage { flex: 1; min-height: 0; }
.jp-modal-media .jp-thumbs { padding: 10px 12px; background: #0b0b10; }
.jp-modal-side { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--jp-line); }
.jp-side-scroll { flex: 1; overflow-y: auto; padding: 22px 22px 8px; overscroll-behavior: contain; }
.jp-modal-side .jp-side-actions { padding: 14px 22px 18px; border-top: 1px solid var(--jp-line); background: var(--jp-card); }
.jp-modal-x {
    position: absolute; right: 14px; top: 14px; z-index: 5; width: 36px; height: 36px; border-radius: 50%;
    border: 0; background: rgba(0, 0, 0, .55); color: #fff; font-size: 15px; cursor: pointer; backdrop-filter: blur(8px);
}
.jp-modal-box > .jp-modal-x { right: 434px; }
.jp-modal-x:hover { background: rgba(0, 0, 0, .8); }
.jp-modal-nav {
    position: fixed; top: 50%; z-index: 10000; width: 46px; height: 46px; margin-top: -23px; border-radius: 50%;
    border: 0; background: rgba(255, 255, 255, .14); color: #fff; font-size: 26px; line-height: 1; cursor: pointer;
    backdrop-filter: blur(8px); transition: background .15s;
}
.jp-modal-nav:hover { background: rgba(255, 255, 255, .28); }
.jp-modal-nav:disabled { opacity: .25; cursor: default; }
.jp-modal-nav.prev { left: 14px; }
.jp-modal-nav.next { right: 14px; }
.jp-stage .jp-modal-nav { position: absolute; background: rgba(0, 0, 0, .4); }
.jp-modal-side .jp-side-title { font-size: 19px; }

/* ---------- Lightbox ---------- */
.jp-lightbox { position: fixed; inset: 0; z-index: 10050; background: rgba(0, 0, 0, .94); display: grid; place-items: center; overflow: auto; }
.jp-lightbox[hidden] { display: none; }
.jp-lightbox img { max-width: 96vw; max-height: 94vh; object-fit: contain; cursor: zoom-in; }
.jp-lightbox.is-zoom { place-items: start center; }
.jp-lightbox.is-zoom img { max-width: none; max-height: none; width: min(1800px, 180vw); cursor: zoom-out; }
.jp-lightbox .jp-modal-nav { position: fixed; }
.jp-lightbox .jp-modal-x { position: fixed; }
.jp-lb-open { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); padding: 8px 14px; border-radius: 99px; background: rgba(255, 255, 255, .14); color: #fff !important; font-size: 13px; text-decoration: none; }

/* ---------- Toast ---------- */
.jp-toast {
    position: fixed; left: 50%; bottom: 40px; z-index: 10100; transform: translate(-50%, 20px);
    padding: 11px 20px; border-radius: 12px; background: #111; color: #fff; font-size: 14px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .3); opacity: 0; pointer-events: none; transition: all .25s;
}
.jp-toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Detail page ---------- */
.jp-detail { padding-top: 8px; }
.jp-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--jp-muted); margin: 4px 0 14px; }
.jp-crumb a { color: var(--jp-muted) !important; text-decoration: none; }
.jp-crumb a:hover { color: var(--jp-title) !important; }
.jp-crumb span { opacity: .5; }
.jp-crumb em { font-style: normal; color: var(--jp-title); max-width: 50ch; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.jp-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 22px; align-items: start; }
.jp-viewer { position: sticky; top: 72px; }
.jp-viewer .jp-stage { border-radius: 18px; height: calc(100vh - 180px); min-height: 420px; max-height: 920px; }
.jp-stage-item { display: none; margin: 0; width: 100%; height: 100%; place-items: center; position: relative; }
.jp-stage-item.is-active { display: grid; }
.jp-stage-item img { max-height: 100%; }
.jp-stage-item figcaption { position: absolute; left: 12px; top: 12px; padding: 4px 9px; border-radius: 7px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; }
.jp-panel { padding: 22px; border-radius: 18px; background: var(--jp-card); border: 1px solid var(--jp-line); }
.jp-panel .jp-side-title { font-size: 22px; }
.jp-panel .jp-side-actions { position: sticky; bottom: 0; margin: 0 -22px -22px; padding: 14px 22px 18px; background: var(--jp-card); border-top: 1px solid var(--jp-line); border-radius: 0 0 18px 18px; }
.jp-neighbor { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 30px 0 0; padding-top: 4px; }
.jp-neighbor a { display: block; padding: 10px 12px; border-radius: 10px; background: var(--jp-bg); font-size: 13px; color: var(--jp-title) !important; text-decoration: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.jp-neighbor a.r { text-align: right; grid-column: 2; }
.jp-neighbor small { display: block; color: var(--jp-muted); font-size: 11.5px; margin-bottom: 2px; }
.jp-article { margin: 28px 0 0; border-radius: 18px; background: var(--jp-card); border: 1px solid var(--jp-line); }
.jp-article summary { cursor: pointer; padding: 16px 22px; font-weight: 700; color: var(--jp-title); list-style: none; }
.jp-article summary::-webkit-details-marker { display: none; }
.jp-article summary::after { content: "▾"; float: right; color: var(--jp-muted); transition: transform .2s; }
.jp-article[open] summary::after { transform: rotate(180deg); }
.jp-article summary small { font-weight: 400; color: var(--jp-muted); margin-left: 8px; font-size: 12.5px; }
.jp-article .log-body { padding: 0 22px 22px; }
.jp-article .log-body img { max-width: 100%; border-radius: 10px; }
.jp-related { margin-top: 36px; }
.jp-comments { margin-top: 28px; border-radius: 18px; }

/* ---------- 生图入口 ---------- */
.jp-gen-btn {
    flex: none; display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 8px;
    background: var(--jp-grad); color: #fff !important; font-size: 12.5px; font-weight: 600; text-decoration: none;
}
.jp-gen-btn:hover { filter: brightness(1.1); }
.jp-card-gen {
    position: absolute; right: 8px; top: 44px; z-index: 3; display: inline-flex; align-items: center; gap: 4px;
    height: 30px; padding: 0 11px; border-radius: 9px; border: 0; cursor: pointer;
    background: var(--jp-grad); color: #fff; font-size: 12.5px; font-weight: 600;
    opacity: 0; transform: translateY(-4px); transition: all .2s; box-shadow: 0 6px 16px rgba(0, 0, 0, .2);
}
.jp-card:hover .jp-card-gen, .jp-card-gen:focus-visible { opacity: 1; transform: none; }
@media (max-width: 560px) {
    .jp-card-gen { opacity: 1; transform: none; top: 40px; height: 26px; padding: 0 8px; }
    .jp-card-gen span { display: none; }
}
@media (hover: none) { .jp-card-gen { opacity: 1; transform: none; } }

/* ---------- Dark tweaks ---------- */
.jp-card-copy { color: #111; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .jp-detail-grid { grid-template-columns: minmax(0, 1fr) 380px; }
    .jp-modal { padding: 20px; }
    .jp-modal-box { grid-template-columns: minmax(0, 1fr) 360px; }
    .jp-modal-box > .jp-modal-x { right: 374px; }
}
@media (max-width: 860px) {
    .jp-wrap { padding: 8px 14px 30px; }
    .jp-hero { padding: 30px 18px 22px; border-radius: 18px; }
    .jp-toolbar { margin: 0 -14px 12px; padding: 10px 14px 8px; top: 52px; }
    .jp-toolbar-row { flex-direction: column; align-items: stretch; }
    .jp-seg { align-self: flex-start; }
    .jp-howto { grid-template-columns: 1fr; }
    .jp-detail-grid { grid-template-columns: 1fr; }
    .jp-viewer { position: relative; top: 0; }
    .jp-viewer .jp-stage { height: auto; min-height: 0; max-height: 78vh; aspect-ratio: auto; }
    .jp-stage-item img { max-height: 78vh; }
    .jp-panel { padding: 18px; }
    .jp-panel .jp-side-actions { margin: 0 -18px -18px; padding: 12px 18px 14px; }
    .jp-modal { padding: 0; }
    .jp-modal-box { width: 100%; height: 100%; border-radius: 0; grid-template-columns: 1fr; grid-template-rows: 46vh minmax(0, 1fr); }
    .jp-modal-box > .jp-modal-x { right: 12px; top: 12px; }
    .jp-modal-side { border-left: 0; }
    .jp-modal-nav { display: none; }
    .jp-stage .jp-modal-nav { display: block; width: 38px; height: 38px; margin-top: -19px; font-size: 22px; }
    .jp-side-scroll { padding: 16px 16px 6px; }
    .jp-modal-side .jp-side-actions { padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); }
    .jp-side-kv { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
    .jp-hero-sub { font-size: 13.5px; }
    .jp-search { height: 48px; }
    .jp-search kbd { display: none; }
    .jp-trending-row { grid-auto-columns: 132px; gap: 10px; }
    .jp-card { border-radius: 12px; }
    .jp-card-body { padding: 8px 9px 9px; }
    .jp-card-title { font-size: 13px; }
    .jp-card-meta .jp-cats { display: none; }
    .jp-card-meta { justify-content: flex-end; }
    .jp-card-copy { opacity: 1; transform: none; height: 26px; padding: 0 8px; font-size: 11.5px; }
    .jp-card-copy span { display: none; }
    .jp-card-hover { display: none; }
    .jp-btn { height: 40px; padding: 0 12px; font-size: 13px; }
    .jp-side-kv { grid-template-columns: 1fr 1fr; }
}
@media (hover: none) {
    .jp-card-copy { opacity: 1; transform: none; }
    .jp-card-hover { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .jp-card, .jp-card-media img, .jp-modal-box { animation: none; transition: none; }
}


/* ---------- 手机端看图修复 ---------- */
.jp-lb-count { position: fixed; left: 50%; top: 18px; transform: translateX(-50%); z-index: 2; padding: 4px 10px; border-radius: 99px; background: rgba(255, 255, 255, .14); color: #fff; font-size: 12.5px; }
.jp-lb-count:empty { display: none; }
@media (max-width: 860px) {
    .jp-viewer .jp-stage { height: auto; min-height: 0; aspect-ratio: var(--jp-ar, 3 / 4); max-height: 75vh; border-radius: 14px; touch-action: pan-y; }
    .jp-stage-item img { max-height: none; }
    .jp-modal-box { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 55vh) minmax(0, 1fr); height: 100%; height: 100dvh; }
    .jp-modal-media { min-width: 0; }
    .jp-modal-media .jp-stage { touch-action: pan-y; }
    .jp-modal-media .jp-thumbs { padding: 6px 10px; }
    .jp-thumbs button { width: 46px; height: 46px; border-radius: 8px; }
    .jp-modal-box > .jp-modal-x { top: calc(10px + env(safe-area-inset-top)); }
    .jp-lightbox .jp-modal-nav { display: block; width: 40px; height: 40px; margin-top: -20px; font-size: 22px; background: rgba(255, 255, 255, .18); }
    .jp-lightbox .jp-modal-nav.prev { left: 8px; }
    .jp-lightbox .jp-modal-nav.next { right: 8px; }
    .jp-lightbox img { max-width: 100vw; max-height: calc(100dvh - 120px); touch-action: pinch-zoom; }
    .jp-lightbox.is-zoom img { width: 200vw; }
    .jp-lightbox .jp-modal-x { top: calc(12px + env(safe-area-inset-top)); right: 12px; }
    .jp-lb-open { bottom: calc(16px + env(safe-area-inset-bottom)); }
}


/* ---------- 首页 AI 提示词模块 ---------- */
.jp-home {
    --jp-bg: var(--background-color, #f7f7fb); --jp-card: var(--front-bg-color, #fff); --jp-title: var(--title-color, #222);
    --jp-text: var(--text-color, #333); --jp-muted: var(--light-text-color, #888); --jp-line: var(--line-color, #eee);
    --jp-grad: linear-gradient(135deg, #7c3aed 0%, #c026d3 55%, #f43f5e 100%);
    margin: 10px 0 24px;
}
.jp-home *, .jp-home *::before { box-sizing: border-box; }
.jp-home-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.jp-home-title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 20px; font-weight: 800; }
.jp-home-title a { color: var(--jp-title) !important; text-decoration: none; }
.jp-home-badge { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; color: #fff; background: var(--jp-grad); }
.jp-home-intro p { margin: 5px 0 0; font-size: 13px; color: var(--jp-muted); }
.jp-home-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.jp-home-cats { display: flex; gap: 6px; margin-right: 4px; }
.jp-home-cats a {
    height: 30px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 99px; font-size: 13px;
    color: var(--jp-text) !important; background: var(--jp-card); border: 1px solid var(--jp-line); text-decoration: none; transition: border-color .15s;
}
.jp-home-cats a:hover { border-color: var(--jp-title); }
.jp-home-btn {
    height: 34px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 10px; font-size: 13px; font-weight: 600;
    color: var(--jp-title) !important; background: var(--jp-card); border: 1px solid var(--jp-line); text-decoration: none;
}
.jp-home-btn.is-primary { color: #fff !important; border: 0; background: var(--jp-grad); box-shadow: 0 8px 20px -10px rgba(192, 38, 211, .8); }
.jp-home-btn:hover { filter: brightness(1.05); }

.jp-bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 250px; gap: 14px; }
.jp-tile { position: relative; border-radius: 16px; overflow: hidden; background: var(--jp-line); border: 0; }
.jp-tile.is-big { grid-column: span 2; grid-row: span 2; }
.jp-tile .jp-card-media { position: absolute; inset: 0; max-height: none; }
.jp-tile .jp-card-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.jp-tile .jp-card-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .25) 0, transparent 28%, transparent 48%, rgba(6, 4, 16, .85) 100%); pointer-events: none; }
.jp-tile-info { position: absolute; left: 12px; right: 12px; bottom: 11px; z-index: 2; color: #fff; display: flex; flex-direction: column; gap: 4px; }
.jp-tile-title { font-size: 13.5px; font-weight: 700; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 1px 8px rgba(0, 0, 0, .4); }
.jp-tile.is-big .jp-tile-title { font-size: 19px; }
.jp-tile-prompt { font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; color: rgba(255, 255, 255, .82); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.jp-tile-meta { font-size: 11.5px; color: rgba(255, 255, 255, .75); }
.jp-tile-acts { position: absolute; right: 10px; top: 10px; z-index: 3; display: flex; gap: 6px; opacity: 0; transform: translateY(-4px); transition: all .2s; }
.jp-tile:hover .jp-tile-acts, .jp-tile:focus-within .jp-tile-acts { opacity: 1; transform: none; }
.jp-tile-act {
    height: 28px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: 8px; border: 0; cursor: pointer;
    font-size: 12px; font-weight: 700; color: #111 !important; background: rgba(255, 255, 255, .94); text-decoration: none; box-shadow: 0 6px 16px rgba(0, 0, 0, .2);
}
.jp-tile-act.is-gen { color: #fff !important; background: var(--jp-grad); }
.jp-tile-act.is-done { background: #22c55e; color: #fff !important; }
.jp-tile .jp-card-badges { left: 10px; top: 10px; }
.jp-tile:hover { transform: translateY(-3px); box-shadow: 0 24px 44px -24px rgba(30, 20, 80, .55); }
.jp-tile:hover .jp-card-media img { transform: scale(1.05); }
.jp-tile-more {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-decoration: none; text-align: center;
    color: #fff !important; background: radial-gradient(120% 90% at 20% 0%, rgba(255, 255, 255, .25), transparent 60%), var(--jp-grad);
    transition: transform .25s, box-shadow .25s;
}
.jp-more-num { font-size: 34px; font-weight: 800; line-height: 1; }
.jp-more-text { font-size: 14px; font-weight: 700; }
.jp-more-sub { font-size: 12px; opacity: .8; }
.jp-tile-more:hover { transform: translateY(-3px); box-shadow: 0 24px 44px -24px rgba(192, 38, 211, .8); }
@media (max-width: 1100px) {
    .jp-bento { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 230px; }
}
@media (max-width: 760px) {
    .jp-home-head { align-items: flex-start; }
    .jp-home-cats { width: 100%; overflow-x: auto; scrollbar-width: none; margin: 0; }
    .jp-home-cats::-webkit-scrollbar { display: none; }
    .jp-home-cats a { flex: none; }
    .jp-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 210px; gap: 10px; }
    .jp-tile { border-radius: 13px; }
    .jp-tile.is-big { grid-column: span 2; grid-row: span 2; }
    .jp-tile.is-big .jp-tile-title { font-size: 16px; }
    .jp-tile[data-i="6"], .jp-tile[data-i="7"] { display: none; }
    .jp-tile-acts { opacity: 1; transform: none; right: 8px; top: 8px; }
    .jp-tile-act { height: 26px; padding: 0 8px; font-size: 11.5px; }
    .jp-tile:not(.is-big) .jp-tile-act:not(.is-gen) { display: none; }
    .jp-more-num { font-size: 28px; }
}
@media (hover: none) { .jp-tile-acts { opacity: 1; transform: none; } }


/* ---------- 首页 AI 资讯模块 ---------- */
.jp-news-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 16px; }
.jp-news-main { position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.jp-news-flag { position: absolute; left: 12px; top: 12px; z-index: 2; padding: 4px 10px; border-radius: 8px; font-size: 12px; font-weight: 700; color: #fff; background: rgba(0, 0, 0, .55); backdrop-filter: blur(8px); }
.jp-news-lead { position: relative; display: block; border-radius: 16px; overflow: hidden; min-height: 300px; aspect-ratio: 16 / 8; background: var(--jp-line); text-decoration: none; }
.jp-news-lead-img, .jp-news-lead-img img { position: absolute; inset: 0; width: 100%; height: 100%; }
.jp-news-lead-img img { object-fit: cover; transition: transform .6s; }
.jp-news-lead:hover .jp-news-lead-img img { transform: scale(1.04); }
.jp-news-lead::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(6, 4, 16, .9)); }
.jp-news-lead-body { position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 2; display: flex; flex-direction: column; gap: 6px; color: #fff; }
.jp-news-lead-title { font-size: 21px; font-weight: 800; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 1px 10px rgba(0, 0, 0, .4); }
.jp-news-lead-ex { font-size: 13px; line-height: 1.6; color: rgba(255, 255, 255, .82); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jp-news-lead .jp-news-meta { color: rgba(255, 255, 255, .7); }
.jp-news-meta { font-size: 12px; color: var(--jp-muted); }
.jp-news-side { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.jp-news-mini { display: flex; flex-direction: column; gap: 8px; padding: 8px; border-radius: 14px; background: var(--jp-card); border: 1px solid var(--jp-line); text-decoration: none; transition: transform .2s, box-shadow .2s; }
.jp-news-mini:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -20px rgba(30, 20, 80, .45); }
.jp-news-mini img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; background: var(--jp-line); }
.jp-news-mini > span { display: flex; flex-direction: column; gap: 4px; padding: 0 2px 2px; }
.jp-news-mini-title { font-size: 13.5px; font-weight: 700; line-height: 1.45; color: var(--jp-title); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jp-news-timeline { display: flex; flex-direction: column; padding: 14px 16px; border-radius: 16px; background: var(--jp-card); border: 1px solid var(--jp-line); min-width: 0; }
.jp-news-tl-head { font-size: 14px; font-weight: 800; color: var(--jp-title); margin-bottom: 6px; }
.jp-news-day { margin: 10px 0 4px; font-size: 12px; font-weight: 700; color: var(--jp-muted); }
.jp-news-item { position: relative; display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 8px; padding: 6px 0 6px 0; text-decoration: none; border-left: 2px solid var(--jp-line); margin-left: 4px; padding-left: 12px; }
.jp-news-item::before { content: ""; position: absolute; left: -6px; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--jp-card); border: 2px solid #a855f7; }
.jp-news-item time { font: 12px/1.6 ui-monospace, Menlo, monospace; color: var(--jp-muted); padding-top: 1px; }
.jp-news-item-title { font-size: 13.5px; line-height: 1.55; color: var(--jp-title); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jp-news-item:hover .jp-news-item-title { color: #7c3aed; }
.jp-news-more { margin-top: auto; padding-top: 10px; font-size: 13px; font-weight: 600; color: #7c3aed !important; text-decoration: none; }
@media (max-width: 900px) {
    .jp-news-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .jp-news-lead { min-height: 220px; aspect-ratio: 4 / 3; }
    .jp-news-lead-title { font-size: 17px; }
    .jp-news-side { grid-template-columns: 1fr; }
    .jp-news-mini { flex-direction: row; align-items: center; }
    .jp-news-mini img { width: 96px; flex: none; aspect-ratio: 4 / 3; }
}

/* 提示词库 hero 按钮 */
.jp-hero-cta { display: flex; justify-content: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.jp-hero-cta .jp-home-btn { height: 38px; padding: 0 16px; font-size: 14px; }
