
.rootsearch-nav-btn {
    color: #8b4513 !important; font-weight: 600; letter-spacing: 2px; transition: all 0.25s;
}
.rootsearch-nav-btn:hover {
    color: #5c2d0e !important; background: rgba(139,69,19,0.06) !important;
}

/* 移动端导航栏寻根按钮 — 紧靠 hamburger 左侧 */
a.navbar-rootsearch-btn {
    position: relative;
    /* float: right; */
    display: none;
    padding: 9px 12px;
    margin-top: 8px;
    margin-right: 4px;
    margin-bottom: 8px;
    background: #a0522d;
    color: #fff !important;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    line-height: 1.33;
    text-decoration: none !important;
    transition: background 0.2s;
}


.navbar-rootsearch-btn:hover,
.navbar-rootsearch-btn:focus {
    background: #7a3c1f;
    color: #fff !important;
    text-decoration: none !important;
}
@media (max-width: 767px) {
    a.navbar-rootsearch-btn {
        display: inline-block;
    }
}

.rs-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5); z-index: 1040;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s, visibility 0s 0.3s;
    backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.rs-overlay.active { opacity: 1; visibility: visible; transition: opacity 0.3s, visibility 0s 0s; }

.rs-panel {
    position: fixed; top: 0; right: 0;
    width: 500px; max-width: 92vw; height: 100%;
    background: #fff; z-index: 1050;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.38s cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0s 0.38s;
    display: flex; flex-direction: column;
    box-shadow: -8px 0 40px rgba(0,0,0,0.15);
}
.rs-panel.active { transform: translateX(0); visibility: visible; transition: transform 0.38s cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0s 0s; }

.rs-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 22px 28px 18px; border-bottom: 1px solid #f2f2f2; flex-shrink: 0;
}
.rs-title {
    margin: 0; font-size: 20px; font-weight: 700;
    background: linear-gradient(135deg, #8b4513, #5c2d0e);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    letter-spacing: 2px;
}
.rs-close {
    background: none; border: none; color: #bbb; cursor: pointer;
    padding: 6px; border-radius: 8px; transition: all 0.2s;
    display: flex; align-items: center; justify-content: center;
}
.rs-close:hover { background: #f5f5f5; color: #333; }
.rs-standalone-link {
    color: #bbb; text-decoration: none !important;
    font-size: 16px; padding: 4px 6px; border-radius: 6px;
    transition: all 0.2s; line-height: 1;
}
.rs-standalone-link:hover { background: #f5f5f5; color: #8b4513; }

.rs-body { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* 搜索区域 */
.rs-search-area { padding: 20px 28px 12px; flex-shrink: 0; }
.rs-input-row {
    display: flex; align-items: center; gap: 10px;
    padding: 0 16px; background: #f7f7f8; border-radius: 14px;
    border: 2px solid transparent; transition: all 0.25s;
}
.rs-input-row:focus-within {
    background: #fff; border-color: #8b4513;
    box-shadow: 0 0 0 4px rgba(139,69,19,0.06);
}
.rs-search-icon { color: #aaa; flex-shrink: 0; }
.rs-input {
    flex: 1; border: none; background: transparent;
    padding: 14px 0; font-size: 15px; outline: none; color: #333; min-width: 0;
}
.rs-input::placeholder { color: #bbb; }

.rs-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; min-height: 0; }
.rs-chip {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 5px 10px 5px 14px;
    background: #fdf6f0; border: 1px solid #ecd5ba;
    border-radius: 20px; font-size: 13px; color: #5c3d2e;
    animation: chipIn 0.2s ease; cursor: default; user-select: none;
}
@keyframes chipIn { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: scale(1); } }
.rs-chip-close {
    display: flex; align-items: center; justify-content: center;
    width: 18px; height: 18px; border-radius: 50%;
    background: #e0c8a8; color: #fff; font-size: 13px;
    cursor: pointer; transition: all 0.15s; border: none; padding: 0; line-height: 1;
}
.rs-chip-close:hover { background: #c0392b; }

.rs-hint {
    margin-top: 12px; font-size: 14px; color: #bbb;
    display: flex; align-items: center; gap: 6px;
}
.rs-hint-icon { font-size: 14px; }

.rs-scope {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 28px; border-bottom: 1px solid #f5f5f5;
    font-size: 13px; color: #666; font-weight: 500; flex-shrink: 0;
    display: none;
}
.rs-toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.rs-toggle input { display: none; }
.rs-toggle-track {
    position: relative; width: 44px; height: 24px;
    background: #d4a574; border-radius: 12px; transition: background 0.25s; flex-shrink: 0;
}
.rs-toggle-track::after {
    content: ''; position: absolute; top: 2px; left: 2px;
    width: 20px; height: 20px; background: #fff;
    border-radius: 50%; transition: transform 0.25s; box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.rs-toggle input:checked ~ .rs-toggle-track { background: #8b4513; }
.rs-toggle input:checked ~ .rs-toggle-track::after { transform: translateX(20px); }
.rs-toggle-text { font-size: 13px; font-weight: 600; color: #8b4513; min-width: 42px; }

.rs-loading {
    display: flex; align-items: center; justify-content: center;
    gap: 10px; padding: 48px 28px; color: #aaa; font-size: 14px;
}
.rs-spinner {
    width: 18px; height: 18px; border: 2px solid #eee;
    border-top-color: #8b4513; border-radius: 50%; animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.rs-results { flex: 1; overflow-y: auto; padding: 0; -webkit-overflow-scrolling: touch; }

/* 标签列表 */
.rs-tag-section { padding: 18px 28px; border-bottom: 1px solid #f5f5f5; }
.rs-section-label {
    font-size: 11px; font-weight: 700; color: #b8a088;
    text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 12px;
    display: flex; align-items: center; gap: 8px;
}
.rs-section-label .num { font-weight: 500; color: #ccc; }
.rs-tag {
    display: inline-flex; align-items: center; gap: 2px;
    padding: 6px 14px; margin: 0 8px 8px 0;
    background: #fdf8f3; border: 1px solid #f0e0ce;
    border-radius: 20px; font-size: 13px; color: #6b4226;
    text-decoration: none; transition: all 0.2s;
}
.rs-tag:hover { background: #f7e8d6; border-color: #d4a574; }
.rs-tag-chain { color: #bbb; font-size: 11px; }
.rs-tag-name { font-weight: 600; }

/* 文章卡片 */
.rs-article-section { padding: 18px 0 60px; }
.rs-article-section .rs-section-label { padding: 0 28px 12px; }

.rs-card {
    padding: 18px 28px; border-bottom: 1px solid #e8e4e0;
    transition: background 0.15s;
}
.rs-card:hover { background: #fdfaf7; }

.rs-card-title-row {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 8px; margin-bottom: 8px;
}
.rs-card-title {
    font-size: 15px; font-weight: 600; color: #1a1a1a;
    line-height: 1.45; flex: 1;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rs-card-title em { font-style: normal; color: #b84c3b; background: #fef3e2; padding: 1px 4px; border-radius: 3px; }
.rs-card-score {
    font-size: 13px; font-weight: 100; text-align: left; margin-top: 4px;
}

.rs-card-tags .rs-card-score {
    margin-left: 0;
    margin-top: 0;
    align-self: center;
}

.rs-progress-wrap { margin-bottom: 10px; }
.rs-progress {
    height: 5px; background: #f0f0f0; border-radius: 3px; overflow: hidden;
}
.rs-progress-bar {
    height: 100%; border-radius: 3px;
    background: linear-gradient(90deg, #e0d0c0, #c9a87c);
    transition: width 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.rs-progress-bar.high { background: linear-gradient(90deg, #c0392b, #d4754b); }
.rs-progress-bar.very-high { background: linear-gradient(90deg, #b83230, #e05040); }

.rs-card-meta { display: flex; align-items: center; gap: 14px; font-size: 12px; color: #aaa; margin-bottom: 4px; }
.rs-card-tags {
    display: flex; align-items: center; gap: 5px; flex-wrap: wrap; position: relative;
}
.rs-card-tag { padding: 2px 10px; background: #f5f5f5; border-radius: 10px; font-size: 11px; color: #999; }
.rs-card-tag em { font-style: normal; color: #b84c3b; background: none; }

/* 展开图标 */
.rs-expand-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 50%;
    background: #fdf6f0; border: 1px solid #8b4513;
    cursor: pointer; transition: all 0.2s; flex-shrink: 0;
    margin-left: auto; color: #8b4513; font-size: 16px; font-weight: 700;
}
.rs-expand-icon:hover { background: #f0d9c0; border-color: #5c2d0e; }
.rs-expand-icon.hot { background: #8b4513; color: #fff; border-color: #8b4513; }
.rs-expand-icon.hot:hover { background: #6b3410; border-color: #6b3410; }

/* 操作按钮 */
.rs-card-actions { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.rs-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 7px 16px; border-radius: 20px; font-size: 13px; font-weight: 600;
    cursor: pointer; border: none; text-decoration: none; transition: all 0.2s;
}
.rs-btn-wa { background: #25D366; color: #fff; }
.rs-btn-wa:hover { background: #1da851; color: #fff; }
.rs-btn-view { background: #8b4513; color: #fff; }
.rs-btn-view:hover { background: #6b3410; color: #fff; }

/* 空结果 */
.rs-empty { padding: 48px 28px; text-align: center; color: #ccc; font-size: 14px; }
.rs-sentinel { height: 1px; }

/* 初始引导面板 */
.rs-onboarding {
    opacity: 0.55;
    flex: 1; display: flex; align-items: center; justify-content: center;
    padding: 40px 28px; text-align: center;
}
.rs-onboarding-inner { max-width: 380px; }
.rs-onboarding-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 80px; height: 80px; border-radius: 50%;
    background: linear-gradient(135deg, #fdf6f0, #f5e6d8);
    color: #8b4513; margin-bottom: 20px;
}
.rs-onboarding-title {
    font-size: 18px; font-weight: 700; color: #5c2d0e;
    margin: 0 0 12px; letter-spacing: 2px;
}
.rs-onboarding-desc {
    font-size: 13px; color: #999; line-height: 1.8; margin: 0 0 24px;
}
.rs-onboarding-desc strong { color: #8b4513; }
.rs-onboarding-guide { text-align: left; }
.rs-guide-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 14px; margin-bottom: 6px;
    background: #fafaf9; border-radius: 10px;
    font-size: 13px; color: #666; line-height: 1.6;
    transition: background 0.15s;
}
.rs-guide-item:hover { background: #fdf6f0; }
.rs-guide-icon {
    flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 8px;
    background: #fdf6f0; color: #8b4513; margin-top: 1px;
}
.rs-guide-item strong { color: #5c2d0e; }

/* ========== 详情子面板 ========== */
.rs-detail-panel {
    position: absolute; top: 0; right: 0;
    width: 80%; height: 100%; background: #fff; z-index: 10;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
    display: flex; flex-direction: column;
    box-shadow: -4px 0 20px rgba(0,0,0,0.1);
}
.rs-detail-panel.open { transform: translateX(0); }

.rs-detail-header {
    display: flex; align-items: center;
    padding: 18px 20px; border-bottom: 1px solid #f0f0f0; flex-shrink: 0;
}
.rs-detail-back {
    display: inline-flex; align-items: center; gap: 4px;
    background: none; border: none; color: #8b4513; font-size: 14px; font-weight: 600;
    cursor: pointer; padding: 6px 10px; border-radius: 8px; transition: all 0.2s;
}
.rs-detail-back:hover { background: #fdf6f0; }

.rs-detail-content { flex: 1; overflow-y: auto; padding: 20px 24px; -webkit-overflow-scrolling: touch; }

.rs-detail-content .rs-detail-title {
    font-size: 18px; font-weight: 700; color: #1a1a1a; margin-bottom: 20px; line-height: 1.5;
}
.rs-detail-content .rs-detail-field {
    margin-bottom: 16px; padding: 14px 16px;
    background: #fdfaf7; border-radius: 10px; border: 1px solid #f5ece2;
}
.rs-detail-content .rs-detail-label {
    font-size: 11px; font-weight: 700; color: #b8a088;
    text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px;
}
.rs-detail-content .rs-detail-value { font-size: 14px; color: #444; line-height: 1.7; }
.rs-detail-content .rs-detail-value em {
    font-style: normal; color: #b84c3b; background: #fef3e2; padding: 1px 3px; border-radius: 2px;
}

/* 付费信息卡片 */
.rs-pay-card {
    margin-top: 20px; padding: 18px 20px;
    background: linear-gradient(135deg, #fef9f3, #fdf3e8);
    border: 1px solid #f0d9c0; border-radius: 14px;
}
.rs-pay-card .rs-pay-title { font-size: 14px; font-weight: 700; color: #8b4513; margin-bottom: 8px; }
.rs-pay-card .rs-pay-price { font-size: 20px; font-weight: 800; color: #c0392b; margin-bottom: 10px; }
.rs-pay-card .rs-pay-desc { font-size: 13px; color: #888; line-height: 1.6; margin-bottom: 14px; }
.rs-pay-qrcodes { display: flex; gap: 20px; justify-content: center; }
.rs-pay-qr { text-align: center; }
.rs-pay-qr-img {
    width: 100px; height: 100px; background: #eee; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #bbb; font-size: 11px; margin-bottom: 6px;
    border: 1px solid #e0e0e0;
}
.rs-pay-qr-label { font-size: 11px; color: #888; }

.rs-detail-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

/* 移动端 */
@media (max-width: 767px) {
    .rs-panel { width: 88%; max-width: 90vw; }
    .rs-header { padding: 18px 20px 14px; }
    .rs-search-area { padding: 16px 20px 10px; }
    .rs-card { padding: 14px 20px; }
    .rs-tag-section { padding: 14px 20px; }
    .rs-scope { padding: 12px 20px; }
    .rs-article-section .rs-section-label { padding: 0 20px 12px; }
    .rs-detail-panel { width: 85%; }
    .rs-detail-content { padding: 16px 18px; }
}

