* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f4efe6;
    color: #333;

    font-family:
        "Noto Sans SC",
        "Microsoft YaHei",
        "PingFang SC",
        Arial,
        sans-serif;
}


/* =========================
   顶部
========================= */

header {
    text-align: center;
    padding: 35px 20px 20px;
}

header h1 {
    margin: 0;

    font-size: 34px;

    color: #3d3a35;
}

header p {
    margin-top: 10px;

    color: #777;
}


/* =========================
   模式选择
========================= */

.switch {
    display: flex;

    justify-content: center;

    gap: 12px;

    margin: 10px auto 25px;
}

.switch button {
    border: none;

    padding: 12px 25px;

    border-radius: 30px;

    cursor: pointer;

    background: #ddd5c8;

    color: #555;

    font-size: 16px;

    transition: 0.2s;
}

.switch button:hover {
    transform: translateY(-2px);
}

.switch button.active {
    background: #45413b;

    color: white;
}


/* =========================
   PDF按钮
========================= */

.download {
    display: block;

    margin: 0 auto 25px;

    padding: 12px 25px;

    border: none;

    border-radius: 8px;

    background: #b85c38;

    color: white;

    font-size: 16px;

    cursor: pointer;
}

.download:hover {
    opacity: 0.85;
}

.download:disabled {
    opacity: 0.6;

    cursor: wait;
}


/* =========================
   PDF / 页面主体
========================= */

#paper {
    width: 900px;

    margin: auto;

    padding: 45px;

    background: #fffdf8;

    box-shadow:
        0 5px 30px rgba(0, 0, 0, 0.1);
}


/* =========================
   标题
========================= */

.paper-title {
    text-align: center;

    margin-bottom: 35px;
}

.paper-title h2 {
    margin: 0;

    font-size: 30px;
}

.paper-title p {
    color: #777;
}


/* =========================
   卡片
========================= */

.card {
    background: white;

    border-radius: 15px;

    margin-bottom: 30px;

    padding: 25px;

    border: 1px solid #e8e0d3;

    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.05);
}

.card h3 {
    margin-top: 0;

    font-size: 22px;

    color: #3f3a34;
}

.card h4 {
    margin-bottom: 8px;
}


/* =========================
   图片
========================= */

.card img {
    display: block;

    width: 100%;

    max-height: 360px;

    object-fit: cover;

    border-radius: 10px;

    margin: 15px 0 20px;
}


/* =========================
   标签
========================= */

.label {
    display: inline-block;

    background: #eee6da;

    color: #695f54;

    padding: 5px 10px;

    border-radius: 15px;

    font-size: 13px;

    margin-bottom: 12px;
}


/* =========================
   新闻摘录
========================= */

.excerpt {
    background: #f5f1ea;

    padding: 15px;

    border-left: 4px solid #b85c38;

    line-height: 1.8;

    margin: 15px 0;
}


/* =========================
   点评
========================= */

.comment {
    line-height: 2;

    text-align: justify;
}


/* =========================
   来源
========================= */

.source {
    color: #888;

    font-size: 13px;

    margin-top: 15px;
}


/* =========================
   手账模式
========================= */

.journal .card {
    background: #fffdf4;

    transform: rotate(-0.3deg);
}

.journal .card:nth-child(even) {
    transform: rotate(0.3deg);
}

.journal .card h3 {
    color: #7a513c;
}

.journal .keywords {
    margin-top: 15px;

    color: #777;

    font-size: 14px;
}


/* =========================
   新闻模式
========================= */

.news .card {
    border-radius: 5px;

    border-left: 6px solid #444;
}

.news .paper-title h2 {
    font-family: Georgia, serif;
}


/* =========================
   手机适配
========================= */

@media (max-width: 950px) {

    #paper {
        width: 95%;

        padding: 25px;
    }

}


@media (max-width: 600px) {

    header h1 {
        font-size: 26px;
    }

    #paper {
        width: 100%;

        padding: 18px;
    }

    .card {
        padding: 18px;
    }

    .switch {
        flex-direction: column;

        width: 90%;
    }

    .switch button {
        width: 100%;
    }

}