/* ==========================================================================
   「分享」页面样式
   全部使用主题（pico + style.css）既有变量，深浅色自动跟随 [data-theme]。
   设计原则：无描边、无卡框，用留白 / 发丝线 / 极轻底色分层。
   ========================================================================== */

.share-page {
    --hairline: color-mix(in srgb, var(--color) 13%, transparent);
    --hairline-strong: color-mix(in srgb, var(--color) 24%, transparent);
    --surface: color-mix(in srgb, var(--color) 4.5%, transparent);
    --surface-hover: color-mix(in srgb, var(--color) 7.5%, transparent);
    --share-bg: #ffffff;
    --photo-shadow: 0 1px 2px rgba(2, 6, 23, .06), 0 6px 18px rgba(2, 6, 23, .05);
    --photo-shadow-hover: 0 2px 6px rgba(2, 6, 23, .10), 0 14px 34px rgba(2, 6, 23, .12);
    --radius-photo: 8px;
    --price: #b3261e;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    --ph1: #eef1f5;
    --ph2: #dbe3ec;
    text-align: left;
}

[data-theme="dark"] .share-page {
    --hairline: color-mix(in srgb, #e5e7eb 15%, transparent);
    --hairline-strong: color-mix(in srgb, #e5e7eb 27%, transparent);
    --share-bg: #0b1220;
    --photo-shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 6px 18px rgba(0, 0, 0, .35);
    --photo-shadow-hover: 0 2px 8px rgba(0, 0, 0, .55), 0 16px 38px rgba(0, 0, 0, .45);
    --price: #e8776f;
    --ph1: #1b2432;
    --ph2: #10161f;
}

/* ==========================================================================
   图片占位：每张图带一对内联 --ph1 / --ph2（由 crc32 取色，共 12 组），
   图还没到 / 加载失败时露出来的就是这层渐变，不会是白块或破图图标。
   ========================================================================== */
.share-page img {
    background-color: var(--ph1);
    background-image: linear-gradient(135deg, var(--ph1) 0%, var(--ph2) 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* src 为空（还没轮到时）或加载失败时，让渐变占位完整露出来，不显示破图/alt */
.share-page img[src=""],
.share-page img.is-broken {
    color: transparent;
}

/* ========================== 页首 ========================== */
.share-hero { padding-bottom: 1.4rem; }

.share-hero h1 {
    --typography-spacing-vertical: .5rem;
    letter-spacing: .01em;
}

.share-intro {
    margin: 0;
    color: var(--muted-color);
    font-size: .95rem;
    line-height: 1.8;
}

.share-stats {
    margin: .45rem 0 0;
    color: var(--muted-color);
    font-size: .8rem;
    letter-spacing: .02em;
    font-variant-numeric: tabular-nums;
}

.share-stats i {
    margin: 0 .35em;
    font-style: normal;
    opacity: .5;
}

/* ========================== 小节 / 月份 ========================== */
.share-label {
    display: flex;
    align-items: center;
    gap: .8rem;
    --typography-spacing-vertical: .55rem;
    margin-top: 2.4rem;
    color: var(--muted-color);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.share-label::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: var(--hairline);
}

.share-label .share-label-count {
    order: 3;
    letter-spacing: .02em;
    font-weight: 400;
    text-transform: none;
    font-variant-numeric: tabular-nums;
    opacity: .8;
}

.share-month {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin: 2.2rem 0 .2rem;
    color: var(--muted-color);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .14em;
    font-variant-numeric: tabular-nums;
}

.share-month::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: var(--hairline);
}

/* 发丝线从正文列开始，不压到头像那一列 */
.share-month::before {
    content: "";
    width: 0;
}

.share-feed > .share-month:first-child { margin-top: 1.2rem; }

.share-month-label {
    flex: 0 0 auto;
    color: var(--h4-color);
    letter-spacing: .16em;
}

.share-month-count {
    flex: 0 0 auto;
    color: var(--muted-color);
    font-weight: 400;
    letter-spacing: .04em;
    opacity: .75;
}

/* ========================== 帖子外壳 ==========================
   pico 会把 <article> 渲染成卡片（底色 / 内边距 / 阴影 / 圆角 / overflow 裁剪），
   这里逐项压回透明，否则每条分享都变成一层灰白方框。
   ============================================================== */
.share-item {
    display: flex;
    gap: .9rem;
    align-items: flex-start;
    margin: 0;
    padding: 1.45rem 0 1.3rem;
    position: relative;
    background: transparent;
    background-color: transparent;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
}

.share-item + .share-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 3.3rem;
    right: 0;
    height: 1px;
    background: var(--hairline);
}

.share-avatar {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 100px;
    object-fit: cover;
    background: var(--muted-border-color);
    filter: saturate(.95);
    transition: filter .3s ease;
}

.share-item:hover .share-avatar { filter: saturate(1.06); }

.share-body {
    flex: 1 1 auto;
    min-width: 0;
}

.share-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .5rem;
    line-height: 1.6;
}

.share-name {
    color: var(--color);
    font-size: .92rem;
    font-weight: 700;
    letter-spacing: .01em;
}

.share-head time {
    color: var(--muted-color);
    font-size: .78rem;
    font-variant-numeric: tabular-nums;
}

.share-head .share-place {
    color: var(--muted-color);
    font-size: .78rem;
    display: inline-flex;
    align-items: center;
    gap: .18em;
}

.share-head .share-cat {
    color: var(--muted-color);
    font-size: .78rem;
    opacity: .9;
}

.share-head .share-cat i,
.share-head .share-place i { font-size: .95em; }

/* 正文 */
.share-text {
    margin: .4rem 0 0;
    color: var(--color);
    font-size: .95rem;
    line-height: 1.85;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    text-wrap: pretty;
}

.share-text a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
}

/* 块间距 */
.share-body > * + .share-grid,
.share-body > * + .share-card,
.share-body > .share-grid + .share-card { margin-top: .7rem; }

/* 底部动作 */
.share-foot {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    margin-top: .75rem;
    font-size: .78rem;
    color: var(--muted-color);
    letter-spacing: .02em;
}

.share-foot a {
    display: inline-flex;
    align-items: center;
    gap: .28em;
    color: var(--muted-color);
    text-decoration: none;
    transition: color .22s ease;
}

.share-foot a:hover { color: var(--primary); }

.share-foot .share-foot-right {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: .3em;
    opacity: .75;
}

/* ========================== 图片网格（帖内照片） ========================== */
.share-grid {
    display: grid;
    gap: 6px;
    margin-top: .7rem;
}

.share-grid img {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    border-radius: var(--radius-photo);
    box-shadow: var(--photo-shadow);
    cursor: zoom-in;
    transition: transform .4s cubic-bezier(.22, .61, .36, 1), box-shadow .4s ease;
}

.share-grid img:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: var(--photo-shadow-hover);
}

.share-grid.c1 { grid-template-columns: 1fr; max-width: 300px; }
.share-grid.c1 img { aspect-ratio: 4 / 3; max-height: 340px; }

.share-grid.c2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: calc(66.6667% + 4px);
}

.share-grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.share-grid.c4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: calc(66.6667% + 4px);
}

.share-grid.c5,
.share-grid.c6,
.share-grid.c7,
.share-grid.c8,
.share-grid.c9 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ==========================================================================
   内容卡片（share-card）
   统一：无描边、极轻底色、圆角 10px、hover 加深。不同类型只改内部构图。
   ========================================================================== */
.share-card {
    display: block;
    border-radius: 10px;
    background: var(--surface);
    text-decoration: none;
    color: inherit;
    transition: background-color .25s ease;
    overflow: hidden;
}

.share-card:hover { background: var(--surface-hover); }

.share-card .card-src {
    display: inline-flex;
    align-items: center;
    gap: .3em;
    color: var(--muted-color);
    font-size: .72rem;
    letter-spacing: .04em;
}

.share-card .card-src::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 100px;
    background: currentColor;
    opacity: .85;
}

/* ---------- ① 音乐（网易云 / QQ 音乐 / 酷狗…） ---------- */
.card-music {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .65rem .7rem .7rem;
    position: relative;
}

.card-music .music-cover {
    position: relative;
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--photo-shadow);
    cursor: zoom-in;
}

.card-music .music-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}

.card-music:hover .music-cover img { transform: scale(1.06); }

.card-music .music-info {
    flex: 1 1 auto;
    min-width: 0;
}

.card-music .music-title {
    display: block;
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--h3-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-music .music-artist {
    display: block;
    margin-top: .1rem;
    font-size: .78rem;
    color: var(--muted-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-music .music-src {
    margin-top: .3rem;
    display: inline-flex;
    align-items: center;
    gap: .32em;
    font-size: .7rem;
    letter-spacing: .04em;
    color: var(--muted-color);
}

.card-music .music-src::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 100px;
    background: var(--music-brand, currentColor);
}

.card-music[data-brand="netease"] { --music-brand: #c62828; }
.card-music[data-brand="tencent"] { --music-brand: #2aa46a; }
.card-music[data-brand="kugou"]   { --music-brand: #2b7de9; }
.card-music[data-brand="baidu"]   { --music-brand: #2c6ee8; }

.card-music .music-play {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    border: 1px solid var(--hairline-strong);
    border-radius: 100px;
    background: transparent;
    color: var(--color);
    font-size: .95rem;
    cursor: pointer;
    transition: all .22s ease;
}

.card-music .music-play:hover {
    color: var(--primary);
    border-color: color-mix(in srgb, var(--primary) 55%, transparent);
    background: color-mix(in srgb, var(--primary) 8%, transparent);
}

.card-music .music-play.is-playing {
    color: var(--primary);
    border-color: color-mix(in srgb, var(--primary) 55%, transparent);
}

/* 进度条 */
.card-music .music-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--hairline);
}

.card-music .music-progress span {
    display: block;
    height: 100%;
    width: 0;
    background: color-mix(in srgb, var(--primary) 70%, transparent);
    transition: width .3s linear;
}

/* ---------- ② 游戏（Steam） ---------- */
.card-game {
    display: block;
    position: relative;
}

.card-game .game-cover {
    position: relative;
    aspect-ratio: 460 / 215;
    overflow: hidden;
    cursor: zoom-in;
}

.card-game .game-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .6s cubic-bezier(.22, .61, .36, 1);
}

.card-game:hover .game-cover img { transform: scale(1.03); }

.card-game .game-cover::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 62%;
    background: linear-gradient(to top, rgba(8, 12, 18, .78), rgba(8, 12, 18, 0));
}

.card-game .game-head {
    position: absolute;
    left: .8rem;
    right: .8rem;
    bottom: .65rem;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: .6rem;
    color: #fff;
}

.card-game .game-name {
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.4;
    text-shadow: 0 1px 12px rgba(0, 0, 0, .4);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-game .game-price {
    flex: 0 0 auto;
    padding: .1rem .42rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, .16);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    font-size: .74rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: .02em;
}

.card-game .game-body {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .7rem .6rem;
    font-size: .74rem;
    color: var(--muted-color);
}

.card-game .game-tags {
    display: flex;
    gap: .3rem;
    flex-wrap: wrap;
    min-width: 0;
}

.card-game .game-tags span {
    padding: .05rem .4rem;
    border-radius: 100px;
    background: color-mix(in srgb, var(--color) 8%, transparent);
    font-size: .7rem;
    color: var(--muted-color);
}

.card-game .game-body .card-src { margin-left: auto; }

/* ---------- ③ GitHub 仓库 ---------- */
.card-github {
    padding: .7rem .8rem;
}

.card-github .gh-head {
    display: flex;
    align-items: center;
    gap: .45rem;
    min-width: 0;
}

.card-github .gh-avatar {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    border-radius: 100px;
    object-fit: cover;
}

.card-github .gh-repo {
    font-family: var(--mono);
    font-size: .86rem;
    font-weight: 600;
    color: var(--h3-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-github .gh-repo .gh-owner {
    font-weight: 400;
    color: var(--muted-color);
}

.card-github .gh-desc {
    margin: .3rem 0 0;
    font-size: .8rem;
    line-height: 1.65;
    color: var(--muted-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-github .gh-meta {
    display: flex;
    align-items: center;
    gap: .9rem;
    margin-top: .45rem;
    font-size: .74rem;
    color: var(--muted-color);
    font-variant-numeric: tabular-nums;
}

.card-github .gh-meta span {
    display: inline-flex;
    align-items: center;
    gap: .25em;
}

.card-github .gh-lang::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 100px;
    background: var(--gh-lang, var(--muted-color));
}

/* ---------- ④ 网盘分享 ---------- */
.card-pan {
    padding: .7rem .8rem;
}

.card-pan .pan-head {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .74rem;
    color: var(--muted-color);
}

.card-pan .pan-badge {
    padding: .06rem .45rem;
    border-radius: 100px;
    background: color-mix(in srgb, var(--pan-brand) 15%, transparent);
    color: var(--pan-brand);
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .02em;
}

.card-pan[data-brand="baidu"] { --pan-brand: #2c6ee8; }
.card-pan[data-brand="aliyun"] { --pan-brand: #e8792b; }
.card-pan[data-brand="quark"] { --pan-brand: #7b61ff; }
.card-pan[data-brand="123pan"] { --pan-brand: #1a9bf0; }

.card-pan .pan-name {
    margin-top: .35rem;
    font-size: .88rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--h3-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-pan .pan-foot {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-top: .45rem;
    font-size: .76rem;
    color: var(--muted-color);
}

.card-pan .pan-code {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .1rem .4rem;
    border-radius: 5px;
    background: color-mix(in srgb, var(--color) 8%, transparent);
    font-family: var(--mono);
    font-size: .76rem;
    letter-spacing: .12em;
    color: var(--color);
}

.card-pan .pan-copy {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted-color);
    font-size: .72rem;
    font-family: inherit;
    line-height: 1.4;
    cursor: pointer;
    transition: color .2s ease;
}

.card-pan .pan-copy:hover { color: var(--primary); }
.card-pan .pan-copy.is-done { color: var(--primary); }

.card-pan .pan-size { margin-left: auto; font-variant-numeric: tabular-nums; }

/* ---------- ⑤ 文件下载 ---------- */
.card-file {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .65rem .75rem;
}

.card-file .file-ext {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: color-mix(in srgb, var(--file-color) 14%, transparent);
    color: var(--file-color);
    font-family: var(--mono);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.card-file[data-ext="zip"] { --file-color: #b8860b; }
.card-file[data-ext="pdf"] { --file-color: #c0392b; }
.card-file[data-ext="mp3"] { --file-color: #7b61ff; }
.card-file[data-ext="mp4"] { --file-color: #2aa46a; }
.card-file[data-ext="dmg"] { --file-color: #6b7280; }

.card-file .file-info { flex: 1 1 auto; min-width: 0; }

.card-file .file-name {
    display: block;
    font-size: .86rem;
    font-weight: 600;
    color: var(--h4-color);
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-file .file-meta {
    display: block;
    margin-top: .1rem;
    font-size: .74rem;
    color: var(--muted-color);
    font-variant-numeric: tabular-nums;
}

.card-file .file-dl {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: .3em;
    padding: .18rem .6rem;
    border-radius: 100px;
    background: color-mix(in srgb, var(--primary) 12%, transparent);
    color: var(--primary);
    font-size: .74rem;
    text-decoration: none;
    transition: background-color .22s ease;
}

.card-file .file-dl:hover { background: color-mix(in srgb, var(--primary) 20%, transparent); }

/* ---------- ⑥ 商品（京东 / 淘宝 / 天猫） ---------- */
.card-product {
    display: flex;
    gap: .75rem;
    padding: .65rem .7rem;
}

.card-product .prod-thumb {
    flex: 0 0 auto;
    width: 76px;
    height: 76px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: var(--photo-shadow);
    cursor: zoom-in;
}

.card-product .prod-info { flex: 1 1 auto; min-width: 0; }

.card-product .prod-title {
    font-size: .85rem;
    line-height: 1.55;
    color: var(--h4-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-product .prod-foot {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    margin-top: .4rem;
}

.card-product .prod-price {
    color: var(--price);
    font-size: .95rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.01em;
}

.card-product .prod-price::before { content: "¥"; font-size: .74em; margin-right: .06em; }

.card-product .prod-origin {
    color: var(--muted-color);
    font-size: .74rem;
    text-decoration: line-through;
    font-variant-numeric: tabular-nums;
}

.card-product .prod-badge {
    margin-left: auto;
    padding: .06rem .42rem;
    border-radius: 4px;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: #fff;
    background: var(--prod-brand, #888);
}

.card-product[data-brand="jd"] { --prod-brand: #c62828; }
.card-product[data-brand="taobao"] { --prod-brand: #e8590c; }
.card-product[data-brand="tmall"] { --prod-brand: #d6336c; }

/* ---------- ⑦ 视频（B 站 / YouTube） ---------- */
.card-video .video-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    cursor: pointer;
}

.card-video .video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .6s cubic-bezier(.22, .61, .36, 1);
}

.card-video:hover .video-thumb img { transform: scale(1.03); }

.card-video .video-thumb::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 52%;
    background: linear-gradient(to top, rgba(8, 12, 18, .6), rgba(8, 12, 18, 0));
    pointer-events: none;
}

.card-video .video-duration {
    position: absolute;
    right: .5rem;
    bottom: .5rem;
    z-index: 1;
    padding: .02rem .34rem;
    border-radius: 3px;
    background: rgba(8, 12, 18, .68);
    color: #fff;
    font-size: .68rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: .04em;
}

.card-video .video-info {
    display: flex;
    gap: .75rem;
    padding: .6rem .7rem .65rem;
}

.card-video .video-main {
    flex: 1 1 auto;
    min-width: 0;
}

.card-video .video-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: .86rem;
    font-weight: 600;
    line-height: 1.55;
    color: var(--h4-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-video .video-meta {
    display: block;
    margin-top: .25rem;
    font-size: .74rem;
    color: var(--muted-color);
    font-variant-numeric: tabular-nums;
}

.card-video .video-play {
    flex: 0 0 auto;
    align-self: flex-end;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--hairline-strong);
    border-radius: 100px;
    color: var(--color);
    font-size: .85rem;
    transition: all .22s ease;
}

.card-video:hover .video-play {
    color: var(--primary);
    border-color: color-mix(in srgb, var(--primary) 55%, transparent);
    background: color-mix(in srgb, var(--primary) 8%, transparent);
}

/* ---------- ⑧ 通用链接 ---------- */
.card-link {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .55rem .7rem;
}

/* -------------------- 品牌化卡片 --------------------
   每个平台一个专属主色 + 图标；抖音/小红书/Instagram 用双色渐变 chip，
   颜色由服务端内联 --brand / --brand-dark / --g1 / --g2 传入 */
.card-link .brand-chip {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    line-height: 1;
    color: var(--brand, var(--muted-color));
    background: color-mix(in srgb, var(--brand, var(--muted-color)) 13%, transparent);
}
[data-theme="dark"] .card-link .brand-chip {
    color: var(--brand-dark, var(--brand));
    background: color-mix(in srgb, var(--brand-dark, var(--brand)) 17%, transparent);
}
.card-link .brand-chip.is-grad,
[data-theme="dark"] .card-link .brand-chip.is-grad {
    color: #fff;
    background: linear-gradient(135deg, var(--g1), var(--g2));
}
.card-link.card-brand .link-desc {
    color: var(--brand, var(--muted-color));
    opacity: .85;
}
[data-theme="dark"] .card-link.card-brand .link-desc {
    color: var(--brand-dark, var(--brand));
}
.card-brand .link-info {
    min-width: 0;
}
.share-card.card-brand:hover {
    background: color-mix(in srgb, var(--brand, var(--surface-hover)) 6%, var(--surface-hover));
}
[data-theme="dark"] .share-card.card-brand:hover {
    background: color-mix(in srgb, var(--brand-dark, var(--surface-hover)) 10%, var(--surface-hover));
}

.card-link .link-favicon {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--color) 9%, transparent);
    color: var(--muted-color);
    font-size: .8rem;
}

.card-link .link-info { flex: 1 1 auto; min-width: 0; }

.card-link .link-title {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--h4-color);
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-link .link-desc {
    display: block;
    margin-top: .05rem;
    font-size: .74rem;
    color: var(--muted-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-link .link-thumb {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 7px;
    object-fit: cover;
    cursor: zoom-in;
}

.link-arrow {
    flex: 0 0 auto;
    color: var(--muted-color);
    font-size: .8rem;
    transition: transform .22s ease, color .22s ease;
}

.share-card:hover .link-arrow {
    transform: translateX(2px);
    color: var(--primary);
}

/* ---------- ⑨ 引用块 ----------
   pico 给 blockquote 加了 10px 左边框、卡片阴影和巨大的引号伪元素，这里全部压掉。 */
.share-quote {
    margin: .7rem 0 0;
    padding: .1rem 0 .1rem .8rem;
    border: 0;
    border-left: 2px solid var(--hairline-strong);
    border-radius: 0;
    background: none;
    /* style.css 给 blockquote 加的是 !important 阴影，这里必须同样加 !important 才压得住 */
    box-shadow: none !important;
    color: var(--muted-color);
    font-family: inherit;
    font-size: .9rem;
    line-height: 1.8;
}

.share-quote::before { content: none; }

.share-quote cite {
    display: block;
    margin-top: .2rem;
    font-size: .74rem;
    font-style: normal;
    opacity: .8;
}

/* ==========================================================================
   相册帖：分层折叠 + 渐变淡出
   ========================================================================== */
.share-album .album-title {
    margin: .45rem 0 0;
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.6;
    color: var(--color);
    letter-spacing: .01em;
}

.share-album .album-desc {
    margin: .2rem 0 0;
    color: var(--muted-color);
    font-size: .82rem;
    line-height: 1.7;
}

.album-clip {
    position: relative;
    margin-top: .7rem;
    overflow: hidden;
    /* JS 未运行时给一个保守高度，保证不把整墙照片一次性铺满 */
    max-height: 330px;
    transition: max-height .42s cubic-bezier(.22, .61, .36, 1);
}

.album-clip.is-open { max-height: none; }

.album-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.album-grid img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    border-radius: var(--radius-photo);
    box-shadow: var(--photo-shadow);
    cursor: zoom-in;
    transition: transform .4s cubic-bezier(.22, .61, .36, 1), box-shadow .4s ease;
}

.album-grid img:hover {
    transform: translateY(-2px) scale(1.015);
    box-shadow: var(--photo-shadow-hover);
}

/* 渐变遮罩：最后半行逐渐变浅 */
.album-fade {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 46%;
    background: linear-gradient(to bottom,
        color-mix(in srgb, var(--share-bg) 0%, transparent) 0%,
        color-mix(in srgb, var(--share-bg) 72%, transparent) 46%,
        var(--share-bg) 100%);
    pointer-events: none;
    opacity: 1;
    transition: opacity .3s ease;
}

.album-clip.is-open .album-fade { opacity: 0; }

/* 展开按钮 */
.album-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .35em;
    width: 100%;
    margin: .55rem 0 0;
    padding: .35rem 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--muted-color);
    font-family: inherit;
    font-size: .78rem;
    letter-spacing: .04em;
    line-height: 1.6;
    box-shadow: none;
    cursor: pointer;
    transition: color .22s ease;
}

.album-toggle:hover { color: var(--primary); }

.album-toggle .czs-arrow-down-l {
    font-size: .9em;
    transition: transform .3s ease;
}

.album-toggle.is-open .czs-arrow-down-l { transform: rotate(180deg); }

.album-toggle-text {
    letter-spacing: .02em;
}

.album-count {
    color: var(--muted-color);
    font-size: .74rem;
    font-variant-numeric: tabular-nums;
    opacity: .85;
}

/* ========================== 空状态 ========================== */
.share-empty {
    margin: 1.6rem 0;
    padding: 1.6rem 1.2rem;
    border-radius: 12px;
    background: var(--surface);
    color: var(--muted-color);
    font-size: .88rem;
    line-height: 1.9;
    text-align: center;
}

.share-empty p { margin: 0; }

.share-empty p + p { margin-top: .4rem; }

.share-empty code {
    padding: .1em .38em;
    border-radius: .22rem;
    background: color-mix(in srgb, var(--color) 9%, transparent);
    color: var(--color);
}

/* ========================== 加载更多 ========================== */
.share-more-wrap {
    display: flex;
    justify-content: center;
    margin: 2rem 0 .4rem;
}

.share-more {
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    width: auto;
    margin: 0;
    padding: .5rem 1.15rem;
    border: 1px solid var(--hairline-strong);
    border-radius: 100px;
    background: transparent;
    color: var(--muted-color);
    font-size: .82rem;
    line-height: 1.4;
    cursor: pointer;
    transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}

.share-more:hover {
    color: var(--primary);
    border-color: color-mix(in srgb, var(--primary) 45%, transparent);
    background: var(--surface);
}

.share-more i {
    font-size: .9em;
    transition: transform .3s ease;
}

.share-more.is-loading {
    opacity: .65;
    pointer-events: none;
}

.share-more.is-loading i {
    animation: share-more-spin .9s linear infinite;
}

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

/* ========================== 结尾 / 说明 ========================== */
.share-end {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin: 2.4rem 0 1rem;
    color: var(--muted-color);
    font-size: .78rem;
    letter-spacing: .14em;
}

.share-end::before,
.share-end::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: var(--hairline);
}

.share-note {
    margin-top: 1.2rem;
    color: var(--muted-color);
    font-size: .82rem;
    line-height: 1.8;
}

.share-note h3 {
    --typography-spacing-vertical: .45rem;
    font-size: .88rem;
    color: var(--h4-color);
}

.share-note code {
    padding: .1em .36em;
    border-radius: .22rem;
    background: color-mix(in srgb, var(--color) 8%, transparent);
    color: var(--color);
    font-size: .88em;
}

.share-note table {
    width: 100%;
    margin-top: .5rem;
    border-collapse: collapse;
    font-size: .78rem;
}

.share-note th,
.share-note td {
    padding: .34rem .5rem;
    border-bottom: 1px solid var(--hairline);
    text-align: left;
}

.share-note th {
    color: var(--h4-color);
    font-weight: 600;
}

/* ========================== 灯箱 ========================== */
.share-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .9rem;
    padding: 2.4rem;
    background: rgba(8, 12, 18, .9);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    cursor: zoom-out;
    opacity: 0;
    transition: opacity .28s ease;
}

.share-lightbox.open { display: flex; opacity: 1; }

.share-lightbox img {
    max-width: min(92vw, 1100px);
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, .55);
    animation: share-pop .32s cubic-bezier(.22, .61, .36, 1);
}

.share-lightbox figcaption {
    color: rgba(255, 255, 255, .78);
    font-size: .8rem;
    letter-spacing: .04em;
    text-align: center;
}

.share-lightbox .share-lightbox-close {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 100px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color .2s ease;
}

.share-lightbox .share-lightbox-close:hover { background: rgba(255, 255, 255, .22); }

/* 上一张 / 下一张：多图时才会出现 */
.share-lightbox .share-lightbox-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 100px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background-color .2s ease, opacity .2s ease;
}

.share-lightbox .share-lightbox-nav:hover { background: rgba(255, 255, 255, .26); }
.share-lightbox .share-lightbox-nav[hidden] { display: none; }
.share-lightbox .share-lightbox-nav.is-prev { left: 1.2rem; }
.share-lightbox .share-lightbox-nav.is-next { right: 1.2rem; }

/* 右下角的 3 / 9 计数 */
.share-lightbox .share-lightbox-count {
    position: absolute;
    bottom: 1.2rem;
    right: 1.4rem;
    padding: .25rem .6rem;
    border-radius: 100px;
    background: rgba(255, 255, 255, .12);
    color: rgba(255, 255, 255, .8);
    font-size: .75rem;
    letter-spacing: .04em;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 576px) {
    .share-lightbox .share-lightbox-nav {
        width: 38px;
        height: 38px;
        font-size: 1.25rem;
    }
    .share-lightbox .share-lightbox-nav.is-prev { left: .5rem; }
    .share-lightbox .share-lightbox-nav.is-next { right: .5rem; }
}

@keyframes share-pop {
    from { transform: scale(.965); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

/* ========================== 回到顶部 ========================== */

/* 主题右下角已有 #fab（阅读工具）：right 16 / bottom 16 / 48x48。
   这里并排放在它左边，尺寸和描边跟它保持一致，看起来是同一组按钮。 */
.share-top {
    position: fixed;
    right: 72px;          /* #fab 右边缘 16+48=64，再留 8px */
    bottom: 16px;
    z-index: 9999;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    border: 1px solid var(--fab-bd, var(--hairline));
    border-radius: 50%;
    background: var(--fab-bg, var(--share-bg));
    color: var(--fab-fg, var(--color));
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--fab-shadow, 0 10px 28px rgba(0, 0, 0, .12));
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s, background-color .2s ease;
}

/* 没有 #fab 时贴回右边 */
.share-top.is-alone { right: 16px; }

.share-top.is-on {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.share-top:hover {
    background: var(--panel-hover, var(--surface-hover));
    transform: translateY(-2px);
}

.share-top:active { transform: translateY(0); }

.share-top i { pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
    .share-top { transition: opacity .2s ease, visibility .2s; }
    .share-top.is-on { transform: none; }
    .share-top:hover { transform: none; }
}

/* ========================== AI 分享卡 ========================== */
/* 视觉上刻意沿用分享页链接卡（.share-card）那套语言：
   无描边、极轻底色 --surface、圆角 10px、hover 加深。
   卡片是纯文字的，只有一个小图标和强调色做点缀，不抢正文。 */
.ai-card-slot { margin: .65rem 0 .1rem; }

/* .share-text 默认收缩宽度，卡片会跟着正文长短忽宽忽窄。
   只对含卡片的条目把文本列撑开，普通帖子不受影响。 */
.share-item:has(> .share-text > .ai-card-slot) .share-text {
    flex: 1 1 auto;
    min-width: 0;
}

.ai-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.ai-card {
    --ai-accent: #64748b;
    position: relative;
    display: flex;
    align-items: center;
    gap: .68rem;
    padding: .55rem .7rem;
    border-radius: 10px;
    background: var(--surface);
    transition: background-color .25s ease;
}

.ai-card:hover { background: var(--surface-hover); }

.ai-accent-blue   { --ai-accent: #2f7cf6; }
.ai-accent-green  { --ai-accent: #1f9d63; }
.ai-accent-amber  { --ai-accent: #d98014; }
.ai-accent-rose   { --ai-accent: #e0457b; }
.ai-accent-violet { --ai-accent: #7c5cf0; }
.ai-accent-slate  { --ai-accent: #5b6b7c; }

[data-theme="dark"] .ai-accent-blue   { --ai-accent: #5b9cff; }
[data-theme="dark"] .ai-accent-green  { --ai-accent: #34c98a; }
[data-theme="dark"] .ai-accent-amber  { --ai-accent: #e8a13c; }
[data-theme="dark"] .ai-accent-rose   { --ai-accent: #f2679b; }
[data-theme="dark"] .ai-accent-violet { --ai-accent: #a08bff; }
[data-theme="dark"] .ai-accent-slate  { --ai-accent: #8fa0b2; }

/* ---------- 小图标：和链接卡的 brand-chip 同一个尺寸语言 ---------- */
.ai-icon {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    line-height: 1;
    font-weight: 600;
    color: color-mix(in srgb, var(--ai-accent) 88%, var(--color));
    background: color-mix(in srgb, var(--ai-accent) 12%, transparent);
}

/* ---------- 主体 ---------- */
.ai-body {
    flex: 1 1 auto;
    min-width: 0;
}

.ai-title {
    margin: 0;
    font-size: .85rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--h4-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-sub {
    margin: .02rem 0 0;
    font-size: .74rem;
    line-height: 1.45;
    color: var(--muted-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-desc {
    margin: .04rem 0 0;
    font-size: .74rem;
    line-height: 1.5;
    color: var(--muted-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- 价格 / 评分 / 元信息 ---------- */
.ai-facts {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .1rem .45rem;
    margin-top: .1rem;
}

.ai-price {
    font-size: .8rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: color-mix(in srgb, var(--ai-accent) 88%, var(--color));
}

.ai-rating {
    font-size: .71rem;
    font-weight: 600;
    color: color-mix(in srgb, var(--ai-accent) 82%, var(--color));
}

.ai-fact {
    font-size: .71rem;
    color: var(--muted-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* ---------- 标签：跟着右侧走，不占一整行 ---------- */
.ai-tags {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: .22rem;
    margin-left: auto;
    max-width: 34%;
    overflow: hidden;
}

.ai-tags span {
    padding: .02rem .36rem;
    border-radius: 5px;
    font-size: .68rem;
    line-height: 1.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--muted-color);
    background: color-mix(in srgb, var(--color) 6.5%, transparent);
}

/* 链接版式最右边的箭头 */
.ai-go {
    flex: 0 0 auto;
    font-size: .85rem;
    line-height: 1;
    color: var(--muted-color);
    opacity: .7;
    transition: opacity .2s ease, transform .2s ease;
}

.ai-card-link:hover .ai-go { opacity: 1; transform: translate(1px, -1px); }

/* ---------- 骨架二：hero（引言 / 数字，居中） ---------- */
.ai-k-quote,
.ai-k-stat {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .1rem;
    padding: .9rem 1rem .95rem;
    text-align: center;
}

.ai-hero {
    margin: 0;
    font-size: .92rem;
    font-weight: 600;
    line-height: 1.55;
    letter-spacing: -.005em;
    color: var(--h4-color);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.ai-quote-mark {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.5rem;
    line-height: .8;
    color: var(--ai-accent);
    opacity: .45;
}

.ai-by {
    margin-top: .1rem;
    font-size: .71rem;
    color: var(--muted-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.ai-bye::before { content: "— "; }

.ai-hero-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: .15rem;
    max-width: 100%;
}

.ai-num {
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
    color: color-mix(in srgb, var(--ai-accent) 88%, var(--color));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.ai-unit {
    flex: 0 0 auto;
    font-style: normal;
    font-size: .76rem;
    font-weight: 600;
    color: var(--muted-color);
}

.ai-hero-desc {
    margin: .08rem 0 0;
    font-size: .78rem;
    line-height: 1.5;
    color: var(--muted-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- 骨架三：清单 ---------- */
.ai-k-fact {
    flex-direction: column;
    align-items: stretch;
    gap: .2rem;
    padding: .6rem .75rem .62rem;
}

.ai-title-sm { font-size: .78rem; color: var(--muted-color); font-weight: 500; }

.ai-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .18rem .55rem;
}

.ai-list li {
    display: inline-flex;
    align-items: center;
    gap: .32rem;
    font-size: .79rem;
    line-height: 1.5;
    color: var(--color);
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-list li::before {
    content: "";
    flex: 0 0 auto;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--ai-accent);
    opacity: .85;
}

/* ---------- 骨架四：plain ---------- */
.ai-k-note {
    flex-direction: column;
    align-items: stretch;
    gap: .04rem;
    padding: .62rem .78rem .64rem;
}

.ai-k-note .ai-title { font-size: .85rem; }

.ai-k-note .ai-tags {
    margin-left: 0;
    max-width: 100%;
    margin-top: .22rem;
}

/* ---------- 生成中的占位 ---------- */
.ai-card-loading {
    justify-content: center;
    gap: .45rem;
    padding: .8rem 1rem;
    color: var(--muted-color);
    font-size: .78rem;
}

.ai-loading-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--muted-color);
    animation: ai-pulse 1.1s ease-in-out infinite;
}

@keyframes ai-pulse {
    0%, 100% { opacity: .25; transform: scale(.85); }
    50%      { opacity: .85; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .ai-loading-dot { animation: none; opacity: .6; }
}

/* ========================== 响应式 ========================== */
@media (max-width: 576px) {
    .ai-card { gap: .58rem; padding: .5rem .6rem; }
    .ai-icon { width: 26px; height: 26px; border-radius: 7px; font-size: .85rem; }
    .ai-title { font-size: .82rem; }
    .ai-tags { max-width: 28%; }
    .ai-k-quote, .ai-k-stat { padding: .8rem .85rem .85rem; }
    .ai-hero { font-size: .88rem; }
    .ai-num { font-size: 1.5rem; }
    .share-top { right: 68px; bottom: 12px; }
    .share-top.is-alone { right: 12px; }
    .share-item { gap: .6rem; padding: 1.15rem 0 1.05rem; }
    .share-avatar { width: 32px; height: 32px; }
    .share-item + .share-item::before { left: 2.6rem; }
    .share-text { font-size: .93rem; }
    .share-grid.c1 { max-width: 200px; }
    .share-foot { gap: .85rem; }
    .card-music { gap: .6rem; }
    .card-music .music-cover { width: 48px; height: 48px; }
    .card-product .prod-thumb { width: 64px; height: 64px; }
    .share-lightbox { padding: 1.2rem; }
    .share-hero h1 { font-size: 1.6rem; }
    .share-intro { font-size: .9rem; }
    .share-month { margin: 1.8rem 0 .1rem; letter-spacing: .1em; }
    .album-toggle { font-size: .78rem; }
    .share-more { padding: .48rem 1rem; }
    .share-empty { padding: 1.3rem 1rem; }
}