/* ==========================================================================
   朔光与墨 · 首页样式 (Doodle Studio Style)
   设计语言：涂鸦工作室风 / 纸白点阵底 + 粗黑边硬阴影 + 五彩涂鸦配色
   调色：纸白 #faf9f5 / 墨黑 #1a1a1a + 黄粉蓝绿橙点缀
   字体：Nunito (圆体无衬线)
   构图：浅色 Hero 粒子 / 单栏动态流卡片 / 涂鸦便签式卡片
   公共样式（CSS变量/页面基础/header涂鸦化/动画/reveal/skeleton/toast）
   已提取至 common.css，本文件仅保留首页专属样式
   ========================================================================== */

/* 防止全宽 hero 产生横向滚动条 */
body { overflow-x: clip; }

body.page-index {
    font-weight: 700;
}
body.page-index .image-viewer { position: fixed; z-index: 1000; }

/* ==========================================================================
   COVER · 浅色粒子 Hero
   Three.js 粒子背景（纸白底 + 墨黑粒子）+ 中央大号主标题 + 一言
   ========================================================================== */
.cover {
    position: relative;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--paper);
}

/* 粒子背景容器：Three.js canvas 渲染其中 */
.cover-particles {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.cover-particles canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* 漂浮涂鸦装饰：hero 区点缀的彩色几何形 */
.cover::before,
.cover::after {
    content: '';
    position: absolute;
    border: 4px solid var(--ink);
    border-radius: 50%;
    opacity: 0.18;
    z-index: 1;
    pointer-events: none;
}
.cover::before {
    top: 12%;
    left: 8%;
    width: 90px;
    height: 90px;
    background: var(--yellow);
    animation: doodleFloat 5s ease-in-out infinite;
}
.cover::after {
    bottom: 14%;
    right: 9%;
    width: 120px;
    height: 120px;
    background: var(--pink);
    animation: doodleFloat 6s ease-in-out infinite reverse;
}

@keyframes doodleFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-14px) rotate(8deg); }
}

.cover-inner {
    position: relative;
    z-index: 3;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 3rem;
}

/* ---------- 中央：大号主标题 + 一言 ---------- */
.cover-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    max-width: 900px;
    opacity: 0;
    animation: coverMetaIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.3s;
}

/* 欢迎贴纸：倾斜的黄底粗黑边标签 */
.cover-center::before {
    content: 'WELCOME · 朔光与墨';
    display: inline-block;
    background: var(--yellow);
    color: var(--ink);
    border: 2px solid var(--ink);
    border-radius: 12px;
    padding: 8px 18px;
    font-family: var(--font-doodle);
    font-weight: 900;
    font-size: 13px;
    letter-spacing: 0.1em;
    box-shadow: var(--shadow-hard-sm);
    transform: rotate(-2deg);
    margin-bottom: 4px;
}

.cover-title {
    font-family: var(--font-doodle);
    font-size: clamp(2.2rem, 6vw, 4.2rem);
    font-weight: 900;
    color: var(--ink);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0;
    white-space: nowrap;
    /* 涂鸦下划线点缀：黄色锯齿线 */
    background-image: linear-gradient(transparent 88%, var(--yellow) 88%, var(--yellow) 96%, transparent 96%);
    background-size: 100% 100%;
    padding: 0 0.1em 0.06em;
}

.cover-hitokoto {
    font-family: var(--font-doodle);
    font-size: clamp(1.05rem, 2.2vw, 1.4rem);
    font-weight: 700;
    color: var(--text-secondary);
    line-height: 1.6;
    letter-spacing: 0;
    margin: 0;
    min-height: 1.6em;
    max-width: 680px;
}

.cover-from {
    font-family: var(--font-doodle);
    font-size: 13px;
    font-weight: 800;
    color: var(--blue);
    letter-spacing: 0.06em;
    margin: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
    background: rgba(108, 92, 231, 0.08);
    border: 2px solid var(--blue);
    border-radius: 999px;
    padding: 4px 14px;
    box-shadow: var(--shadow-hard-sm);
}

.cover-from.show {
    opacity: 1;
}

@keyframes coverMetaIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 打字机字符光标 */
.typewriter-char {
    opacity: 0;
    animation: charIn 0.05s ease forwards;
}

@keyframes charIn {
    to { opacity: 1; }
}

/* ==========================================================================
   DISPATCH · 墨匣入口
   涂鸦卡片：左图标 / 中标题+描述 / 右箭头
   ========================================================================== */
.dispatch {
    padding: 2.5rem 1.5rem;
}

.dispatch-card {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 28px;
    padding: 28px 32px;
    background: #ffffff;
    border: 3px solid var(--ink);
    border-radius: 24px;
    box-shadow: var(--shadow-hard);
    transform: translateY(20px) rotate(-1deg);
    opacity: 0;
    position: relative;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.dispatch-card.reveal-in {
    opacity: 1;
    transform: translateY(0) rotate(-1deg);
}

/* hover：硬阴影加大 + 轻微上浮 */
.dispatch-card:hover {
    transform: translateY(-4px) rotate(-1deg);
    box-shadow: var(--shadow-hard-lg);
}

/* 左侧羽毛笔图标：涂鸦圆角方框 */
.dispatch-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pink);
    border: 2px solid var(--ink);
    border-radius: 16px;
    color: var(--ink);
    box-shadow: var(--shadow-hard-sm);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.dispatch-icon svg {
    width: 28px;
    height: 28px;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.dispatch-card:hover .dispatch-icon {
    transform: rotate(-10deg);
    background: var(--yellow);
}

.dispatch-card:hover .dispatch-icon svg {
    transform: scale(1.08);
}

/* 中间内容：kicker 上、标题中、描述下 */
.dispatch-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.dispatch-kicker {
    font-family: var(--font-doodle);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.dispatch-title {
    font-family: var(--font-doodle);
    font-size: 24px;
    font-weight: 900;
    color: var(--ink);
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.dispatch-desc {
    font-family: var(--font-doodle);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 右侧箭头：涂鸦圆形按钮 */
.dispatch-arrow {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: #ffffff;
    color: var(--ink);
    flex-shrink: 0;
    box-shadow: var(--shadow-hard-sm);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.dispatch-arrow svg {
    width: 18px;
    height: 18px;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.dispatch-card:hover .dispatch-arrow {
    background: var(--green);
    transform: rotate(-45deg);
}

.dispatch-card:hover .dispatch-arrow svg {
    transform: translateX(2px);
}

/* ==========================================================================
   FEED · 动态流 · 涂鸦便签网格
   头条跨 2 列 + 2 列网格；图上文下；纯文字引号版式
   ========================================================================== */
.feed {
    padding: 3rem 1.5rem 4rem;
    max-width: 1100px;
    margin: 0 auto;
}

.feed-head {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 3px solid var(--ink);
    transform: translateY(20px);
    opacity: 0;
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.feed-head.reveal-in {
    opacity: 1;
    transform: translateY(0);
}

.feed-kicker {
    font-family: var(--font-doodle);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--blue);
    display: inline-block;
    background: rgba(108, 92, 231, 0.1);
    border: 2px solid var(--blue);
    border-radius: 999px;
    padding: 3px 12px;
    align-self: flex-start;
}

.feed-title {
    font-family: var(--font-doodle);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 900;
    color: var(--ink);
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.feed-sub {
    font-family: var(--font-doodle);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0;
}

/* ---------- 网格容器：12 列不对称网格（作品页排布） ---------- */
.feed-list {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 3rem 2rem;
    align-items: start;
}

/* 7/5 交替列跨度 */
.feed-list .entry.col-7 { grid-column: span 7; }
.feed-list .entry.col-5 { grid-column: span 5; }

/* ---------- 条目基础（涂鸦便签 · 作品页风格） ---------- */
.entry {
    position: relative;
    cursor: pointer;
    /* 入场动画初始态 */
    opacity: 0;
    transform: translate3d(0, 28px, 0) scale(0.96) rotate(var(--rot, 0deg));
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.35s ease;
    transition-delay: calc(var(--i, 0) * 70ms);
    will-change: transform, opacity;
}

.entry.reveal-in {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1) rotate(var(--rot, 0deg));
}

/* 入场完成后 hover 生效：回正 + 上浮 + 阴影加大 */
.entry.reveal-in:hover {
    transform: translateY(-6px) rotate(0deg);
}

/* 骨架屏不参与动画 */
.entry.skeleton-entry {
    opacity: 1;
    transform: rotate(var(--rot, 0deg));
    transition: none;
    cursor: default;
    pointer-events: none;
}

/* ---------- 胶带装饰：卡片顶部居中的半透明贴纸 ---------- */
.entry-tape {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    width: 90px;
    height: 28px;
    background: rgba(255, 217, 61, 0.35);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(26, 26, 26, 0.1);
    z-index: 5;
    border-radius: 4px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.entry:hover .entry-tape {
    transform: translateX(-50%) rotate(0deg);
}

/* ---------- Doodle 卡片容器：白底粗黑边硬阴影 ---------- */
.entry-doodle-card {
    background: #ffffff;
    border: 4px solid var(--ink);
    border-radius: 18px;
    box-shadow: var(--shadow-hard);
    padding: 16px;
    overflow: hidden;
    transition: box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.entry.reveal-in:hover .entry-doodle-card {
    box-shadow: var(--shadow-hard-lg);
}

/* ---------- 图片区：按原比例自适应 + 最大高度裁剪 ---------- */
.entry-doodle-media {
    position: relative;
    overflow: hidden;
    max-height: 500px;
    background: var(--paper);
    border: 2px solid var(--ink);
    border-radius: 14px;
    margin-bottom: 20px;
}

.entry-doodle-media img {
    width: 100%;
    height: auto;
    display: block;
    cursor: zoom-in;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.entry:hover .entry-doodle-media img {
    transform: scale(1.08);
}

/* 分类角标：图片右上角的黑底白字标签 */
.entry-doodle-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--ink);
    color: #ffffff;
    padding: 4px 12px;
    font-family: var(--font-doodle);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 8px;
    border: 2px solid var(--ink);
    box-shadow: var(--shadow-hard-sm);
}

/* ---------- 底部信息区：标题+描述 左 / 加号按钮 右 ---------- */
.entry-doodle-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 4px 8px 8px;
}

.entry-doodle-info {
    flex: 1;
    min-width: 0;
}

.entry-doodle-title {
    font-family: var(--font-doodle);
    font-size: 22px;
    font-weight: 900;
    color: var(--ink);
    margin: 0 0 4px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    transition: color 0.3s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.entry:hover .entry-doodle-title {
    color: var(--blue);
}

.entry-doodle-desc {
    font-family: var(--font-doodle);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ---------- 加号按钮：圆形粗黑边，hover 变粉 ---------- */
.entry-doodle-plus {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: var(--ink);
    border: 2px solid var(--ink);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-hard-sm);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.entry-doodle-plus svg {
    width: 20px;
    height: 20px;
}

.entry:hover .entry-doodle-plus {
    background: var(--pink);
    color: #ffffff;
    transform: rotate(90deg);
}

/* ---------- 纯文字卡片特化：引号 + 正文 + 加号 ---------- */
.entry--text .entry-doodle-card {
    padding-top: 20px;
}

.entry--text .entry-quote {
    font-family: var(--font-doodle);
    font-size: 80px;
    font-weight: 900;
    line-height: 0.5;
    color: var(--pink);
    opacity: 0.4;
    display: block;
    padding: 24px 16px 0;
    user-select: none;
    transition: opacity 0.3s ease;
}

.entry--text:hover .entry-quote {
    opacity: 0.7;
}

.entry--text .entry-doodle-body {
    padding-top: 8px;
}

.entry--text .entry-doodle-text {
    font-family: var(--font-doodle);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.75;
    color: var(--ink);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* ---------- 加载更多 ---------- */
.feed-more {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.feed-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--yellow);
    border: 3px solid var(--ink);
    border-radius: 16px;
    font-family: var(--font-doodle);
    font-size: 15px;
    font-weight: 900;
    color: var(--ink);
    cursor: pointer;
    box-shadow: var(--shadow-hard);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    letter-spacing: 0;
}

.feed-more-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-hard-lg);
    background: var(--green);
}

/* ==========================================================================
   AUTHOR · 笔者专栏（浅色 Doodle 卡片）
   三栏分栏：头像签名 / 简介 / 操作按钮
   ========================================================================== */
.author {
    padding: 5rem 2rem;
    background: var(--paper);
}

.author-inner {
    max-width: 1280px;
    margin: 0 auto;
    background: #ffffff;
    border: 4px solid var(--ink);
    border-radius: 32px;
    box-shadow: var(--shadow-hard-lg);
    padding: 3rem;
    transform: translateY(24px) rotate(-0.5deg);
    opacity: 0;
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.author-inner.reveal-in {
    opacity: 1;
    transform: translateY(0) rotate(-0.5deg);
}

/* ---------- 顶部 kicker + 粗线 ---------- */
.author-head {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 3rem;
}

.author-kicker {
    font-family: var(--font-doodle);
    font-size: 12px;
    font-weight: 900;
    color: #ffffff;
    background: var(--blue);
    border: 2px solid var(--ink);
    border-radius: 999px;
    padding: 4px 14px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    flex-shrink: 0;
    box-shadow: var(--shadow-hard-sm);
}

.author-rule {
    flex: 1;
    height: 4px;
    background: var(--ink);
    border-radius: 2px;
    opacity: 0.15;
}

/* ---------- 三栏主体 ---------- */
.author-body {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 56px;
    align-items: start;
}

/* 左栏：头像 + 圆体签名 */
.author-id {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding-right: 56px;
    border-right: 3px solid var(--ink);
    border-right-color: rgba(26, 26, 26, 0.15);
}

.author-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--yellow);
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-doodle);
    font-size: 38px;
    font-weight: 900;
    overflow: hidden;
    flex-shrink: 0;
    border: 4px solid var(--ink);
    box-shadow: var(--shadow-hard);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.author-avatar:hover {
    transform: rotate(-8deg) scale(1.05);
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 圆体签名 */
.author-signature {
    font-family: var(--font-doodle);
    font-size: 32px;
    font-weight: 900;
    color: var(--ink);
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-align: center;
    white-space: nowrap;
    margin: 0;
    padding: 4px 0;
}

/* 中栏：简介 */
.author-bio-col {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-top: 6px;
}

.author-bio-label {
    font-family: var(--font-doodle);
    font-size: 11px;
    font-weight: 900;
    color: var(--text-muted);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.author-bio-label::after {
    content: '';
    width: 40px;
    height: 3px;
    background: var(--ink);
    border-radius: 2px;
    opacity: 0.3;
}

.author-bio {
    font-family: var(--font-doodle);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-secondary);
    line-height: 1.85;
    margin: 0;
    max-width: 46ch;
    letter-spacing: 0;
}

/* 右栏：操作按钮 */
.author-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-left: 56px;
    border-left: 3px solid var(--ink);
    border-left-color: rgba(26, 26, 26, 0.15);
    min-width: 180px;
}

.author-link {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 22px;
    border: 3px solid var(--ink);
    border-radius: 16px;
    background: var(--green);
    font-family: var(--font-doodle);
    font-size: 13px;
    font-weight: 900;
    color: var(--ink);
    letter-spacing: 0.04em;
    box-shadow: var(--shadow-hard-sm);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.author-link:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-hard);
    background: var(--yellow);
}

.author-link svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.author-link:hover svg {
    transform: translateX(3px);
}

/* ==========================================================================
   FRIENDS · 友链预览（跑马灯）
   ========================================================================== */
.friends {
    padding: 4rem 1.5rem;
}

.friends-inner {
    max-width: 1100px;
    margin: 0 auto;
    transform: translateY(24px);
    opacity: 0;
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.friends-inner.reveal-in {
    opacity: 1;
    transform: translateY(0);
}

.friends-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 3px solid var(--ink);
    gap: 16px;
    flex-wrap: wrap;
}

.friends-title-wrap {
    display: flex;
    align-items: baseline;
    gap: 14px;
    flex-wrap: wrap;
}

.friends-title {
    font-family: var(--font-doodle);
    font-size: 30px;
    font-weight: 900;
    color: var(--ink);
    margin: 0;
    letter-spacing: -0.02em;
}

.friends-title-sub {
    font-family: var(--font-doodle);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0;
}

.friends-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-doodle);
    font-size: 13px;
    font-weight: 900;
    color: var(--ink);
    background: var(--yellow);
    border: 2px solid var(--ink);
    border-radius: 999px;
    padding: 6px 14px;
    box-shadow: var(--shadow-hard-sm);
    transition: all 0.25s ease;
}

.friends-more:hover {
    transform: translate(-1px, -1px);
    box-shadow: var(--shadow-hard);
    background: var(--pink);
    color: #ffffff;
}

.friends-more svg {
    width: 14px;
    height: 14px;
    transition: transform 0.25s ease;
}

.friends-more:hover svg {
    transform: translateX(2px);
}

/* 跑马灯容器：两侧渐隐遮罩 */
.friends-marquee {
    overflow: hidden;
    position: relative;
    padding: 6px 0;
    mask-image: linear-gradient(90deg, transparent 0%, black 6%, black 94%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 6%, black 94%, transparent 100%);
}

/* 滚动轨道：内容复制两份，translateX(-50%) 实现无缝循环 */
.friend-track {
    display: flex;
    width: max-content;
    gap: 12px;
    will-change: transform;
    animation: friendScrollLeft 45s linear infinite;
}

.friends-marquee:hover .friend-track {
    animation-play-state: paused;
}

@keyframes friendScrollLeft {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* 友链胶囊：涂鸦便签风 */
.friend-capsule {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 16px 7px 7px;
    border-radius: 999px;
    border: 2px solid var(--ink);
    background: #ffffff;
    white-space: nowrap;
    text-decoration: none;
    flex-shrink: 0;
    box-shadow: var(--shadow-hard-sm);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.friend-capsule:nth-child(5n+1) { background: #ffffff; }
.friend-capsule:nth-child(5n+2) { background: var(--yellow); }
.friend-capsule:nth-child(5n+3) { background: var(--green); }
.friend-capsule:nth-child(5n+4) { background: var(--paper); }
.friend-capsule:nth-child(5n+5) { background: #fff5f5; }

.friend-capsule:hover {
    transform: translate(-2px, -2px) rotate(-2deg);
    box-shadow: var(--shadow-hard);
    background: var(--pink);
}

.friend-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--blue);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--ink);
    font-family: var(--font-doodle);
    font-size: 13px;
    font-weight: 900;
}

.friend-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.friend-avatar-fallback {
    font-family: var(--font-doodle);
    font-size: 13px;
    font-weight: 900;
}

.friend-name {
    font-family: var(--font-doodle);
    font-size: 13px;
    font-weight: 900;
    color: var(--ink);
    letter-spacing: 0;
    transition: color 0.3s ease;
}

.friend-capsule:hover .friend-name {
    color: #ffffff;
}

.friends-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-family: var(--font-doodle);
    font-size: 14px;
    font-weight: 700;
}

/* ==========================================================================
   骨架屏（基础 .skeleton 与 @keyframes skeleton-shimmer 已提取至 common.css）
   ========================================================================== */
.skeleton-text {
    height: 12px;
    margin-bottom: 8px;
}

.skeleton-rule {
    flex: 1;
    height: 3px;
    margin: 0;
}

.skeleton-image {
    width: 100%;
    height: 180px;
    border-radius: 14px;
}

.skeleton-friend {
    pointer-events: none;
}

/* ==========================================================================
   图片查看器
   ========================================================================== */
.image-viewer {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.image-viewer.active {
    display: flex;
}

.image-viewer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(26, 26, 26, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.image-viewer-container {
    position: relative;
    z-index: 2;
    max-width: 92vw;
    max-height: 88vh;
    cursor: grab;
}

.image-viewer-container:active {
    cursor: grabbing;
}

.image-viewer-img {
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
    border: 4px solid var(--ink);
    border-radius: 16px;
    box-shadow: var(--shadow-hard-xl);
    transition: transform 0.1s ease;
    will-change: transform;
}

.image-viewer-close,
.image-viewer-nav {
    position: absolute;
    z-index: 3;
    background: var(--yellow);
    border: 3px solid var(--ink);
    color: var(--ink);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-hard-sm);
    transition: all 0.2s ease;
}

.image-viewer-close:hover,
.image-viewer-nav:hover {
    transform: translate(-1px, -1px);
    box-shadow: var(--shadow-hard);
    background: var(--pink);
    color: #ffffff;
}

.image-viewer-close {
    top: 24px;
    right: 24px;
}

.image-viewer-close svg {
    width: 22px;
    height: 22px;
}

.image-viewer-nav {
    top: 50%;
    transform: translateY(-50%);
}

.image-viewer-nav:hover {
    transform: translateY(-50%) translate(-1px, -1px);
}

.image-viewer-nav svg {
    width: 24px;
    height: 24px;
}

.image-viewer-prev { left: 24px; }
.image-viewer-next { right: 24px; }

.image-viewer-nav.hidden {
    opacity: 0;
    pointer-events: none;
}

.image-viewer-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    font-family: var(--font-doodle);
    font-size: 14px;
    font-weight: 900;
    color: var(--ink);
    background: var(--paper);
    border: 2px solid var(--ink);
    border-radius: 999px;
    padding: 4px 14px;
    box-shadow: var(--shadow-hard-sm);
    letter-spacing: 0.06em;
    font-variant-numeric: tabular-nums;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ==========================================================================
   分享面板
   ========================================================================== */
.share-panel {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.share-panel.active {
    display: flex;
}

.share-panel-overlay {
    position: absolute;
    inset: 0;
    background: rgba(26, 26, 26, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.share-panel-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border: 4px solid var(--ink);
    border-radius: 28px;
    padding: 28px 24px;
    box-shadow: var(--shadow-hard-lg);
    animation: modalIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.share-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--ink);
}

.share-panel-header h3 {
    font-family: var(--font-doodle);
    font-size: 20px;
    font-weight: 900;
    color: var(--ink);
    margin: 0;
    letter-spacing: -0.01em;
}

.share-panel-close {
    width: 36px;
    height: 36px;
    background: var(--paper);
    border: 2px solid var(--ink);
    color: var(--ink);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: var(--shadow-hard-sm);
    transition: all 0.2s ease;
}

.share-panel-close:hover {
    transform: rotate(90deg);
    background: var(--pink);
    color: #ffffff;
}

.share-panel-close svg {
    width: 18px;
    height: 18px;
}

.share-platforms {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.share-platform-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--paper);
    border: 2px solid var(--ink);
    border-radius: 16px;
    box-shadow: var(--shadow-hard-sm);
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: left;
}

.share-platform-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-hard);
    background: var(--yellow);
}

.share-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 2px solid var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: var(--shadow-hard-sm);
}

.share-card-icon.wechat {
    background: #07c160;
    color: #ffffff;
}

.share-card-icon.link {
    background: var(--blue);
    color: #ffffff;
}

.share-card-icon.poster {
    background: var(--orange);
    color: #ffffff;
}

.share-card-icon svg {
    width: 22px;
    height: 22px;
}

.share-card-info {
    flex: 1;
}

.share-card-title {
    display: block;
    font-family: var(--font-doodle);
    font-size: 15px;
    font-weight: 900;
    color: var(--ink);
    margin-bottom: 2px;
}

.share-card-desc {
    display: block;
    font-family: var(--font-doodle);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
}

.share-card-arrow {
    color: var(--ink);
}

.share-card-arrow svg {
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   微信分享 / 海报模态框
   ========================================================================== */
.wechat-share-modal,
.poster-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.wechat-share-modal.active,
.poster-modal.active {
    display: flex;
}

.wechat-share-overlay,
.poster-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(26, 26, 26, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.wechat-share-content,
.poster-modal-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 380px;
    background: #ffffff;
    border: 4px solid var(--ink);
    border-radius: 28px;
    padding: 28px 24px;
    box-shadow: var(--shadow-hard-lg);
    animation: modalIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.wechat-share-close,
.poster-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    background: var(--paper);
    border: 2px solid var(--ink);
    color: var(--ink);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: var(--shadow-hard-sm);
    transition: all 0.2s ease;
}

.wechat-share-close:hover,
.poster-modal-close:hover {
    transform: rotate(90deg);
    background: var(--pink);
    color: #ffffff;
}

.wechat-share-close svg,
.poster-modal-close svg {
    width: 18px;
    height: 18px;
}

.wechat-share-header,
.poster-modal-header {
    text-align: center;
    margin-bottom: 20px;
}

.wechat-share-header h3,
.poster-modal-header h3 {
    font-family: var(--font-doodle);
    font-size: 20px;
    font-weight: 900;
    color: var(--ink);
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}

.wechat-share-header p,
.poster-modal-header p {
    font-family: var(--font-doodle);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    margin: 0;
}

.wechat-share-preview,
.poster-preview {
    margin-bottom: 18px;
    text-align: center;
}

.wechat-share-preview img,
.poster-preview img,
.wechat-share-preview canvas,
.poster-preview canvas {
    max-width: 100%;
    border: 3px solid var(--ink);
    border-radius: 16px;
    box-shadow: var(--shadow-hard);
}

.wechat-share-actions,
.poster-actions {
    display: flex;
    justify-content: center;
}

.wechat-share-download-btn,
.poster-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--green);
    color: var(--ink);
    border: 3px solid var(--ink);
    border-radius: 16px;
    font-family: var(--font-doodle);
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: var(--shadow-hard-sm);
    transition: all 0.25s ease;
}

.wechat-share-download-btn:hover,
.poster-download-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-hard);
    background: var(--yellow);
}

.wechat-share-download-btn svg,
.poster-download-btn svg {
    width: 16px;
    height: 16px;
}

/* Toast 提示已提取至 common.css */

/* ==========================================================================
   响应式断点
   ========================================================================== */

/* 平板 */
@media (max-width: 960px) {
    .cover-inner {
        padding: 5rem 2rem 2rem;
    }

    .author-inner {
        max-width: 760px;
        padding: 2.5rem;
    }

    .author-body {
        grid-template-columns: auto 1fr;
        gap: 40px;
    }

    .author-id {
        padding-right: 40px;
    }

    .author-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: flex-start;
        padding-left: 0;
        border-left: none;
        border-top: 3px solid rgba(26, 26, 26, 0.15);
        padding-top: 24px;
        margin-top: 8px;
    }

    .author-actions .author-link {
        min-width: 0;
    }

    /* 平板：12 列网格保持，减小间距 */
    .feed-list {
        gap: 2.5rem 1.5rem;
    }

    .entry-doodle-title {
        font-size: 20px;
    }
}

/* 移动端 */
@media (max-width: 768px) {
    .cover-inner {
        padding: 5rem 1.25rem 1.5rem;
    }

    .cover-center {
        gap: 22px;
    }

    .cover-hitokoto {
        font-size: 1.05rem;
    }

    .cover::before {
        width: 60px;
        height: 60px;
        top: 8%;
        left: 5%;
    }

    .cover::after {
        width: 80px;
        height: 80px;
        bottom: 8%;
        right: 5%;
    }

    .dispatch {
        padding: 1.5rem 1.25rem;
    }

    .dispatch-card {
        gap: 16px;
        padding: 20px 22px;
    }

    .dispatch-icon {
        width: 48px;
        height: 48px;
    }

    .dispatch-icon svg {
        width: 24px;
        height: 24px;
    }

    .dispatch-arrow {
        width: 40px;
        height: 40px;
    }

    .dispatch-title {
        font-size: 20px;
    }

    .feed {
        padding: 2.5rem 1.25rem 3rem;
    }

    .feed-title {
        font-size: 2rem;
    }

    /* 移动端：网格 → 单列，去掉旋转 */
    .feed-list {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feed-list .entry.col-7,
    .feed-list .entry.col-5 {
        grid-column: span 1;
    }

    .entry {
        --rot: 0deg !important;
    }

    .entry-doodle-title {
        font-size: 18px;
    }

    .entry-doodle-desc {
        font-size: 12px;
    }

    .entry-doodle-plus {
        width: 36px;
        height: 36px;
    }

    .entry-doodle-plus svg {
        width: 18px;
        height: 18px;
    }

    .entry--text .entry-quote {
        font-size: 60px;
    }

    .entry--text .entry-doodle-text {
        font-size: 14.5px;
    }

    .author {
        padding: 3.5rem 1.25rem;
    }

    .author-inner {
        padding: 2rem 1.5rem;
    }

    .author-head {
        margin-bottom: 2.5rem;
    }

    .author-body {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .author-id {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 28px;
        padding-right: 0;
        border-right: none;
        border-bottom: 3px solid rgba(26, 26, 26, 0.15);
        padding-bottom: 28px;
    }

    .author-avatar {
        width: 76px;
        height: 76px;
        font-size: 32px;
    }

    .author-signature {
        font-size: 28px;
    }

    .author-bio-col {
        align-items: center;
        text-align: center;
    }

    .author-bio-label {
        justify-content: center;
    }

    .author-bio {
        max-width: none;
        font-size: 16px;
    }

    .author-actions {
        flex-direction: row;
        justify-content: center;
        padding-left: 0;
        border-left: none;
        border-top: 3px solid rgba(26, 26, 26, 0.15);
        padding-top: 24px;
        margin-top: 0;
    }

    .author-actions .author-link {
        min-width: 0;
    }

    .friends {
        padding: 3rem 1.25rem;
    }

    .friends-title {
        font-size: 26px;
    }

    .image-viewer-close {
        top: 16px;
        right: 16px;
    }

    .image-viewer-nav {
        top: auto;
        bottom: 24px;
        transform: none;
    }

    .image-viewer-nav:hover {
        transform: translate(-1px, -1px);
    }

    .image-viewer-prev { left: 16px; }
    .image-viewer-next { right: 16px; }
}

/* 小屏移动 */
@media (max-width: 480px) {
    .cover-inner {
        padding: 4.5rem 1rem 1.25rem;
    }

    .cover-center {
        gap: 18px;
    }

    .cover-hitokoto {
        font-size: 1rem;
    }

    .dispatch-card {
        gap: 14px;
        padding: 16px 18px;
    }

    .dispatch-icon {
        width: 44px;
        height: 44px;
    }

    .dispatch-icon svg {
        width: 22px;
        height: 22px;
    }

    .dispatch-arrow {
        width: 36px;
        height: 36px;
    }

    .dispatch-arrow svg {
        width: 16px;
        height: 16px;
    }

    .dispatch-title {
        font-size: 18px;
    }

    .feed {
        padding: 2rem 1rem 2.5rem;
    }

    .feed-head {
        margin-bottom: 2rem;
    }

    .feed-title {
        font-size: 1.75rem;
    }

    .entry-doodle-title {
        font-size: 16px;
    }

    .entry-doodle-card {
        padding: 12px;
    }

    .entry-doodle-media {
        margin-bottom: 14px;
    }

    .entry-doodle-badge {
        font-size: 9px;
        padding: 3px 8px;
    }

    .entry--text .entry-quote {
        font-size: 48px;
    }

    .entry--text .entry-doodle-text {
        font-size: 13.5px;
        -webkit-line-clamp: 4;
    }

    .author {
        padding: 2.5rem 1rem;
    }

    .author-inner {
        padding: 1.5rem 1rem;
    }

    .author-head {
        margin-bottom: 2rem;
    }

    .author-id {
        flex-direction: column;
        gap: 16px;
        padding-bottom: 24px;
    }

    .author-signature {
        font-size: 30px;
    }

    .author-actions {
        flex-direction: row;
        gap: 10px;
    }

    .author-actions .author-link {
        flex: 1;
        justify-content: center;
        padding: 12px 18px;
    }

    .friends {
        padding: 2.5rem 1rem;
    }

    .friend-capsule {
        padding: 5px 12px 5px 5px;
    }

    .friend-avatar {
        width: 26px;
        height: 26px;
    }

    .friend-name {
        font-size: 12px;
    }

    .share-panel-content,
    .wechat-share-content,
    .poster-modal-content {
        padding: 24px 20px 20px;
    }
}

/* ==========================================================================
   减弱动效偏好（全局 * 重置已提取至 common.css，此处仅保留首页专属元素覆盖）
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    .cover-center {
        opacity: 1;
        transform: none;
    }

    .entry,
    .dispatch-card,
    .author-inner,
    .friends-inner,
    .feed-head {
        opacity: 1;
        transform: rotate(var(--rot, 0deg)) !important;
    }

    .friend-track {
        animation: none !important;
        transform: none !important;
    }
}
