header {
    background: linear-gradient(135deg, var(--primary-color), #2980b9);
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(0.75rem, 2vw, 1rem) 0;
    min-height: 3.5rem;
}
.logo {
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--text-white);
}
.container select {
    width: 49%;
    height: auto;
    margin-bottom: 0.8rem;
    padding: clamp(0.4rem, 2.5vw, 0.7rem) clamp(0.5rem, 3vw, 1rem);
    border-radius: clamp(0.5rem, 3vw, 1rem);
    border: 1px solid var(--secondary-color);
    font-size: clamp(1.2rem, 4vw, 1.5rem);
}
.foldable-content {
    padding: 1rem 1.2rem;
    border-top: 1px solid #f0cfcf;
    background: #ffffff;
    font-size: 0.9rem;
    line-height: 1.7;
    color: #4a2a2a;
}
.poem-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}
.poem-list-card {
    background: #fff;
    border: 0.0625rem solid #e0b0b0;
    border-radius: 1.5rem;
    padding: 1rem;
    cursor: pointer;
    box-shadow: 0 0.25rem 0.75rem rgba(160, 30, 30, 0.08);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.poem-list-card:hover {
    background: #fff5f0;
    transform: translateY(-0.125rem);
}
.poem-list-card .info { flex: 1; }
.poem-list-card .poem-title { font-size: 1.4rem; font-weight: 700; color: #a02323; }
.poem-list-card .poem-author { font-size: 0.95rem; color: #8b4a4a; }
.poem-list-card .arrow { font-size: 1.8rem; color: #c12b2b; }

/* 弹窗样式 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(60, 10, 10, 0.85);
    backdrop-filter: blur(0.375rem);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}
.modal-overlay.active { display: flex; }
.modal-content {
    background: #fffbf5;
    max-width: 38rem;
    width: 100%;
    border-radius: 2rem;
    padding: 2rem 1.5rem;
    position: relative;
    box-shadow: 0 1.25rem 2.5rem rgba(0,0,0,0.4);
    border: 0.125rem solid #c12b2b;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    width: 2.5rem;
    height: 2.5rem;
    background: #c12b2b;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,0.2);
}
.modal-close:hover { background: #9f1c1c; }

/* ========== 核心：字上一对一拼音 (ruby样式) ========== */
.poem-title-ruby {
    text-align: center;
    margin-bottom: 0.5rem;
}
.ruby-title {
    font-size: 1.9rem;
    font-weight: 800;
    color: #a02323;
    letter-spacing: 0.1em;
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.3rem;
}
.ruby-char {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 2.2rem;
}
.char-pinyin {
    font-size: 1rem;
    font-weight: normal;
    color: #b97f5c;
    letter-spacing: 0;
    margin-bottom: 0.2rem;
    line-height: 1.2;
}
.char-han {
    font-size: 1.7rem;
    font-weight: 700;
    color: #a02323;
    line-height: 1.3;
}
.modal-poem-author {
    text-align: center;
    color: #8b4a4a;
    font-size: 1rem;
}
/* 诗句ruby容器 */
.verse-line {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}
.verse-ruby {
    display: inline-flex;
    justify-content: center;
    gap: 0.25rem 0.5rem;
}
.ruby-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 1.5rem;
}
.item-pinyin {
    font-size: 1rem;
    color: #b97f5c;
    font-weight: normal;
    margin-bottom: 0.2rem;
    letter-spacing: 0;
}
.item-han {
    width: 2.5rem;
    font-size: 1.5rem;
    font-weight: 650;
    color: #2e1a1a;
    line-height: 1.3;
}
.item-han .hl {
    color: #b22222;
    font-weight: 800;
    border-bottom: 0.125rem solid #d4883a;
}
/* 标点符号特殊处理（无拼音） */
.punct-item {
    min-width: 1.2rem;
}
.punct-item .item-pinyin {
    visibility: hidden;
    min-height: 1rem;
}
.pinyin-hidden .item-pinyin,
.pinyin-hidden .char-pinyin {
    display: none;
}
.toggle-pinyin-btn {
    background: #fdf3e7;
    border: 1px solid #d49b9b;
    border-radius: 2rem;
    padding: 0.3rem 1.2rem;
    font-size: 0.8rem;
    cursor: pointer;
    color: #a02323;
    font-weight: 500;
    position: absolute;
    top: 5rem;
    right: 1.2rem;
}
.toggle-pinyin-btn:hover { background: #fce9d2; }

.dialect-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
    margin-top: 1.5rem;
}
@media (max-width: 26.25rem) {
    .dialect-buttons { grid-template-columns: 1fr; }
}
.dialect-btn {
    background: #fdf3e7;
    border: 0.0625rem solid #d49b9b;
    border-radius: 2.5rem;
    padding: 0.7rem 0.8rem;
    font-size: 0.95rem;
    cursor: pointer;
    color: #5e2e2e;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.dialect-btn:hover { background: #fce9d2; border-color: #b22222; }
.dialect-btn .region-name {  min-width: 3rem;font-weight: 700; }
.dialect-btn .speaker { font-size: 1rem; color: #8b4a4a; }