:root {
    --bg: #f7f4ec;
    --card: #fffdf7;
    --ink: #2b2620;
    --muted: #8a8170;
    --accent: #9c2b2b;
    --line: #e6ddc9;
    --max: 880px;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
    line-height: 1.7;
}
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

.site-header {
    background: #fffdf7;
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 10;
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; padding: 12px 16px; flex-wrap: wrap; }
.brand { font-size: 20px; font-weight: 700; color: var(--accent); text-decoration: none; white-space: nowrap; }
.brand .mirror { color: var(--muted); font-weight: 400; font-size: 15px; }
.search { display: flex; gap: 8px; margin-left: auto; flex: 1; min-width: 220px; max-width: 420px; }
.search input {
    flex: 1; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px;
    background: #fff; font-size: 15px; font-family: inherit;
}
.search button {
    padding: 8px 16px; border: none; border-radius: 8px; background: var(--accent); color: #fff;
    font-size: 15px; cursor: pointer;
}
.search button:hover { opacity: .9; }

main.wrap { padding-top: 22px; padding-bottom: 40px; }

/* home */
.hero { text-align: center; padding: 18px 0 26px; }
.hero h1 { font-size: 30px; margin: 0 0 8px; color: var(--accent); letter-spacing: 4px; }
.hero .muted { margin: 0 auto 14px; max-width: 560px; }
.btn {
    display: inline-block; padding: 9px 22px; background: var(--accent); color: #fff;
    border-radius: 8px; text-decoration: none; font-size: 15px;
}

.section-title { font-size: 19px; color: var(--ink); border-left: 4px solid var(--accent); padding-left: 10px; margin: 26px 0 14px; }

.poem-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.card {
    background: var(--card); border: 1px solid var(--line); border-radius: 12px;
    padding: 14px 16px; text-decoration: none; color: inherit; display: block;
    transition: transform .12s, box-shadow .12s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.06); }
.card-title { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.card-meta { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.card-text { font-size: 14px; color: #5b5446; white-space: pre-wrap; }

/* poem detail */
.poem-head { text-align: center; margin-bottom: 18px; }
.poem-head h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: 2px; }
.poem-meta { color: var(--accent); font-size: 16px; }
.poem-meta a { color: var(--accent); text-decoration: none; }
.poem-meta a:hover { text-decoration: underline; }
.src-link { font-size: 13px; color: var(--muted); text-decoration: none; }
.src-link:hover { text-decoration: underline; }

.poem-content {
    background: var(--card); border: 1px solid var(--line); border-radius: 12px;
    padding: 22px; font-size: 18px; white-space: pre-wrap; text-align: center;
    letter-spacing: 1px; margin-bottom: 22px;
}

.sections .section {
    background: var(--card); border: 1px solid var(--line); border-radius: 12px;
    padding: 16px 20px; margin-bottom: 14px;
}
.sections .section h2 { font-size: 17px; color: var(--accent); margin: 0 0 10px; }
.section-body { white-space: pre-wrap; font-size: 15.5px; color: #3a342b; }

.author-bio {
    background: #fbf6ea; border: 1px dashed var(--line); border-radius: 12px;
    padding: 14px 18px; margin-top: 22px; font-size: 14.5px; color: #4a4339;
}
.author-bio h3 { margin: 0 0 8px; font-size: 16px; color: var(--ink); }

/* author page */
.author-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.author-head h1 { font-size: 26px; margin: 0; color: var(--accent); letter-spacing: 3px; }

/* search */
.search-big { max-width: 520px; margin: 6px 0 18px; }
.search-big input { font-size: 16px; padding: 11px 14px; }
.search-big button { padding: 11px 20px; }

.muted { color: var(--muted); font-size: 14px; }

.site-footer { border-top: 1px solid var(--line); margin-top: 30px; background: #fffdf7; }
.site-footer .wrap { padding: 18px 16px; font-size: 13px; color: var(--muted); }
.site-footer a { color: var(--accent); text-decoration: none; }

@media (max-width: 520px) {
    .poem-grid { grid-template-columns: 1fr; }
    .poem-content { font-size: 16px; }
}
