* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { overflow-x: hidden; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: #f6f6f6;
    color: #3c3c3c;
    line-height: 1.5;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #9d1515;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.topbar h1 {
    max-width: 720px;
    margin: 0 auto;
    padding: 14px 16px;
    font-size: 18px;
    font-weight: 700;
    color: #eef4ff;
}

.tabs {
    display: flex;
    justify-content: center;
    background: #9d1515;
    padding: 0 12px;
}
.tabs a {
    flex: 1;
    max-width: 180px;
    text-align: center;
    padding: 11px 0;
    color: #eef4ff;
    text-decoration: none;
    font-size: 15px;
    border-bottom: 3px solid transparent;
}
.tabs a.active {
    color: #fff;
    border-bottom-color: #ffd200;
    font-weight: 600;
}

.subtabs {
    display: flex;
    background: #242a4e;
    padding: 0 12px;
}
.subtabs a {
    padding: 9px 0;
    margin-right: 26px;
    color: #aab0cc;
    text-decoration: none;
    font-size: 14px;
    border-bottom: 3px solid transparent;
}
.subtabs a.active {
    color: #fff;
    border-bottom-color: #3a80f6;
    font-weight: 600;
}

.item { margin-bottom: 26px; }

.pdf-list { display: flex; flex-direction: column; gap: 8px; }
.pdf-link {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border-radius: 10px;
    padding: 12px 14px;
    text-decoration: none;
    color: #222;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.pdf-link .pi { font-size: 18px; }
.pdf-link .pn {
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.main { max-width: 720px; margin: 0 auto; padding: 12px 12px 40px; }

.song-head {
    padding: 10px 4px 12px;
    border-bottom: 1px solid #e3e4e8;
    margin-bottom: 12px;
}
.song-head h2 { font-size: 20px; }
.meta { color: #888; font-size: 13px; margin-top: 4px; }

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.cell {
    display: block;
    position: relative;
    padding-top: 100%;
    border-radius: 10px;
    overflow: hidden;
    background: #e9eaee;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
.cell img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.empty {
    text-align: center;
    color: #999;
    padding: 48px 0;
    font-size: 15px;
}

.view-img { width: 100%; display: block; }

/* 图文内容自动排版美化（江西手机模式） */
.content {
    background: #fff;
    padding: 10px 0;
    font-size: 17px;
    line-height: 1.75;
    color: #333;
    word-break: break-word;
    overflow: hidden;
}
.content p { margin: 0 0 14px; text-align: justify; }
.content p:last-child { margin-bottom: 0; }
.content img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 12px auto;
    object-fit: contain;
}
.content img[style*="float:left"] {
    width: auto !important;
    max-width: 100% !important;
    float: left;
    margin: 4px 16px 10px 0;
}
.content img[style*="float:right"] {
    width: auto !important;
    max-width: 100% !important;
    float: right;
    margin: 4px 0 10px 16px;
}
.content h1, .content h2, .content h3, .content h4 {
    margin: 20px 0 10px;
    line-height: 1.4;
    color: #1b1f3a;
}
.content h1 { font-size: 22px; }
.content h2 { font-size: 20px; }
.content h3 { font-size: 18px; }
.content h4 { font-size: 17px; }
.content strong { font-weight: 700; }
.content a { color: #0073df; text-decoration: none; }
.content a:hover { text-decoration: underline; }
.content blockquote {
    margin: 14px 0;
    padding: 10px 14px;
    background: #f6f7f9;
    border-left: 4px solid #9d1515;
    color: #555;
}
.content ul, .content ol { margin: 0 0 14px; padding-left: 1.6em; }
.content li { margin-bottom: 4px; }
.content table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin: 14px 0;
    font-size: 14px;
}
.content th, .content td { border: 1px solid #e3e5e9; padding: 8px 10px; text-align: left; }
.content th { background: #f7f8fa; font-weight: 600; }
.content hr { border: none; border-top: 1px solid #e3e5e9; margin: 18px 0; }

/* PDF 内置模式 */
.pdf-embed { margin-bottom: 22px; }
.pdf-embed-title { font-size: 15px; font-weight: 600; margin-bottom: 8px; padding: 0 4px; }
.pdf-embed-frame {
    width: 100%;
    min-height: 600px;
    border: 1px solid #e3e5e9;
    border-radius: 8px;
    background: #fff;
    display: block;
}

@media (min-width: 600px) {
    .grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
}

/* 桌面端：内容与顶栏整体限宽居中，移动/电脑兼容 */
@media (min-width: 900px) {
    .main { max-width: 860px; padding: 20px 24px 60px; }
    .topbar h1 { max-width: 860px; }
    .tabs a { max-width: 215px; }
}