@charset "UTF-8";
/**
 * 加载顺序在 style.css 之后，只做版式层面的差量，不改任何既有类名：
 *   1) 容器 1200px；主栏 + 340px 侧栏；栏距 1.5rem
 *   2) 列表卡与侧栏卡扁平化：去掉阴影，改发丝描边
 *   3) 列表卡正文留白与标题字号放大，单栏阅读更舒展
 *   4) 侧栏在 1120px 收起（原 960px）
 */

/* 1. 容器与双栏 */
.shell {
    max-width: 1200px;
    padding: 32px 24px 96px;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 1.5rem;
}

.masthead-bar,
.site-footer__inner,
.site-footer__legal,
.site-hero-dynamic .site-hero-inner,
.site-hero-dynamic .portal-dynamic {
    max-width: 1200px;
}

.site-hero-dynamic .portal-dynamic {
    gap: 1rem;
}

.side-col { top: 88px; }

/* 2. 扁平卡片：只留底色差与一条发丝线 */
.post-card,
.side-col .card,
.side-col .side-mod {
    box-shadow: none;
    border: 1px solid var(--line-2);
}

.post-card { border-radius: 10px; }
.post-card:hover { border-color: var(--line); }

/* 面包屑导航：位置与信息层级同 Alpha，视觉按 conch 扁平语言（无投影、无底色） */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 1.25rem;
    font-size: 13px;
    line-height: 1.6;
    color: var(--ink-3);
}
.breadcrumb a { color: var(--ink-2); text-decoration: none; transition: color .2s; }
.breadcrumb a:hover { color: var(--accent-ink); }
.breadcrumb-sep { color: var(--ink-3); opacity: .55; }
.breadcrumb-current { color: var(--ink); }

.post-list { gap: 1.5rem; }

/* 3. 单栏阅读节奏 */
.post-body { padding: 28px 30px 26px; }
.post-title { font-size: 20px; line-height: 1.45; letter-spacing: -.02em; }
.post-desc { margin-top: 10px; font-size: 14px; line-height: 1.7; color: var(--ink-2); }
.diary-card { padding: 1.75rem; }

/* 3.5 右侧模块内边距统一 1.5rem（原 1.25rem）；侧栏卡片间距同步 1.5rem */
.side-col { gap: 1.5rem; }
.side-col .card-header { padding: 0 1.5rem; }
.side-col .side-post-list { padding: 0 1.5rem; }
.side-col .cm-stream { padding: .35rem 1.5rem .9rem; }
.side-col .hot-article { padding: 1.5rem; }
.side-col .tag-cloud { padding: 1.5rem; }
.side-col .blogsort { padding: 1.5rem; }
.side-col .link-list { padding: 1.5rem; }
.side-col .whisper { padding: 1.5rem; }
.side-col .side-calendar { padding: 1.5rem; }
.side-col .side-search { margin: 1.5rem; }
.side-col .sidebar-archive-wrap { margin: 1.5rem; }
.side-col .side-mod { padding: 1.5rem; }
.side-col .side-mod.side-profile { padding: 0; }

/* 3.6 详情页卡片：内边距 1.75rem（原 2rem），保留投影 */
.post-detail {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--shadow);
}

/* 4. 断点：1120px 收起侧栏 */
@media (max-width: 1120px) {
    .shell { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
    .side-col { position: static; }
}

@media (max-width: 720px) {
    .shell { padding: 20px 16px 40px; gap: 1rem; }
    .post-list { gap: 1rem; }
    .post-body { padding: 20px; }
    .post-title { font-size: 18px; }
    .diary-card { padding: 20px; }

    /* ---- 文章详情页：移动端排版 ---- */
    .post-detail { padding: 20px 16px; border-radius: 12px; }
    .detail-head { padding-bottom: 16px; margin-bottom: 18px; }
    .detail-title { font-size: 22px; line-height: 1.4; letter-spacing: -.01em; }
    .detail-title .badge { vertical-align: 2px; margin-left: 6px; }
    .detail-head .post-meta.detail-meta { margin-top: 12px; gap: 6px 12px; font-size: 12px; }
    .detail-meta > * + * { margin-left: 12px; }
    .detail-meta > * + *::before { left: -7px; }
    .detail-meta > .detail-cat { margin-left: 0; }
    .detail-cover { margin-bottom: 18px; }

    .detail-content { font-size: 15.5px; line-height: 1.85; letter-spacing: 0; }
    .detail-content p { margin: 0 0 1.2em; }
    .detail-content h1 { margin-top: 1.6em; font-size: 22px; }
    .detail-content h2 { font-size: 18px; padding-left: 12px; margin: 1.8em 0 .7em; }
    .detail-content h2::before { width: 3px; }
    .detail-content h3 { font-size: 16.5px; }
    .detail-content h4 { font-size: 15.5px; }
    .detail-content ul,
    .detail-content ol { margin-bottom: 1.2em; padding-left: 1.25em; }
    .detail-content blockquote { margin: 1.4em 0; padding: 12px 14px; border-left-width: 2px; }
    .detail-content img { margin: 1.4em auto; border-radius: 8px; }
    .detail-content p:has(> img:only-child) { margin-bottom: 1.4em; }
    .detail-content pre { margin: 1.4em 0; padding: 14px 14px; border-radius: 10px; }
    .detail-content pre code { font-size: 12.5px; }
    .detail-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 1.4em 0;
        font-size: 13.5px;
        white-space: nowrap;
    }
    .detail-content th,
    .detail-content td { padding: 8px 10px; }
    .detail-content hr { margin: 2em 0; }

    .detail-tags { margin-top: 24px; padding-top: 16px; gap: 6px; }
    .neighbor { gap: 10px; margin-top: 22px; }
    .neighbor-item { padding: 13px 14px; }
    .neighbor-title { font-size: 14px; }
    .detail-comments { margin-top: 24px; padding-top: 18px; }
    .comments-title { margin-bottom: 12px; }

    /* 移动端侧栏：间距与内边距同步收一档（1.5rem → 1.25rem） */
    .side-col { gap: 1.25rem; }
    .side-col .card-header { padding: 0 1.25rem; }
    .side-col .side-post-list { padding: 0 1.25rem; }
    .side-col .cm-stream { padding: .35rem 1.25rem .9rem; }
    .side-col .hot-article,
    .side-col .tag-cloud,
    .side-col .blogsort,
    .side-col .link-list,
    .side-col .whisper,
    .side-col .side-calendar,
    .side-col .side-mod { padding: 1.25rem; }
    .side-col .side-mod.side-profile { padding: 0; }
    .side-col .side-search,
    .side-col .sidebar-archive-wrap { margin: 1.25rem; }
}

/* ================================================================
   5. 说说（日记）列表卡：头部成组、正文舒展、评论区轻量化
   注意：talk-comment.css 在本文件之后加载，评论区须用
   .diary-card .talk-* 提权，否则覆盖不动
   ================================================================ */

/* 5.1 头部：头像 + 昵称/时间两行，管理操作降权贴右
   头像形态交回 style.css 原稿（45px / 6px 圆角方形），此处不再覆盖 */
.diary-top {
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 1rem;
}
.diary-body { flex: 1 1 auto; min-width: 0; }
.diary-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.diary-name { font-size: 14.5px; font-weight: 600; line-height: 1.4; letter-spacing: -.01em; }
.diary-private { margin-left: 0; padding: 2px 8px; font-size: 11px; line-height: 1.6; border-radius: 999px; vertical-align: 0; }
.diary-sub { margin-top: 5px; gap: 4px 6px; font-size: 12px; line-height: 1.6; }
.diary-sub > * + *::before { margin-right: 6px; opacity: .35; }
.diary-sub .ci { font-size: 11.5px; margin-right: 2px; }
.diary-sub > .diary-edit,
.diary-sub > .privacy-toggle { font-size: 11.5px; }

/* 5.2 正文：标题做胶囊小标，正文回到主文字色 */
.diary-content { font-size: 15px; line-height: 1.7; color: var(--ink); margin: 1.25rem 0; }
.diary-text { white-space: pre-wrap; word-break: break-word; }

/* 5.2.1 纯文字收尾的视觉对齐：line-height 1.7 在 15px 末行下方留 ≈5px 半行距，
   图片卡/音乐卡以盒子收尾没有这段空隙，所以文字卡末元素单独折回，
   卡片与「原文/评论」的视觉间距才和别的说说一致 */
.diary-card:not(:has(.kwm-inline)):not(:has(.list-image)) > .diary-content > .diary-text:last-child,
.diary-card:not(:has(.kwm-inline)):not(:has(.list-image)) > .diary-content > .diaryopenhtml:last-child > p:last-child,
.diary-card:not(:has(.kwm-inline)):not(:has(.list-image)) > .diary-content > .diaryopenhtml:last-child:not(:has(p)) { margin-bottom: -5px; }
.diary-title {
    line-height: 1;
    color: var(--accent-ink);
    word-break: break-word;
    letter-spacing: .5px;
    word-wrap: break-word;
    display: block;
    margin-bottom: .5rem;
    font-size: 16px;
}
.diary-title:hover { opacity: .82; }

/* 5.3 HTML 摘要：段落节奏、引用、代码、播放器圆角统一 */
.diaryopenhtml > :first-child { margin-top: 0; }
.diaryopenhtml > :last-child { margin-bottom: 0; }
.diaryopenhtml p { margin: 0 0 .72em; }
.diaryopenhtml p:last-child { margin-bottom: 0; }
/* 空段落不占高度：音乐内联卡被拆包后留下的空 p（渲染时也会被 conch_strip_empty_p 清掉） */
.diaryopenhtml p:empty { display: none; }
/* 内联音乐卡：底部外边距会穿过段落折叠到卡片下方，留出一块空白；底边归零，间距只由上方段落决定 */
.diaryopenhtml .kwm-inline { margin-bottom: 0; }
.diaryopenhtml p:has(> .kwm-inline) { margin-bottom: 0; }
.diaryopenhtml h1,
.diaryopenhtml h2,
.diaryopenhtml h3,
.diaryopenhtml h4 { margin: .9em 0 .5em; font-size: 15.5px; font-weight: 600; line-height: 1.6; color: var(--ink); }
.diaryopenhtml img { border-radius: 8px; }
.diaryopenhtml blockquote {
    margin: .8em 0;
    padding: .35em .9em;
    border-left: 2px solid color-mix(in srgb, var(--accent) 40%, var(--line));
    border-radius: 0 6px 6px 0;
    background: var(--paper-2);
    color: var(--ink-2);
}
.diaryopenhtml code {
    padding: 1px 5px;
    border-radius: 4px;
    background: var(--paper-2);
    font-family: var(--mono);
    font-size: .88em;
    color: var(--ink-2);
}
.diaryopenhtml pre {
    margin: .8em 0;
    padding: 12px 14px;
    border-radius: 8px;
    background: var(--paper-2);
    overflow-x: auto;
    font-size: 12.5px;
    line-height: 1.7;
}
.diaryopenhtml pre code { padding: 0; background: none; }
.diaryopenhtml .em-douyin-video { margin: 1rem 0; }
.diaryopenhtml .em-douyin-video-wrapper { border-radius: 10px; box-shadow: none; }

/* 5.4 九宫格：贴合卡宽，单图/双图按内容收窄 */
.list-image { max-width: min(100%, 600px); gap: 6px; margin-top: 12px; }
.list-image li { border-radius: 8px; }
.list-image:has(li:only-child) { grid-template-columns: minmax(0, 1fr); max-width: min(100%, 460px); }
.list-image:has(li:only-child) li { aspect-ratio: 4 / 3; }
.list-image:has(li:nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* 恰好 4 张：2×2。此前缺这条会落成 3+1，末行单张只占 1/3 宽；
   宽度收到 400px，使每格约 196px，与 9 图九宫格的格子尺寸一致 */
.list-image:has(li:nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: min(100%, 400px); }

/* 5.5 评论区：只留与正文的间距，字号/行高/形态全部交给 talk-comment.css
   这里再写 font-size / line-height 会和头像高度对不上，已移除 */
.diary-card .talk-comments { margin-top: 14px; }

/* 5.6 移动端 */
@media (max-width: 720px) {
    .diary-top { gap: 10px; margin-bottom: 12px; }
    .diary-content { margin: 1rem 0; }
    .diary-content, .diary-text { font-size: 14.5px; }
    .diary-sub { margin-top: 4px; font-size: 11.5px; }
    .diary-title { font-size: 15px; }
    .diary-card .talk-comments { margin-top: 12px; }
    .list-image { max-width: 100%; }
}

/* ================================================================
   6. 首页 Hero 文案区：文案已删除（2026-10-27）
   kicker / 标题 / 导语的字号、颜色、字距、行高、阴影规则已全部移除，
   这里只留一块等高的空白占位，用来撑住下方卡片的位置。
   高度按原排版的真实度量反推（不再有文字，只还原它占过的纵向空间）：
     kicker 行盒 12px × 1.8 = 21.6px，下边距 20px
     + 标题 1.1 × 字号 × 行数（行数由 PHP 传入）
     + 导语上边距 22px + 导语行盒 16px × 1.9 = 30.4px
   合计 94px + 标题高度
   ================================================================ */
.site-hero-dynamic .site-hero-blank {
    height: calc(94px + 1.1 * clamp(48px, 4.6vw, 74px) * var(--hero-lines, 1));
}

/* 矮屏（≤900px 高）：标题字号降到 60px 上限、导语上边距 18px，合计 90px */
@media (max-height: 900px) and (min-width: 1081px) {
    .site-hero-dynamic .site-hero-blank {
        height: calc(90px + 1.1 * clamp(40px, 4.2vw, 60px) * var(--hero-lines, 1));
    }
}

/* ================================================================
   7. 移动端不展示 Hero（≤640px）
   移动端 Hero 与音乐卡的全部定制规则（原 7 / 8.6 / 9 / 10 / 11 /
   11.1 段）已整段移除，这里只保留一条关闭规则。
   ================================================================ */
@media (max-width: 640px) {
    .site-hero-dynamic { display: none !important; }
}

/* ================================================================
   8. 首页 Hero 收窄：模块 910px，卡片区整体小一档
   只覆盖尺寸，不改栅格列数与类名；断点排列仍由 style.css 决定
   ================================================================ */
.site-hero-dynamic .site-hero-inner,
.site-hero-dynamic .portal-dynamic { max-width: 910px; }

/* 桌面端两行卡片高度与间距同步收一档；≤1080px 的 auto 行高交给
   style.css，这里用断点隔离，避免把窄屏排列顶死 */
@media (min-width: 1081px) {
    .site-hero-dynamic .portal-dynamic {
        margin-top: 34px;
        grid-template-rows: 130px 200px;
    }
}

/* 卡片：内边距 / 圆角 / 内部间距一起缩，保持同一套设计语言 */
.site-hero-dynamic .portal-dynamic .portal-tile,
.site-hero-dynamic .portal-dynamic .portal-weather {
    padding: 15px;
    border-radius: 22px;
    gap: 8px;
}
.site-hero-dynamic .portal-dynamic .portal-links-count { margin-top: 9px; }

/* 路牌 */
.site-hero-dynamic .portal-dynamic .road-sign-face { padding: 13px 22px 10px; gap: 6px; }
.site-hero-dynamic .portal-dynamic .road-sign-quote { font-size: clamp(23px, 2vw, 28px); }
.site-hero-dynamic .portal-dynamic .road-sign-base { min-height: 38px; padding: 0 18px; gap: 10px; }

/* 天气卡 */
.site-hero-dynamic .portal-dynamic .portal-weather .side-weather-icon { width: 68px; height: 68px; top: -28px; }
.site-hero-dynamic .portal-dynamic .portal-weather .side-weather-num { font-size: 46px; letter-spacing: 3px; }
.site-hero-dynamic .portal-dynamic .portal-weather .side-weather-unit { font-size: 19px; margin-top: -12px; }
.site-hero-dynamic .portal-dynamic .portal-weather .side-weather-name { font-size: 12.5px; }
.site-hero-dynamic .portal-dynamic .portal-weather .side-weather-range { font-size: 11.5px; }

/* 速度卡 */
.site-hero-dynamic .portal-dynamic .portal-perf-item { padding: 7px 9px; border-radius: 12px; }

/* 音乐卡 */
.site-hero-dynamic .portal-dynamic #kuwo-music-box { padding: 2rem; border-radius: 26px; }
.site-hero-dynamic .portal-dynamic #kuwo-music-box .kwm-ptitle { font-size: 18px; }
.site-hero-dynamic .portal-dynamic #kuwo-music-box .kwm-partist { font-size: 11px; }
.site-hero-dynamic .portal-dynamic #kuwo-music-box .kwm-cardprog { margin-top: 10px; }
