/* ============================================
   诗词模块主题（素白卷轴 · 墨色宋体 · 朱红印章）
   文章页 / 列表页 / 搜索页 / 404 页共用
   ============================================ */

body.shici-page {
    --sc-paper: #f6f4ef;
    --sc-paper-2: #eeebe3;
    --sc-scroll: #fffefb;
    --sc-ink: #241f1a;
    --sc-ink-2: #57504a;
    --sc-ink-3: #8f887c;
    --sc-cinnabar: #b23a2f;
    --sc-cinnabar-deep: #8d2b22;
    --sc-cinnabar-soft: rgba(178, 58, 47, 0.08);
    --sc-line: #e5e0d5;
    --sc-font-poem: "Kaiti SC", "STKaiti", "KaiTi", "楷体", "Noto Serif SC", "Songti SC", "SimSun", serif;
    --sc-font-title: "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
    background:
        repeating-linear-gradient(90deg, rgba(160, 145, 115, 0.035) 0 1px, transparent 1px 46px),
        linear-gradient(180deg, #faf9f5 0%, var(--sc-paper) 45%, var(--sc-paper-2) 100%);
    color: var(--sc-ink-2);
    font-family: var(--sc-font-title);
}

/* ===== 共享深色主题的浅色覆盖 ===== */
body.shici-page .top-bar {
    background: #26221c;
    border-bottom: 2px solid var(--sc-cinnabar);
}
body.shici-page .logo { color: #e8e1d4; }
body.shici-page .logo:hover { color: #fff; text-shadow: none; }
body.shici-page .user-info,
body.shici-page .current-date { color: #c9c1b2; }
body.shici-page .user-info a,
body.shici-page .current-date { color: #e8e1d4; }
body.shici-page .current-weather { color: #c9c1b2; }
body.shici-page .place { color: var(--sc-ink-3); }
body.shici-page .place strong { color: var(--sc-ink-2); }
body.shici-page .place a { color: var(--sc-cinnabar); }
body.shici-page .place a:hover { color: var(--sc-cinnabar-deep); }
body.shici-page .footer {
    background: #26221c;
    border-top: 3px solid var(--sc-cinnabar);
}
body.shici-page .footer a { color: #d6cfc1; }
body.shici-page .footer a:hover { color: #fff; }
body.shici-page .footer-content { color: #a39b8c; }
body.shici-page .article-wrapper { max-width: 1000px; }

/* ===== 题头（诗题 · 落款 · 印章） ===== */
.sc-masthead { padding: 34px 20px 0; }
.sc-masthead-inner {
    max-width: 1000px; margin: 0 auto;
    display: flex; align-items: center; justify-content: center; gap: 20px;
}
.sc-seal {
    flex: 0 0 58px; width: 58px; height: 58px;
    background: var(--sc-cinnabar);
    color: #fff6ee;
    display: flex; align-items: center; justify-content: center;
    font-family: "Kaiti SC", "STKaiti", "KaiTi", "楷体", serif;
    font-size: 30px; font-weight: 700; line-height: 1;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(178, 58, 47, 0.28);
    transform: rotate(-3deg);
}
.sc-masthead-main { text-align: center; }
.sc-masthead-title {
    margin: 0; font-family: var(--sc-font-title);
    font-size: 34px; font-weight: 700; color: var(--sc-ink);
    letter-spacing: 4px; line-height: 1.3;
}
.sc-masthead-byline {
    margin-top: 8px; font-size: 14.5px; color: var(--sc-ink-3);
    letter-spacing: 2px;
}
.sc-byline-dynasty { color: var(--sc-cinnabar); margin-right: 8px; }
.sc-byline-author { color: var(--sc-ink-2); }
.sc-rule { height: 2px; background: var(--sc-cinnabar); max-width: 1000px; margin: 22px auto 0; }
.sc-rule-sub { height: 1px; background: var(--sc-cinnabar); opacity: .4; max-width: 1000px; margin: 3px auto 0; }
.sc-masthead-tail { height: 22px; }

/* ===== 卷轴正文 ===== */
.sc-scroll {
    position: relative;
    background: var(--sc-scroll);
    border: 1px solid var(--sc-line);
    border-top: 3px solid var(--sc-cinnabar);
    padding: 40px 46px 46px;
    box-shadow: 0 3px 16px rgba(90, 76, 50, 0.07);
    overflow: hidden;
}
.sc-scroll::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 26px;
    background: linear-gradient(90deg, rgba(160, 140, 105, 0.07), transparent);
    pointer-events: none;
}
.sc-scroll::after {
    content: "诗"; position: absolute; right: 14px; top: 14px;
    width: 46px; height: 46px;
    border: 2px solid rgba(178, 58, 47, 0.22);
    border-radius: 4px;
    color: rgba(178, 58, 47, 0.28);
    font-family: var(--sc-font-poem);
    font-size: 24px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    pointer-events: none;
}

/* ===== 诗句（居中分行） ===== */
.sc-poem {
    position: relative; z-index: 1;
    font-family: var(--sc-font-poem);
}
.sc-stanza { margin: 0 0 22px; }
.sc-stanza:last-child { margin-bottom: 0; }
.sc-stanza-label {
    margin: 0 0 10px; text-align: center;
    font-size: 14px; color: var(--sc-cinnabar);
    letter-spacing: 4px;
}
.sc-line {
    margin: 0 0 6px; text-align: center;
    font-size: 18px; line-height: 2.1;
    color: var(--sc-ink);
    letter-spacing: 2px;
}
.sc-line img { max-width: 100%; height: auto; border-radius: 6px; }
.sc-poem + .sc-note { margin-top: 34px; }

/* ===== 注解分区 ===== */
.sc-note {
    position: relative; z-index: 1;
    margin-top: 22px;
    padding: 16px 20px 18px 22px;
    background: #faf8f3;
    border: 1px solid var(--sc-line);
    border-left: 3px solid var(--sc-cinnabar);
}
.sc-note-title {
    margin: 0 0 10px; font-size: 15px; font-weight: 700;
    color: var(--sc-cinnabar); letter-spacing: 3px;
    font-family: var(--sc-font-title);
}
.sc-note-label::before { content: "【"; }
.sc-note-label::after { content: "】"; }
.sc-note-body p {
    margin: 0 0 8px; font-size: 14.5px; line-height: 1.95; color: var(--sc-ink-2);
    text-indent: 2em;
}
.sc-note-body p:last-child { margin-bottom: 0; }
.sc-note-body img { max-width: 100%; height: auto; border-radius: 6px; }

/* ===== 卷尾信息 ===== */
.sc-meta {
    position: relative; z-index: 1;
    margin-top: 26px; padding-top: 14px;
    border-top: 1px dashed var(--sc-line);
    display: flex; flex-wrap: wrap; gap: 6px 20px;
    font-size: 12.5px; color: var(--sc-ink-3);
}
.sc-meta i { color: var(--sc-cinnabar); margin-right: 4px; }

/* ===== 免责 ===== */
.sc-disclaimer {
    margin-top: 16px; padding: 13px 18px;
    font-size: 13.5px; line-height: 1.85; color: var(--sc-ink-3);
    background: #faf8f3; border-left: 3px solid var(--sc-line);
}
.sc-disclaimer i { color: var(--sc-cinnabar); margin-right: 5px; }

/* ===== 诗词卡片（列表页 / 搜索页） ===== */
.sc-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.sc-card {
    display: block;
    background: var(--sc-scroll);
    border: 1px solid var(--sc-line);
    padding: 16px 20px 14px;
    text-decoration: none; color: inherit;
    position: relative; overflow: hidden;
    transition: all .25s ease;
}
.sc-card::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: var(--sc-cinnabar);
}
.sc-card:hover {
    transform: translateY(-2px);
    border-color: rgba(178, 58, 47, 0.4);
    box-shadow: 0 6px 18px rgba(80, 65, 40, 0.09);
}
.sc-card-top {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin-bottom: 8px;
}
.sc-card-cat {
    display: inline-flex; align-items: center; gap: 5px;
    background: var(--sc-cinnabar-soft); color: var(--sc-cinnabar);
    border-radius: 4px; padding: 3px 10px; font-size: 12px;
}
.sc-card-byline { font-size: 12.5px; color: var(--sc-ink-3); }
.sc-card-byline .sc-byline-dynasty { margin-right: 5px; }
.sc-card-no { margin-left: auto; font-size: 12px; color: var(--sc-ink-3); letter-spacing: 1px; }
.sc-card-title {
    font-family: var(--sc-font-title);
    font-size: 18px; font-weight: 700; color: var(--sc-ink);
    line-height: 1.5; margin-bottom: 8px;
}
.sc-card:hover .sc-card-title { color: var(--sc-cinnabar); }
.sc-card-new {
    display: inline-block; font-style: normal;
    font-size: 11px; color: #fff; background: var(--sc-cinnabar);
    border-radius: 3px; padding: 1px 6px; margin-left: 6px;
    vertical-align: middle;
}
.sc-card-desc {
    font-family: var(--sc-font-poem);
    font-size: 14px; color: var(--sc-ink-2); line-height: 1.9;
    margin-bottom: 10px;
    overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
    -webkit-line-clamp: 3; -webkit-box-orient: vertical;
}
.sc-card-meta {
    display: flex; flex-wrap: wrap; gap: 6px 16px;
    font-size: 12.5px; color: var(--sc-ink-3);
}
.sc-card-meta i { color: var(--sc-cinnabar); margin-right: 4px; }

/* ===== 搜索 ===== */
.sc-search-form { display: flex; gap: 8px; margin-bottom: 16px; }
.sc-search-input {
    flex: 1; min-width: 0; padding: 10px 14px; font-size: 14px; font-family: inherit; color: var(--sc-ink);
    background: var(--sc-scroll); border: 1.5px solid var(--sc-line); border-radius: 6px;
    outline: none; transition: border-color .3s;
}
.sc-search-input:focus { border-color: var(--sc-cinnabar); }
.sc-search-btn {
    padding: 10px 22px; font-size: 14px; font-weight: 600; font-family: inherit;
    background: var(--sc-cinnabar); border: none; border-radius: 6px;
    color: #fff; cursor: pointer; white-space: nowrap;
}
.sc-search-btn:hover { background: var(--sc-cinnabar-deep); }
.sc-result-count { font-size: 13.5px; color: var(--sc-ink-3); margin-bottom: 14px; }
.sc-result-count strong { color: var(--sc-cinnabar); }
.sc-highlight { color: var(--sc-cinnabar); font-weight: 700; }
.sc-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 10px;
    padding: 11px 16px; margin-bottom: 16px;
    background: var(--sc-scroll); border: 1px solid var(--sc-line); border-left: 3px solid var(--sc-cinnabar);
    font-size: 13.5px; color: var(--sc-ink-3);
}
.sc-toolbar strong { color: var(--sc-cinnabar); font-weight: 700; }

/* ===== 空状态 ===== */
.sc-empty {
    background: var(--sc-scroll); border: 1px dashed var(--sc-line);
    padding: 52px 20px; text-align: center; color: var(--sc-ink-3);
}
.sc-empty i { font-size: 40px; color: rgba(178, 58, 47, 0.28); margin-bottom: 14px; display: block; }
.sc-empty p { margin: 0; font-size: 16px; color: var(--sc-ink-2); }
.sc-empty-sub { margin-top: 6px !important; font-size: 13.5px !important; color: var(--sc-ink-3) !important; }

/* ===== 分页（浅色适配） ===== */
body.shici-page .pagination-wrapper { border-top: 1px solid var(--sc-line); }
body.shici-page .page-info { color: var(--sc-ink-3); }
body.shici-page .page-info strong { color: var(--sc-cinnabar); }
body.shici-page .page-btn,
body.shici-page .page-num {
    background: var(--sc-scroll);
    border-color: var(--sc-line); color: var(--sc-ink-2);
}
body.shici-page .page-btn:hover,
body.shici-page .page-num:hover {
    background: var(--sc-cinnabar-soft); color: var(--sc-cinnabar); border-color: rgba(178, 58, 47, 0.35);
}
body.shici-page .page-num.active {
    background: var(--sc-cinnabar); color: #fff; border-color: transparent;
}
body.shici-page .page-dots { color: var(--sc-ink-3); }

/* ===== 上下篇 / 操作 ===== */
body.shici-page .article-nav {
    margin-top: 22px; padding: 16px 20px;
    background: var(--sc-scroll);
    border: 1px solid var(--sc-line); border-top: 3px solid var(--sc-cinnabar);
}
body.shici-page .article-nav .prev,
body.shici-page .article-nav .next {
    background: #faf8f3;
    border: 1px solid var(--sc-line);
}
body.shici-page .article-nav .prev:hover,
body.shici-page .article-nav .next:hover {
    background: var(--sc-scroll);
    border-color: var(--sc-cinnabar);
    box-shadow: 0 4px 14px rgba(80, 65, 40, 0.1);
}
body.shici-page .article-nav .prev a,
body.shici-page .article-nav .next a { color: var(--sc-ink); font-weight: 600; }
body.shici-page .article-nav .prev a:hover,
body.shici-page .article-nav .next a:hover { color: var(--sc-cinnabar); }
body.shici-page .article-nav .nav-label { color: var(--sc-cinnabar); }
body.shici-page .article-nav .nav-arrow { color: var(--sc-cinnabar); }
body.shici-page .article-actions .act-btn {
    background: var(--sc-scroll); border: 1px solid var(--sc-line); color: var(--sc-ink);
}
body.shici-page .article-actions .act-btn:hover { background: var(--sc-cinnabar); color: #fff; border-color: var(--sc-cinnabar); }

/* ===== 404 ===== */
.sc-404 {
    box-sizing: border-box; width: 100%;
    max-width: 900px; margin: 0 auto; padding: 60px 24px 70px; text-align: center;
}
.sc-404-code {
    font-family: var(--sc-font-title);
    font-size: 92px; font-weight: 700; line-height: 1; color: var(--sc-cinnabar); letter-spacing: 6px;
}
.sc-404-seal {
    display: inline-block; margin: 18px auto 0;
    background: var(--sc-cinnabar); color: #fff6ee;
    padding: 8px 14px; font-size: 18px; letter-spacing: 4px;
    writing-mode: vertical-rl; text-orientation: upright;
    border-radius: 6px; transform: rotate(-3deg);
}
.sc-404-title {
    margin: 22px 0 10px; font-size: 26px; color: var(--sc-ink); font-weight: 700; letter-spacing: 2px;
}
.sc-404-desc { margin: 0 auto 26px; font-size: 15px; line-height: 1.9; color: var(--sc-ink-2); max-width: 620px; }
.sc-404-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 30px; }
.sc-404-link {
    font-size: 14px; text-decoration: none; color: var(--sc-ink);
    background: var(--sc-scroll); border: 1px solid var(--sc-line);
    padding: 9px 18px; transition: all .2s ease;
}
.sc-404-link:hover { background: var(--sc-cinnabar); color: #fff; border-color: var(--sc-cinnabar); }
.sc-404-recommend {
    margin-top: 26px; padding: 20px 24px; text-align: left;
    background: var(--sc-scroll); border: 1px solid var(--sc-line); border-top: 3px solid var(--sc-cinnabar);
}
.sc-404-recommend h2 {
    margin: 0 0 12px; font-size: 17px; color: var(--sc-ink); font-weight: 700;
}
.sc-404-recommend ul {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 14px;
}
.sc-404-recommend li a { font-size: 14px; color: var(--sc-ink-2); text-decoration: none; }
.sc-404-recommend li a:hover { color: var(--sc-cinnabar); }

/* ===== 返回顶部 ===== */
.sc-back-top {
    position: fixed; bottom: 30px; right: 30px;
    width: 44px; height: 44px;
    background: var(--sc-cinnabar);
    color: #fff;
    display: none; align-items: center; justify-content: center;
    font-size: 18px; cursor: pointer;
    box-shadow: 0 6px 18px rgba(178, 58, 47, 0.3);
    transition: all .2s ease;
    z-index: 999;
}
.sc-back-top:hover { transform: translateY(-3px); }
.sc-back-top.show { display: flex; }

/* ===== 宽度与响应式 ===== */
@media (max-width: 860px) {
    .sc-list { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .sc-masthead-title { font-size: 25px; letter-spacing: 2px; }
    .sc-scroll { padding: 26px 18px 30px; }
    .sc-scroll::after { display: none; }
    .sc-line { font-size: 16.5px; letter-spacing: 1px; }
    .sc-404-recommend ul { grid-template-columns: repeat(2, 1fr); }
}
