/* ===== 养宠手册 — 马卡龙蓝色系 (纯蓝 #4A8EF2) ===== */

html, body { background: #f5f5f5; }
.tab-bar { position: relative; top: auto; left: auto; right: auto; display: flex; align-items: center; }
.tab-bar .tab-btn.active::after { background: rgb(74, 142, 242); opacity: 0.75; }
.tab-back {
    position: absolute; left: 0.32rem; top: 50%; transform: translateY(-50%);
    border: 0; background: transparent; color: #666;
    padding: 0.16rem 0.1rem; cursor: pointer; line-height: 1;
    display: flex; align-items: center; text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}
.tab-back svg { width: 0.52rem; height: 0.52rem; }
body {
    margin: 0;
    padding-bottom: 0.5rem; box-sizing: border-box;
}
#scroll-root {
    display: block;
    overflow-y: visible; background: #f5f5f5;
    padding-bottom: 0; height: auto;
}
#scroll-root::-webkit-scrollbar { display: none; }
.container {
    max-width: 23.52rem; width: 100%; margin: 0 auto;
    padding: 0.21rem 0.42rem 1.2rem 0.42rem; box-sizing: border-box;
}
.card {
    background: #fff; border-radius: 0.47rem;
    padding: 0.31rem; margin-bottom: 0.42rem;
}
.card-title {
    font-size: 0.37rem; font-weight: 600; color: #333;
    margin-bottom: 0.16rem; display: flex; align-items: center; gap: 0.16rem;
}
.card-title::before {
    content: ''; width: 0.08rem; height: 0.37rem;
    background: #4A8EF2; border-radius: 0.04rem; display: inline-block;
}
.card-subtitle {
    font-size: 0.26rem; color: #999; margin: 0 0 0.16rem 0;
    line-height: 1.5;
}

/* 简介卡片 */
.intro-card {
    display: flex; align-items: center; gap: 0.31rem;
    background: linear-gradient(135deg, #D6E6FA, #E9F0FC);
    border: 0.02rem solid #AFC9F1;
    border-radius: 0.47rem; padding: 0.31rem;
}
.intro-text h2 { margin: 0 0 0.1rem; font-size: 0.42rem; color: #1E7BE0; }
.intro-text p { margin: 0; font-size: 0.29rem; color: #666; line-height: 1.6; }
.intro-disclaimer { margin-top: 0.16rem !important; font-size: 0.28rem !important; color: #9E9E9E !important; word-break: break-all; }
.intro-text .intro-brand { margin: 0.31rem 0 0; font-size: 0.28rem; color: #1E7BE0; text-align: right; }

/* 宠物类型切换 */
.pet-type-tabs {
    display: flex; gap: 0.16rem; overflow-x: auto;
    padding: 0.08rem 0; scrollbar-width: none;
}
.pet-type-tabs::-webkit-scrollbar { display: none; }
.pet-type-tab {
    flex: 1 1 0; cursor: pointer; padding: 0.21rem 0.16rem;
    border-radius: 9999px; font-size: 0.34rem; color: #666;
    background: #f5f5f5; white-space: nowrap; text-align: center;
    border: none; font-family: inherit; min-width: 0;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.pet-type-tab.active {
    background: rgb(74, 142, 242); color: #fff; font-weight: 600;
    box-shadow: 0 0.08rem 0.21rem rgba(74,142,242,0.3);
}

/* 章节说明卡片 */
.section-intro-card {
    background: #fff; border-radius: 0.47rem;
    padding: 0.31rem; margin-bottom: 0.42rem;
    border: 0.02rem solid #f0f0f0;
}

/* 知识卡片 */
.handbook-card {
    border: 0.02rem solid #f0f0f0;
    transition: box-shadow 0.2s;
}
.handbook-card:hover { box-shadow: 0 0.08rem 0.31rem rgba(0,0,0,0.06); }

.handbook-header {
    display: flex; align-items: center; gap: 0.26rem;
    margin-bottom: 0.21rem;
}
.handbook-emoji {
    font-size: 0.72rem; width: 1.05rem; height: 1.05rem;
    border-radius: 50%; background: #E3F2FD;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.handbook-name {
    font-size: 0.4rem; font-weight: bold; color: #333;
    margin-bottom: 0.04rem;
}
.handbook-en {
    font-size: 0.26rem; color: #999;
    font-style: italic;
}
.handbook-tags {
    display: flex; flex-wrap: wrap; gap: 0.12rem;
    margin-bottom: 0.21rem;
}
.handbook-tag {
    font-size: 0.26rem; padding: 0.08rem 0.21rem;
    border-radius: 9999px;
    background: #DCE9FA; color: #4A96E8;
    font-weight: 500;
}
.handbook-tag.green { background: #D8F0DC; color: #4A8C57; }
.handbook-tag.blue { background: #D8E8F8; color: #4A6C9C; }
.handbook-tag.yellow { background: #FFF3D8; color: #B88A2E; }
.handbook-tag.red { background: #FFE0E0; color: #C05858; }
.handbook-desc p {
    margin: 0 0 0.12rem; font-size: 0.3rem; color: #555; line-height: 1.7;
}
.handbook-desc p:last-child { margin-bottom: 0; }
.handbook-desc b { color: #333; }

/* 喂养量参考表格 */
.dose-table {
    width: 100%; border-collapse: collapse;
    margin: 0.08rem 0 0.16rem; font-size: 0.28rem;
}
.dose-table th, .dose-table td {
    border: 0.02rem solid #f0f0f0;
    padding: 0.18rem 0.16rem; text-align: left;
    line-height: 1.5; color: #555;
}
.dose-table th {
    background: #E3F0FD; color: #1E7BE0;
    font-weight: 600; white-space: nowrap;
}
.dose-table td:first-child { color: #333; font-weight: 500; white-space: nowrap; }

/* 列表式要点 */
.handbook-list { margin: 0; padding-left: 0.31rem; }
.handbook-list li {
    font-size: 0.3rem; color: #555; line-height: 1.7;
    margin-bottom: 0.1rem;
}
.handbook-list li b { color: #333; }
.handbook-list li.warn { color: #C05858; }
.handbook-list li.warn b { color: #C05858; }

/* 知识参考卡片 */
.knowledge-card { padding: 0.37rem 0.31rem; border-radius: 0.47rem; }
.formula-text { font-size: 0.28rem; color: #666; line-height: 1.7; }
.formula-text p { margin: 0 0 0.16rem; }
.formula-text ul { margin: 0 0 0.16rem; padding-left: 0.37rem; }
.formula-text li { margin-bottom: 0.08rem; }
.formula-text strong { color: #1E7BE0; }

/* 参考来源 */
.ref-card .card-title::before { background: #4A8EF2; }
.ref-item {
    display: flex; align-items: flex-start; gap: 0.16rem;
    font-size: 0.28rem; color: #888; line-height: 1.6;
    margin-bottom: 0.16rem;
}
.ref-item:last-child { margin-bottom: 0; }
.ref-tag {
    flex-shrink: 0; font-size: 0.24rem; padding: 0.04rem 0.16rem;
    border-radius: 0.13rem; background: #E3F0FD; color: #1E7BE0;
    font-weight: 600; white-space: nowrap;
}
.ref-item a { color: #1E7BE0; text-decoration: none; }
.ref-item a:active { opacity: 0.7; }
