/* ═══════════════════════════════════════════════════════════════════════════════
   Literary Appreciation — 诗词古文赏析 独立样式
   与 lecture.css 完全解耦，使用 ap- 前缀避免相互影响。
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════════════════════════
   INDEX PAGE — /appreciation/
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.ap-idx-hero {
    position: relative; margin-top: -64px; padding: 100px 0 80px;
    background: linear-gradient(180deg, #fdf2f8 0%, #fff7ed 20%, #fef9f0 60%, #fff 100%);
    overflow: hidden;
}
.ap-idx-main { padding: 60px 0 80px; background: #fff; }
.ap-idx-bg-shape { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ap-idx-dots { position: absolute; inset: 0; pointer-events: none; }
.ap-idx-dots span { position: absolute; border-radius: 50%; background: rgba(198,40,40,0.08); }
.ap-idx-dots span:nth-child(1)  { width:6px;height:6px;top:12%;left:8% }
.ap-idx-dots span:nth-child(2)  { width:4px;height:4px;top:22%;left:22% }
.ap-idx-dots span:nth-child(3)  { width:8px;height:8px;top:10%;left:72% }
.ap-idx-dots span:nth-child(4)  { width:5px;height:5px;top:45%;left:90% }
.ap-idx-dots span:nth-child(5)  { width:7px;height:7px;top:65%;left:6% }
.ap-idx-dots span:nth-child(6)  { width:5px;height:5px;top:55%;left:55% }
.ap-idx-dots span:nth-child(7)  { width:6px;height:6px;top:78%;left:82% }
.ap-idx-dots span:nth-child(8)  { width:4px;height:4px;top:35%;left:35% }
.ap-idx-dots span:nth-child(9)  { width:8px;height:8px;top:88%;left:38% }
.ap-idx-dots span:nth-child(10) { width:5px;height:5px;top:18%;left:48% }

.ap-idx-hero-body { display: flex; align-items: center; gap: 48px; position: relative; z-index: 1; }
.ap-idx-hero-text { flex: 1 1 50%; min-width: 0; }
.ap-idx-tag {
    display: inline-block; padding: 5px 16px; border-radius: 99px;
    font-size: 13px; font-weight: 700; background: rgba(198,40,40,0.1); color: #c62828;
    margin-bottom: 18px; letter-spacing: 0.5px;
}
.ap-idx-hero-text h1 {
    font-size: 46px; font-weight: 900; line-height: 1.2; margin-bottom: 14px; letter-spacing: -1px;
}
.ap-idx-hero-text h1 em {
    background: linear-gradient(135deg, #c62828, #e65100);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-style: normal;
}
.ap-idx-hero-text p { font-size: 15px; color: #888; line-height: 1.7; }
.ap-idx-stats { display: flex; gap: 36px; margin-top: 22px; }
.ap-idx-stat { display: flex; align-items: baseline; gap: 6px; }
.ap-idx-stat em {
    font-size: 36px; font-weight: 900; font-style: normal;
    background: linear-gradient(135deg, #c62828, #e65100);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.ap-idx-stat span { font-size: 14px; color: #888; }

/* ── Hero visual cards ────────────────────────────────────────────────────── */
.ap-idx-hero-visual { flex: 0 0 260px; position: relative; height: 220px; }
.ap-idx-visual-card {
    position: absolute; border-radius: 20px; background: #fff;
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ap-idx-visual-card span { font-size: 28px; }
.ap-idx-visual-card small { font-size: 11px; color: #888; font-weight: 600; }
.ap-idx-visual-card--1 { width:120px;height:120px;top:5px;left:10px;z-index:3;transform:rotate(-5deg); }
.ap-idx-visual-card--2 { width:96px;height:96px;top:85px;left:115px;z-index:2;transform:rotate(8deg); }
.ap-idx-visual-card--3 { width:84px;height:84px;top:20px;left:140px;z-index:1;transform:rotate(-3deg); }
.ap-idx-visual-card:hover { transform:rotate(0deg) scale(1.08); box-shadow:0 16px 40px rgba(0,0,0,0.12); z-index:10; }

/* ── Section header ───────────────────────────────────────────────────────── */
.ap-section-header { text-align: left; margin-bottom: 28px; }
.ap-section-header .ap-tag {
    display: inline-block; padding: 4px 14px; border-radius: 99px;
    font-size: 13px; font-weight: 700; margin-bottom: 10px;
}
.ap-section-header .ap-section-title { font-size: 26px; font-weight: 800; margin: 0; }
.ap-section-header .ap-section-subtitle { font-size: 14px; color: #888; margin-top: 6px; }

/* ── Type grid (4 cards) ──────────────────────────────────────────────────── */
.ap-idx-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 56px;
}
.ap-idx-card {
    position: relative; display: flex; flex-direction: column;
    justify-content: flex-end; min-height: 140px; padding: 24px;
    border-radius: 20px; text-decoration: none; color: inherit;
    background: #fff; border: 1px solid #f0f0f0;
    overflow: hidden; transition: all 0.3s;
}
.ap-idx-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 36px rgba(0,0,0,0.1);
    border-color: var(--c, #ddd);
}
.ap-idx-card-shape {
    position: absolute; top: -30px; right: -20px;
    width: 120px; height: 120px; border-radius: 50%;
    background: var(--b, #f5f5f5); opacity: 0.5; transition: all 0.4s;
}
.ap-idx-card:hover .ap-idx-card-shape { transform: scale(1.4); opacity: 0.7; }
.ap-idx-card-inner { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; }
.ap-idx-card-text { flex: 1; min-width: 0; }
.ap-idx-card-icon {
    width: 48px; height: 48px; border-radius: 14px; display: flex;
    align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0;
}
.ap-idx-card h3 { font-size: 16px; font-weight: 800; margin: 0; }
.ap-idx-card-count { font-size: 13px; color: #888; }
.ap-idx-card-arrow {
    font-size: 18px; color: #ccc; flex-shrink: 0; transition: all 0.3s;
}
.ap-idx-card:hover .ap-idx-card-arrow { color: var(--c, #c62828); transform: translate(3px, -3px); }
.ap-idx-card-bar {
    position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
    transform: scaleX(0); transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ap-idx-card:hover .ap-idx-card-bar { transform: scaleX(1); }

/* ── Recent works ─────────────────────────────────────────────────────────── */
.ap-idx-recent { margin-top: 56px; }
.ap-idx-recent-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.ap-idx-recent-card {
    display: flex; flex-direction: column; gap: 8px;
    padding: 20px; border-radius: 16px; text-decoration: none; color: inherit;
    background: rgba(255,255,255,0.7); backdrop-filter: blur(6px);
    border: 1px solid rgba(0,0,0,0.04); transition: all 0.2s;
}
.ap-idx-recent-card:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.06); }
.ap-idx-recent-subj {
    display: inline-block; align-self: flex-start;
    padding: 2px 10px; border-radius: 6px; font-size: 11px; font-weight: 700;
    color: #fff; background: #c62828;
}
.ap-idx-recent-card h4 { font-size: 15px; font-weight: 700; margin: 0; line-height: 1.3; }
.ap-idx-recent-card p { font-size: 13px; color: #888; margin: 0; }
.ap-idx-recent-date { font-size: 12px; color: #bbb; margin-top: auto; }

/* ── Numbers bar ──────────────────────────────────────────────────────────── */
.ap-idx-numbers { display: flex; gap: 0; margin-top: 64px; border-radius: 20px; overflow: hidden; }
.ap-idx-num-card {
    flex: 1; text-align: center; padding: 28px 16px;
    background: linear-gradient(135deg, #fdf2f8, #fff7ed);
    border-right: 1px solid rgba(0,0,0,0.05);
}
.ap-idx-num-card:last-child { border-right: none; }
.ap-idx-num-val { display: block; font-size: 36px; font-weight: 900; color: #c62828; }
.ap-idx-num-lbl { display: block; font-size: 13px; color: #888; margin-top: 4px; }

/* ── Popular works ────────────────────────────────────────────────────────── */
.ap-idx-popular { margin-top: 64px; }
.ap-idx-popular-grid { display: flex; flex-direction: column; gap: 10px; }
.ap-idx-popular-card {
    display: flex; align-items: center; gap: 16px; padding: 16px 20px;
    border-radius: 14px; text-decoration: none; color: inherit;
    background: #fff; border: 1px solid #f0f0f0; transition: all 0.2s;
}
.ap-idx-popular-card:hover { border-color: #ddd; box-shadow: 0 4px 16px rgba(0,0,0,0.06); }
.ap-idx-popular-rank { font-size: 22px; width: 36px; text-align: center; flex-shrink: 0; }
.ap-idx-popular-info { flex: 1; min-width: 0; }
.ap-idx-popular-subj { font-size: 12px; color: #888; font-weight: 600; }
.ap-idx-popular-info h4 { font-size: 15px; font-weight: 700; margin: 2px 0; }
.ap-idx-popular-meta { font-size: 12px; color: #bbb; }

/* ── CTA ──────────────────────────────────────────────────────────────────── */
.ap-idx-cta { margin-top: 72px; }
.ap-idx-cta-inner {
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    padding: 36px 40px; border-radius: 20px;
    background: linear-gradient(135deg, #c62828, #e65100);
    color: #fff;
}
.ap-idx-cta-inner h2 { font-size: 22px; font-weight: 800; margin: 0; }
.ap-idx-cta-inner p { font-size: 14px; opacity: 0.85; margin: 6px 0 0; }

/* ══════════════════════════════════════════════════════════════════════════════
   LIST PAGE — /appreciation/<type>/
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── List hero ────────────────────────────────────────────────────────────── */
.ap-hero {
    position: relative; margin-top: -64px; padding: 80px 0 56px;
    background: linear-gradient(180deg, var(--ap-color,#fce4ec) 0%, #fff 100%);
    overflow: hidden;
}
.ap-hero-shape { position: absolute; border-radius: 50%; opacity: 0.12; pointer-events: none; }
.ap-hero-shape--1 { width:300px;height:300px;top:-80px;right:-60px;background:var(--ap-color,#c62828); }
.ap-hero-shape--2 { width:180px;height:180px;bottom:-40px;left:-40px;background:var(--ap-color,#c62828); }
.ap-hero-body { display: flex; align-items: center; gap: 40px; position: relative; z-index: 1; }
.ap-hero-text { flex: 1; min-width: 0; }
.ap-hero-text h1 { font-size: 34px; font-weight: 900; margin: 0 0 8px; }
.ap-hero-text p { font-size: 15px; color: #888; }
.ap-hero-stats { display: flex; gap: 32px; margin-top: 18px; }
.ap-hero-stat { display: flex; align-items: baseline; gap: 6px; }
.ap-hero-stat-num { font-size: 32px; font-weight: 900; color: var(--ap-color, #c62828); }
.ap-hero-stat-label { font-size: 14px; color: #888; }
.ap-hero-visual { flex: 0 0 180px; position: relative; height: 150px; }
.ap-hero-card {
    position: absolute; border-radius: 16px; background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.ap-hero-card:nth-child(1) { width:100px;height:100px;top:10px;left:10px;z-index:3;transform:rotate(-4deg); }
.ap-hero-card:nth-child(2) { width:70px;height:70px;top:70px;left:80px;z-index:2;transform:rotate(6deg); }
.ap-hero-card:nth-child(3) { width:56px;height:56px;top:15px;left:100px;z-index:1;transform:rotate(-2deg); }
.ap-hero-card-icon { font-size: 28px; }
.ap-hero-card span:last-child { font-size: 10px; color: #888; }

/* ── List layout (sidebar + main) ─────────────────────────────────────────── */
.ap-list { padding: 48px 0 80px; }
.ap-list-layout { display: grid; grid-template-columns: 240px 1fr; gap: 32px; align-items: start; }

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
.ap-list-sidebar { position: sticky; top: 80px; }
.ap-list-sidebar-inner {
    background: #fff; border-radius: 16px; border: 1px solid #f0f0f0;
    padding: 16px; display: flex; flex-direction: column; gap: 2px;
}
.ap-list-sidebar > * + * { margin-top: 16px; }
.ap-list-sidebar-all {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px; border-radius: 10px; text-decoration: none;
    color: #333; font-weight: 700; font-size: 14px; transition: all 0.2s;
}
.ap-list-sidebar-all:hover { background: #f5f5f5; }
.ap-list-sidebar-all.active { background: var(--ap-color, #c62828); color: #fff; }
.ap-list-sidebar-grade {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 14px; border-radius: 10px; text-decoration: none;
    color: #555; font-size: 13px; transition: all 0.2s;
}
.ap-list-sidebar-grade:hover { background: #f5f5f5; }
.ap-list-sidebar-grade.active { background: rgba(198,40,40,0.08); color: #c62828; font-weight: 700; }
.ap-list-sidebar-count { font-size: 11px; color: #aaa; background: #f5f5f5; padding: 2px 8px; border-radius: 10px; }
.ap-list-sidebar-all.active .ap-list-sidebar-count { background: rgba(255,255,255,0.2); color: #fff; }

/* ── Type switch chips ────────────────────────────────────────────────────── */
.ap-sidebar-type-switch {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid #eee;
}
.ap-type-chip {
    display: inline-block; padding: 6px 14px; border-radius: 20px;
    font-size: 13px; font-weight: 600; color: #666; background: #f5f5f5;
    text-decoration: none; transition: all 0.2s;
}
.ap-type-chip:hover { background: #e8e8e8; }
.ap-type-chip--active { font-weight: 700; }

/* ── Tag cloud ────────────────────────────────────────────────────────────── */
.ap-list-sidebar-tags { margin-top: 8px; padding-top: 12px; border-top: 1px solid #eee; }
.ap-list-sidebar-tags-title { font-size: 13px; font-weight: 700; color: #555; margin: 0 0 10px; }
.ap-list-tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.ap-tag-chip {
    display: inline-block; padding: 4px 10px; border-radius: 14px;
    font-size: 12px; color: #777; background: #f5f5f5;
    text-decoration: none; transition: all 0.2s;
}
.ap-tag-chip:hover { background: #e0e0e0; }
.ap-tag-chip.active { background: #c62828; color: #fff; font-weight: 600; }
.ap-tag-chip small { font-size: 10px; opacity: 0.7; }

/* ── Main content area ────────────────────────────────────────────────────── */
.ap-list-main { min-width: 0; }

/* ── Active filter bar ────────────────────────────────────────────────────── */
.ap-list-active-filter { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; font-size: 13px; color: #888; flex-wrap: wrap; }
.ap-filter-chip {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 12px; background: #c62828; color: #fff;
    font-size: 12px; font-weight: 600;
}
.ap-filter-close { color: #fff; text-decoration: none; font-size: 14px; line-height: 1; }

/* ── Work card grid ───────────────────────────────────────────────────────── */
.ap-work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

/* ── List card ────────────────────────────────────────────────────────────── */
.ap-list-card {
    display: flex; flex-direction: column; gap: 8px;
    padding: 20px; border-radius: 16px; text-decoration: none; color: inherit;
    background: #fff; border: 1px solid #f0f0f0; transition: all 0.25s;
}
.ap-list-card:hover { border-color: #ddd; transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,0.08); }
.ap-list-card-top { display: flex; align-items: center; gap: 8px; }
.ap-list-card-grade {
    display: inline-block; padding: 2px 10px; border-radius: 8px;
    font-size: 11px; font-weight: 700;
}
.ap-list-card-diff {
    display: inline-block; padding: 2px 8px; border-radius: 6px;
    font-size: 10px; font-weight: 700; text-transform: uppercase;
}
.ap-diff--easy { background: #e8f5e9; color: #2e7d32; }
.ap-diff--medium { background: #fff3e0; color: #e65100; }
.ap-diff--hard { background: #fce4ec; color: #c62828; }
.ap-list-card h3 { font-size: 16px; font-weight: 800; margin: 0; line-height: 1.3; }
.ap-list-card-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.ap-list-card-tags span {
    display: inline-block; padding: 2px 8px; border-radius: 6px;
    font-size: 11px; color: #888; background: #f5f5f5;
}
.ap-list-card-foot {
    display: flex; justify-content: space-between; font-size: 12px; color: #bbb; margin-top: auto;
}

.ap-work-author { font-size: 14px; color: #8d6e63; font-weight: 600; margin: 4px 0; }
.ap-work-summary { font-size: 13px; color: #888; margin: 6px 0 0; line-height: 1.5; }

/* ── Dynasty block ────────────────────────────────────────────────────────── */
.ap-dynasty-block { margin-bottom: 36px; }
.ap-dynasty-block-head {
    display: flex; align-items: baseline; gap: 12px;
    margin-bottom: 16px; padding-bottom: 8px; border-bottom: 2px solid #eee;
}
.ap-dynasty-block-head h3 { font-size: 18px; font-weight: 700; margin: 0; color: #333; }
.ap-dynasty-block-count { font-size: 13px; color: #999; }

/* ── Empty state ──────────────────────────────────────────────────────────── */
.ap-list-empty { text-align: center; padding: 48px 0; color: #bbb; font-size: 15px; }

/* ══════════════════════════════════════════════════════════════════════════════
   DETAIL PAGE — /appreciation/<type>/<id>/
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Breadcrumb nav ───────────────────────────────────────────────────────── */
.ap-detail-nav { padding: 16px 0; background: #fafafa; border-bottom: 1px solid #f0f0f0; }
.ap-breadcrumb-sep { color: #ccc; margin: 0 4px; font-size: 12px; }
.ap-breadcrumb-current { font-size: 14px; color: #666; font-weight: 600; }

/* ── Article layout ───────────────────────────────────────────────────────── */
.ap-article { padding: 40px 0 80px; }
.ap-article-layout { display: grid; grid-template-columns: 1fr 280px; gap: 40px; align-items: start; }
.ap-article-main { min-width: 0; }

/* ── Article header ───────────────────────────────────────────────────────── */
.ap-article-header { margin-bottom: 24px; }
.ap-article-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ap-badge {
    display: inline-block; padding: 3px 12px; border-radius: 8px;
    font-size: 12px; font-weight: 700; color: #fff;
}
.ap-badge--grade { background: #f5f5f5; color: #666; }
.ap-badge--diff { font-size: 10px; }
.ap-article-title { font-size: 32px; font-weight: 900; line-height: 1.3; margin: 0 0 12px; }
.ap-article-meta { display: flex; gap: 16px; font-size: 13px; color: #bbb; }

/* ── Tags ──────────────────────────────────────────────────────────────────── */
.ap-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0; }
.ap-tag {
    display: inline-block; padding: 3px 12px; border-radius: 12px;
    font-size: 12px; color: #777; background: #f5f5f5; font-weight: 500;
}

/* ── Content area ──────────────────────────────────────────────────────────── */
.ap-content { font-size: 15px; line-height: 1.85; color: #444; }
.ap-content h2 { font-size: 22px; font-weight: 800; margin: 32px 0 14px; }
.ap-content h3 { font-size: 18px; font-weight: 700; margin: 24px 0 10px; }
.ap-content p { margin: 0 0 12px; }
.ap-content blockquote {
    margin: 12px 0; padding: 12px 20px; background: #fafafa;
    border-left: 3px solid #c62828; font-style: italic; color: #666;
}
.ap-content ul, .ap-content ol { margin: 8px 0; padding-left: 20px; }
.ap-content li { margin-bottom: 4px; }
.ap-content .line-analysis {
    margin-bottom: 16px; padding: 14px 18px;
    background: #fefdf8; border: 1px solid #f0e6d3; border-radius: 10px;
}
.ap-content .line-analysis strong { color: #c62828; }
.ap-content .famous-line { background: #fff8e1; padding: 2px 6px; border-radius: 4px; font-weight: 600; }

/* ── Original text block ───────────────────────────────────────────────────── */
.ap-original-text {
    background: linear-gradient(135deg, #fdf8f3 0%, #fff9f0 100%);
    border: 1px solid #e8d5b7; border-radius: 12px; padding: 28px 32px; margin: 28px 0;
}
.ap-original-content {
    font-size: 20px; line-height: 2.2; color: #4e342e;
    font-family: "STKaiti", "KaiTi", "楷体", serif;
    white-space: pre-line; text-align: center;
}

/* ── Section title within article ─────────────────────────────────────────── */
.ap-section-title {
    font-size: 22px; font-weight: 800; color: #333;
    margin: 0 0 16px; padding-bottom: 8px; border-bottom: 2px solid #f0e6d3;
}

/* ── Author line ──────────────────────────────────────────────────────────── */
.ap-author-line { font-size: 18px; color: #555; margin: 8px 0 4px; }
.ap-author-dynasty { font-size: 14px; color: #999; margin-left: 8px; }
.ap-author-source { font-size: 13px; color: #bbb; margin-left: 12px; }
.ap-work-grade-info { font-size: 14px; color: #8d6e63; margin: 4px 0 0; }

/* ── Translation section ──────────────────────────────────────────────────── */
.ap-translation {
    background: #f3e5f5; border: 1px solid #e1bee7;
    border-radius: 12px; padding: 24px 28px; margin: 28px 0;
}

/* ── Appreciation section ──────────────────────────────────────────────────── */
.ap-appreciation { margin: 28px 0; }

/* ── Famous lines ─────────────────────────────────────────────────────────── */
.ap-famous-lines { margin: 28px 0; }
.ap-famous-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ap-famous-item {
    background: linear-gradient(135deg, #fff8e1, #fff3e0);
    border-left: 4px solid #f57c00; border-radius: 8px; padding: 16px 20px;
}
.ap-famous-quote { font-size: 18px; color: #e65100; font-weight: 700; font-style: italic; line-height: 1.7; }

/* ── Background section ────────────────────────────────────────────────────── */
.ap-background {
    background: #f9fbe7; border: 1px solid #e6ee9c;
    border-radius: 12px; padding: 24px 28px; margin: 28px 0;
}

/* ── Action buttons ───────────────────────────────────────────────────────── */
.ap-actions { display: flex; gap: 12px; margin-top: 36px; padding-top: 24px; border-top: 1px solid #f0f0f0; }

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
.ap-article-sidebar { position: sticky; top: 80px; }
.ap-sidebar-card {
    background: #fff; border: 1px solid #f0f0f0; border-radius: 14px;
    padding: 20px; margin-bottom: 16px;
}
.ap-sidebar-title { font-size: 15px; font-weight: 800; margin: 0 0 14px; color: #333; }
.ap-related-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ap-related-link {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px;
    border-radius: 10px; text-decoration: none; color: inherit; transition: all 0.2s;
}
.ap-related-link:hover { background: #f9f9f9; }
.ap-related-diff { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.ap-related-diff.ap-diff--easy { background: #66bb6a; }
.ap-related-diff.ap-diff--medium { background: #ffa726; }
.ap-related-diff.ap-diff--hard { background: #ef5350; }
.ap-related-label { font-size: 14px; font-weight: 600; display: block; }
.ap-related-meta { font-size: 12px; color: #bbb; display: block; }

.ap-subject-mini-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.ap-subject-mini-chip {
    display: inline-block; padding: 4px 14px; border-radius: 12px;
    font-size: 12px; color: #777; background: #f5f5f5;
    text-decoration: none; transition: all 0.2s;
}
.ap-subject-mini-chip:hover { background: #e0e0e0; color: #333; }

/* ══════════════════════════════════════════════════════════════════════════════
   SHARED — Daily banner & Dynasty bar (Index + List)
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Daily recommendation banner ──────────────────────────────────────────── */
.ap-daily-banner {
    display: flex; align-items: center; gap: 40px;
    background: linear-gradient(135deg, #fdf2f8 0%, #fff7ed 50%, #fce4ec 100%);
    border: 2px solid #f8bbd0; border-radius: 16px; padding: 36px 40px; margin-bottom: 48px;
}
.ap-daily-banner-content { flex: 1; min-width: 0; }
.ap-daily-banner-tag {
    display: inline-block; background: #c62828; color: #fff;
    padding: 4px 14px; border-radius: 20px; font-size: 13px; font-weight: 700; margin-bottom: 12px;
}
.ap-daily-banner h3 { font-size: 26px; margin: 0 0 6px; color: #333; }
.ap-daily-banner-author { font-size: 15px; color: #8d6e63; font-weight: 600; margin-bottom: 8px; }
.ap-daily-banner-desc { font-size: 14px; color: #777; line-height: 1.7; margin-bottom: 16px; }
.ap-daily-banner-quote { flex: 0 0 280px; }
.ap-daily-banner-quote blockquote {
    font-size: 20px; color: #c62828; font-weight: 700; font-style: italic;
    line-height: 1.7; border-left: 4px solid #c62828; padding-left: 20px;
    margin: 0; background: rgba(255,255,255,0.5); padding: 20px; border-radius: 8px;
}

/* ── Dynasty distribution bar ──────────────────────────────────────────────── */
.ap-dynasty-section { margin-top: 56px; margin-bottom: 48px; }
.ap-dynasty-bar { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.ap-dynasty-bar-item { display: flex; align-items: center; gap: 12px; }
.ap-dynasty-bar-label { flex: 0 0 60px; font-size: 14px; color: #666; text-align: right; }
.ap-dynasty-bar-track { flex: 1; height: 10px; background: #f0f0f0; border-radius: 5px; overflow: hidden; }
.ap-dynasty-bar-fill {
    height: 100%; background: linear-gradient(90deg, #c62828, #f57c00);
    border-radius: 5px; transition: width 0.6s ease;
}
.ap-dynasty-bar-count { flex: 0 0 40px; font-size: 13px; color: #999; }

/* ══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .ap-idx-grid { grid-template-columns: repeat(2, 1fr); }
    .ap-idx-recent-grid { grid-template-columns: repeat(2, 1fr); }
    .ap-list-layout { grid-template-columns: 1fr; }
    .ap-list-sidebar { position: static; }
    .ap-article-layout { grid-template-columns: 1fr; }
    .ap-article-sidebar { position: static; order: -1; }
    .ap-work-grid { grid-template-columns: 1fr; }
    .ap-article-title { font-size: 24px; }
}

@media (max-width: 768px) {
    .ap-idx-hero-body { flex-direction: column; }
    .ap-idx-hero-text h1 { font-size: 32px; }
    .ap-idx-hero-visual { flex: none; width: 100%; height: 160px; }
    .ap-idx-grid { grid-template-columns: 1fr 1fr; }
    .ap-idx-recent-grid { grid-template-columns: 1fr; }
    .ap-idx-popular-grid { gap: 8px; }
    .ap-idx-stats { gap: 20px; }
    .ap-idx-stat em { font-size: 28px; }
    .ap-idx-numbers { flex-wrap: wrap; }
    .ap-idx-num-card { flex: 1 1 45%; border-right: none; border-bottom: 1px solid rgba(0,0,0,0.05); }
    .ap-daily-banner { flex-direction: column; padding: 24px; gap: 20px; }
    .ap-daily-banner-quote { flex: none; width: 100%; }
    .ap-hero-body { flex-direction: column; }
    .ap-hero-visual { flex: none; width: 100%; height: 120px; }
    .ap-hero-text h1 { font-size: 26px; }
    .ap-idx-cta-inner { flex-direction: column; text-align: center; }
    .ap-original-content { font-size: 17px; }
}
