/* ===== 基础样式 ===== */
.lang-disabled{color:#999;cursor:default;}
body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f5f7fb;
    color: #1e293b;
    margin: 0;
    line-height: 1.6;
}
.page { display: flex; flex-direction: column; min-height: 100vh; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; width: 100%; box-sizing: border-box; }

/* 顶部导航 */
.topbar { background: #ffffff; border-bottom: 1px solid #e5e9f0; padding: 12px 0; position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 4px rgba(15,23,42,0.04); }
.topbar-inner { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 24px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: #0f172a; font-weight: 600; font-size: 1.2rem; flex-shrink: 0; }
a.logo,
a.logo:visited,
a.logo:hover {
    color: #0f172a;
    text-decoration: none;
}
.logo img { height: 32px; width: auto; }
.lang-switch { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: #64748b; flex-shrink: 0; }
.lang-switch a { color: #2f6fdd; text-decoration: none; transition: color 0.2s; }
.lang-switch a:hover { color: #1d4ed8; text-decoration: underline; }
.lang-current { color: #0f172a; font-weight: 500; }
.lang-divider { color: #cbd5e1; }

/* ===== 搜索框 + 按钮（按参考站调整） ===== */
.search-form { display: flex; margin-left: auto; flex-shrink: 0; align-items: stretch; }
.search-form input {
    padding: 10px 16px;
    border: 1px solid #dbe2ea;
    border-right: none;
    border-radius: 10px 0 0 10px;
    font-size: 0.95rem;
    outline: none;
    width: 320px;                 /* 加宽搜索框 */
    background: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.search-form input:focus {
    border-color: #2f6fdd;
    box-shadow: 0 0 0 3px rgba(47,111,221,0.12);
}
.search-form .btn-primary {
    border-radius: 0 10px 10px 0;
    padding: 10px 28px;           /* 加宽按钮 */
    font-size: 0.95rem;
    border: 1px solid #2f6fdd;
    background: #2f6fdd;
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, transform 0.1s;
}
.search-form .btn-primary:hover { background: #1d4ed8; }
.search-form .btn-primary:active { transform: scale(0.97); }

/* 面包屑 */
.breadcrumb { background: #ffffff; padding: 10px 0; border-bottom: 1px solid #e5e9f0; font-size: 0.9rem; }
.breadcrumb .container { display: flex; align-items: center; gap: 8px; }
.breadcrumb a { color: #2f6fdd; text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: #1d4ed8; text-decoration: underline; }
.breadcrumb-sep { color: #94a3b8; }
.breadcrumb-current { color: #475569; }

/* 主内容区 */
main.container {
    padding-top: 20px;
    padding-bottom: 24px;
    flex: 1;
}

/* ===== Hero ===== */
.hero {
    text-align: left;
    margin-bottom: 20px;
}
.hero-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 8px;
    line-height: 1.4;
}
.hero-char {
    color: #2f6fdd;
    font-size: 2rem;
}
.hero-subtitle {
    color: #475569;
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.7;
}
.hero-subtitle strong { color: #0f172a; }

/* ===== 两栏布局 ===== */
.layout-two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}
.layout-two-columns > .card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 卡片通用 */
.card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 4px rgba(15,23,42,0.04), 0 4px 12px rgba(15,23,42,0.03);
    border: 1px solid #e5e9f0;
    box-sizing: border-box;
}
.card-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}
.section-subtitle { font-size: 1rem; font-weight: 600; color: #334155; margin: 16px 0 10px; }

/* 动画区域 */
.animation-wrapper { text-align: center; background: #f5f7fb; border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.animation-main { max-width: 100%; height: auto; max-height: 240px; display: block; margin: 0 auto; }

/* 书法欣赏 */
.calligraphy-wrapper {
    flex: 1;
    margin-top: 16px;
    text-align: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.calligraphy-wrapper h3 { font-size: 0.95rem; margin-bottom: 8px; color: #475569; font-weight: 600; }
.calligraphy-img-wrap {
    cursor: pointer;
    display: inline-block;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(15,23,42,0.08);
    border: 1px solid #e5e9f0;
    transition: transform 0.2s, box-shadow 0.2s;
}
.calligraphy-img-wrap:hover { transform: scale(1.02); box-shadow: 0 6px 20px rgba(47,111,221,0.15); }
.calligraphy-img-wrap img { display: block; max-width: 100%; max-height: 220px; height: auto; }
.click-hint { font-size: 0.75rem; color: #94a3b8; margin-top: 6px; }

/* 笔顺分步演示 */
.steps-wrapper { margin-top: 8px; }
.steps-img-wrap {
    cursor: pointer;
    display: inline-block;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #e5e9f0;
}
.steps-img-wrap:hover { transform: scale(1.01); box-shadow: 0 6px 20px rgba(47,111,221,0.12); }
.steps-img-wrap img { display: block; width: 100%; max-width: 500px; margin: 0 auto; }

/* ===== 基本信息列表 ===== */
.meta-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 20px;
    row-gap: 0;
    margin: 0;
}
.meta-item {
    display: flex;
    align-items: baseline;
    padding: 8px 0;
    border-bottom: 1px dashed #f1f5f9;
    min-width: 0;
}
.meta-item dt {
    width: 62px;
    font-size: 0.9rem;
    color: #64748b;
    flex-shrink: 0;
    font-weight: 500;
}
.meta-item dd {
    margin: 0;
    font-size: 0.95rem;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    word-break: break-all;
}
.meta-item.meta-full { grid-column: 1 / -1; }
.meta-char {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2f6fdd;
    line-height: 1.2;
}

/* 音频按钮 */
.audio-btn {
    background: #eef4ff;
    border: 1px solid #c7d8f5;
    border-radius: 10px;
    padding: 5px 14px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #2f6fdd;
    transition: all 0.2s;
    white-space: nowrap;
}
.audio-btn:hover { background: #dbe8ff; border-color: #2f6fdd; transform: translateY(-1px); }
.audio-btn:active { transform: scale(0.97); }

/* ===== PDF 链接：按钮间距 + 悬停下划线 ===== */
.pdf-links { margin-top: 20px; padding-top: 16px; border-top: 1px solid #f1f5f9; }
.pdf-links p {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;                     /* 两个 PDF 按钮之间的间距 */
}
.btn-primary {
    display: inline-block;
    background: #2f6fdd;
    color: #fff !important;        /* 加上 !important 强制生效 */
    padding: 10px 22px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
}
.btn-primary:hover {
    background: #1d4ed8;
    color: #fff !important;                  /* 加上这一行，保证悬停时文字仍为白色 */
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(47,111,221,0.25);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.btn-primary:active { transform: translateY(0); }

/* 笔画分解全宽 */
.stroke-breakdown-section {
    margin: 24px 0 28px;
    padding: 20px 24px 24px;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e5e9f0;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 1px 4px rgba(15,23,42,0.03);
}
.section-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 18px; }
.section-header h2 { font-size: 1.15rem; margin: 0; color: #0f172a; font-weight: 600; }
.stroke-count-badge { background: #2f6fdd; color: #fff; padding: 4px 16px; border-radius: 20px; font-size: 0.85rem; font-weight: 500; }
.stroke-grid { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-start; }
.stroke-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 10px 8px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e9f0;
    min-width: 70px;
    transition: all 0.25s ease;
    box-shadow: 0 1px 3px rgba(15,23,42,0.03);
    flex-shrink: 0;
}
.stroke-item:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(47,111,221,0.12); border-color: #2f6fdd; }
.stroke-img-wrapper {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f7fb;
    border-radius: 10px;
    border: 1px solid #e5e9f0;
    transition: border-color 0.2s;
}
.stroke-item:hover .stroke-img-wrapper { border-color: #2f6fdd; }
.stroke-img-wrapper img { max-width: 44px; max-height: 44px; object-fit: contain; }
.stroke-number { font-size: 11px; color: #94a3b8; margin-top: 6px; font-weight: 500; }
.stroke-name { font-size: 13px; color: #1e293b; font-weight: 500; margin-top: 0px; }
.stroke-fallback { font-size: 24px; color: #cbd5e1; }
.stroke-hint { text-align: center; font-size: 12px; color: #94a3b8; margin-top: 16px; border-top: 1px dashed #e5e9f0; padding-top: 14px; }
.stroke-grid.many-strokes .stroke-item { min-width: 56px; padding: 6px 5px 5px; }
.stroke-grid.many-strokes .stroke-img-wrapper { width: 44px; height: 44px; }
.stroke-grid.many-strokes .stroke-img-wrapper img { max-width: 34px; max-height: 34px; }
.stroke-grid.many-strokes .stroke-name { font-size: 11px; }
.stroke-grid.many-strokes .stroke-number { font-size: 9px; }

/* 字典释义 */
.legacy-html { font-size: 0.95rem; color: #334155; line-height: 1.8; }
.legacy-html p { margin: 0 0 12px 0; }
.legacy-html .dangqianhanzi { font-weight: 600; color: #2f6fdd; }

/* ===== 常用组词 - 卡片网格 ===== */
.word-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.word-card {
    background: #ffffff;
    border: 1px solid #e5e9f0;
    border-radius: 10px;
    padding: 12px 16px;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.word-card:hover {
    border-color: #2f6fdd;
    box-shadow: 0 4px 12px rgba(47,111,221,0.12);
    transform: translateY(-2px);
}
.word-card .word-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.word-card .word-title { font-size: 1rem; font-weight: 600; color: #0f172a; }
.word-card .word-pinyin { font-size: 0.8rem; color: #2f6fdd; background: #eef4ff; padding: 1px 8px; border-radius: 10px; }
.word-card .word-desc { font-size: 0.85rem; color: #64748b; line-height: 1.5; margin: 0; }

/* ===== 原生 details 折叠 ===== */
.word-more-details {
    margin-top: 12px;
    border: 1px solid #e5e9f0;
    border-radius: 12px;
    background: #f5f7fb;
    overflow: hidden;
    transition: border-color 0.2s;
}
.word-more-details[open] { border-color: #2f6fdd; }
.word-more-summary {
    cursor: pointer;
    padding: 14px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #2f6fdd;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
    user-select: none;
    outline: none;
}
.word-more-summary::-webkit-details-marker { display: none; }
.word-more-summary::marker { display: none; }
.word-more-summary:hover { background: #eef4ff; }
.word-more-summary .arrow-icon { display: inline-block; transition: transform 0.3s ease; font-size: 0.75rem; color: #94a3b8; }
.word-more-details[open] .word-more-summary .arrow-icon { transform: rotate(180deg); }
.word-more-details[open] .word-more-summary { border-bottom: 1px solid #e5e9f0; }
.word-more-details .word-grid { padding: 16px 20px 20px; margin-top: 0; background: #ffffff; }

/* 说文解字 */
.swjz-section { font-size: 0.95rem; }
.swjz-section .info { color: #64748b; font-size: 0.9rem; margin: 4px 0; }
.swjz-section .info span { font-weight: 600; color: #334155; margin-right: 6px; }
.hr2 { height: 1px; background: #f1f5f9; margin: 12px 0; }
.swjz-section .explain { display: flex; align-items: center; gap: 10px; margin: 8px 0; font-size: 0.95rem; color: #334155; }
.swjz-section .note { background: #f5f7fb; padding: 12px 16px; border-radius: 8px; margin: 10px 0 6px; font-size: 0.9rem; color: #475569; }
.swjz-section .author { font-weight: 600; color: #2f6fdd; margin-right: 6px; }

/* 同部首/同拼音/同笔画推荐 */
.related-chars { display: flex; flex-wrap: wrap; gap: 8px; }
.related-chars a {
    display: inline-block;
    padding: 6px 16px;
    background: #f5f7fb;
    border: 1px solid #e5e9f0;
    border-radius: 10px;
    color: #2f6fdd;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s;
}
.related-chars a:hover {
    background: #eef4ff;
    border-color: #2f6fdd;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(47,111,221,0.12);
}

/* 评论区 */
.comment-item { padding: 14px 0; border-bottom: 1px solid #f1f5f9; }
.comment-item:last-child { border-bottom: none; }
.comment-user { font-weight: 600; color: #2f6fdd; }
.comment-time { color: #94a3b8; font-size: 0.8rem; margin-left: 12px; }
.comment-content { margin: 6px 0 0 0; line-height: 1.6; word-break: break-all; color: #334155; }
.comment-form-area { background: #f5f7fb; padding: 20px; border-radius: 12px; margin: 16px 0; border: 1px solid #f1f5f9; }
.comment-form-area input,
.comment-form-area textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    box-sizing: border-box;
    background: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.comment-form-area input:focus,
.comment-form-area textarea:focus {
    outline: none;
    border-color: #2f6fdd;
    box-shadow: 0 0 0 3px rgba(47,111,221,0.12);
}
.comment-form-area textarea { resize: vertical; min-height: 90px; }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.form-row input { flex: 1; min-width: 150px; }
.btn-submit-comment {
    padding: 10px 28px;
    background: #2f6fdd;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.2s, transform 0.1s;
}
.btn-submit-comment:hover { background: #1d4ed8; }
.btn-submit-comment:active { transform: scale(0.98); }
.btn-submit-comment:disabled { opacity: 0.6; cursor: not-allowed; }
.comment-msg { margin-left: 15px; font-size: 0.9rem; color: #64748b; }
.comment-msg.success { color: #16a34a; }
.comment-msg.error { color: #dc2626; }
.comment-empty { color: #94a3b8; font-size: 0.95rem; padding: 16px 0; text-align: center; }
.top-badge { background: #ffc107; color: #212529; padding: 1px 8px; border-radius: 10px; font-size: 11px; margin-left: 8px; }

/* 回复区域 */
.reply-form-container { display: none; background: #f5f7fb; padding: 20px; border-radius: 12px; margin: 12px 0; border-left: 4px solid #2f6fdd; }
.reply-form-container .form-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.reply-form-container .form-row input { flex: 1; min-width: 150px; padding: 10px 14px; border: 1px solid #dbe2ea; border-radius: 8px; font-size: 0.95rem; font-family: inherit; }
.reply-form-container textarea { width: 100%; padding: 10px 14px; border: 1px solid #dbe2ea; border-radius: 8px; font-size: 0.95rem; font-family: inherit; resize: vertical; min-height: 70px; box-sizing: border-box; }
.reply-form-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.reply-form-header span { font-weight: 600; color: #2f6fdd; }
.reply-form-header .close-btn { background: none; border: none; color: #94a3b8; font-size: 20px; cursor: pointer; line-height: 1; }
.reply-form-header .close-btn:hover { color: #dc2626; }
.btn-reply-submit {
    padding: 10px 28px;
    background: #2f6fdd;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.2s;
}
.btn-reply-submit:hover { background: #1d4ed8; }
.btn-reply-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.reply-btn {
    background: none;
    border: 1px solid #2f6fdd;
    border-radius: 10px;
    padding: 3px 14px;
    color: #2f6fdd;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.reply-btn:hover { background: #2f6fdd; color: #fff; }
.reply-btn-small { border-color: #94a3b8; color: #64748b; font-size: 11px; padding: 1px 10px; }
.reply-btn-small:hover { background: #94a3b8; color: #fff; }
.replies-container { margin-left: 24px; padding-left: 16px; border-left: 2px solid #e5e9f0; }
.reply-item { padding: 10px 0; border-bottom: 1px solid #f5f7fb; }
.reply-item:last-child { border-bottom: none; }
.reply-item .comment-user { font-size: 0.9rem; }
.reply-item .comment-content { font-size: 0.9rem; margin-top: 4px; }

/* 未收录页面样式 */
.not-found-box { background: #fff8e1; border-left: 4px solid #f39c12; padding: 15px 20px; margin: 20px 0; border-radius: 4px; }
.recommend-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: #eef4ff;
    border-radius: 20px;
    text-decoration: none;
    color: #2f6fdd;
    font-size: 1.05rem;
    border: 1px solid #dbe8ff;
    transition: all 0.2s;
}
.recommend-tag:hover {
    background: #dbe8ff;
    border-color: #2f6fdd;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(47,111,221,0.18);
}
.recommend-tag .pinyin-small { font-size: 0.75rem; color: #888; }
.recommend-tag .stroke-small { font-size: 0.7rem; background: #ddd; padding: 0 6px; border-radius: 8px; color: #555; }

/* 大图模态框 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15,23,42,0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    animation: modalFadeIn 0.25s ease;
    backdrop-filter: blur(4px);
}
.modal-overlay.active { display: flex; }
.modal-content {
    position: relative;
    max-width: 92vw;
    max-height: 92vh;
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalZoomIn 0.3s ease;
}
.modal-content img { display: block; max-width: 100%; max-height: 80vh; border-radius: 8px; }
.modal-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 40px;
    height: 40px;
    background: #2f6fdd;
    color: #fff;
    border: 3px solid #fff;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    transition: background 0.2s, transform 0.1s;
}
.modal-close:hover { background: #1d4ed8; }
.modal-close:active { transform: scale(0.92); }
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalZoomIn { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* 返回顶部 */
#backToTop {
    position: fixed;
    bottom: 40px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: #2f6fdd;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(47,111,221,0.3);
    z-index: 999;
    display: none;
    transition: opacity 0.3s, background 0.2s, transform 0.1s;
    line-height: 48px;
    text-align: center;
    font-weight: 400;
}
#backToTop:hover { background: #1d4ed8; }
#backToTop:active { transform: scale(0.94); }

/* 页脚 */
.site-footer { background: #ffffff; border-top: 1px solid #e5e9f0; padding: 20px 0; margin-top: 0; }
.footer-main { font-size: 0.9rem; color: #64748b; text-align: center; margin: 0; }
.footer-main a { color: #2f6fdd; text-decoration: none; margin: 0 6px; transition: color 0.2s; }
.footer-main a:hover { color: #1d4ed8; text-decoration: underline; }
.footer-sub { margin: 8px 0 0; font-size: 0.8rem; color: #94a3b8; text-align: center; }

/* ===== 全局链接 ===== */
a {
    color: #2f6fdd;
    text-decoration: none;
    transition: color 0.2s;
}
a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}
a:visited {
    color: #2f6fdd;   /* 防止已访问变紫 */
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.speak-row {
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.speak-row .audio-btn,
.speak-row .rate-select {
    flex: 0 0 auto;
    height: 30px;
    box-sizing: border-box;
    margin: 0;
}

.audio-btn {
    padding: 0 10px;
    border-radius: 16px;
    font-size: 0.8rem;
    line-height: 30px;
}

.rate-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 0 22px 0 10px;
    font-size: 0.8rem;
    color: #2c6e9e;
    background-color: #f0f7ff;
    border: 1px solid #bcd9f2;
    border-radius: 16px;
    cursor: pointer;
    outline: none;
    line-height: 30px;
    width: auto;
    min-width: 0;
    max-width: 90px;
    transition: all 0.2s ease;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%232c6e9e' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 9px 5px;
}

.rate-select:hover {
    background-color: #e2f0ff;
    border-color: #7cb8e8;
}

.rate-select:focus {
    border-color: #2c6e9e;
    box-shadow: 0 0 0 2px rgba(44, 110, 158, 0.15);
}

.rate-select option {
    background: #fff;
    color: #333;
    font-size: 0.85rem;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 900px) {
    .layout-two-columns { grid-template-columns: 1fr; gap: 20px; }
    .layout-two-columns > .card { height: auto; }
    .calligraphy-wrapper { flex: initial; }
    .hero-title { font-size: 1.4rem; }
    .hero-char { font-size: 1.7rem; }
    .search-form input { width: 180px; }
}
@media (max-width: 600px) {
    .topbar-inner { gap: 10px; }
    .logo-text { display: none; }
    .lang-switch { font-size: 0.8rem; gap: 4px; }
    .search-form { margin-left: 0; width: 100%; }
    .search-form input { width: 100%; flex: 1; }
    .search-form .btn-primary { padding: 10px 14px; font-size: 0.85rem; }
    .card { padding: 18px; }
    .stroke-item { min-width: 54px; padding: 6px 5px 5px; }
    .stroke-img-wrapper { width: 42px; height: 42px; }
    .stroke-img-wrapper img { max-width: 32px; max-height: 32px; }
    .stroke-name { font-size: 10px; }
    .stroke-number { font-size: 8px; }
    .stroke-grid { gap: 6px; }
    .stroke-breakdown-section { padding: 14px 12px 16px; }
    .section-header h2 { font-size: 1rem; }
    .hero-title { font-size: 1.25rem; }
    .hero-char { font-size: 1.5rem; }
    .hero-subtitle { font-size: 0.88rem; }
    .comment-form-area { padding: 14px; }
    .form-row { flex-direction: column; }
    .form-row input { min-width: auto; }
    .word-grid { grid-template-columns: 1fr; gap: 10px; }
    .word-more-summary { font-size: 0.9rem; padding: 12px 16px; }
    .word-more-details .word-grid { padding: 12px 14px 16px; }
    main.container { padding-top: 16px; padding-bottom: 20px; }

    .meta-list { grid-template-columns: 1fr 1fr; column-gap: 12px; }
    .meta-item { padding: 6px 0; }
    .meta-item dt { width: 44px; font-size: 0.82rem; }
    .meta-item dd { font-size: 0.88rem; gap: 4px; }
    .meta-char { font-size: 1.4rem; }
    .audio-btn { padding: 3px 10px; font-size: 0.78rem; }

    /* 移动端 PDF 按钮间距 */
    .pdf-links p { gap: 10px; }
}
@media (max-width: 380px) {
    .meta-item dt { width: 38px; font-size: 0.78rem; }
    .meta-item dd { font-size: 0.82rem; }
    .meta-list { column-gap: 8px; }
    .audio-btn { padding: 2px 8px; font-size: 0.72rem; }
}