/* 首页工具入口独立样式，不修改原横幅样式。 */
.home-tool-entries.wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.home-tool-entries .home-tool-card { position: relative; display: flex; align-items: center; min-height: 250px; min-width: 0; overflow: hidden; border-radius: var(--radius-lg, 24px); isolation: isolate; }
.home-tool-entries .home-tool-card--symptom { background: linear-gradient(125deg, #604272, #3d305e); color: #fff; }
.home-tool-entries .home-tool-card--risk { background: linear-gradient(125deg, #fff 0%, #f9f6fc 65%, #e1d9eb 100%); color: #30233f; border: 1px solid #e5e1ec; background-clip: padding-box; }
.home-tool-entries .home-tool-copy { position: relative; z-index: 2; width: 66%; padding: 30px 32px; pointer-events: none; }
.home-tool-entries .home-tool-copy a, .home-tool-entries .home-tool-copy form { pointer-events: auto; }
.home-tool-entries h2 { font-size: 32px; font-weight: 700; line-height: 1.3; margin: 0 0 10px; color: inherit; }
.home-tool-entries h2 a { color: inherit; text-decoration: none; }
.home-tool-entries p { font-size: 14px; line-height: 1.7; min-height: 44px; margin: 0 0 18px; color: inherit; opacity: .8; }
.home-tool-entries .home-tool-action { display: inline-flex; align-items: center; justify-content: center; gap: 18px; height: 44px; padding: 0 22px; border-radius: 999px; background: #fe6d84; color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; }
.home-tool-entries .home-tool-art { position: absolute; right: 8px; bottom: -1px; width: 40%; height: 94%; display: flex; align-items: flex-end; justify-content: flex-end; z-index: 1; }
.home-tool-entries .home-tool-art img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: bottom right; }
.home-tool-entries .home-tool-search { display: flex; align-items: center; gap: 6px; width: 100%; max-width: 300px; height: 44px; padding: 4px 4px 4px 14px; background: #fff; border: 1px solid #e5dfee; border-radius: 999px; }
.home-tool-entries .home-tool-search input { flex: 1; width: 100%; min-width: 0; border: 0; background: transparent; color: #30233f; font-size: 12px; outline: none; }
.home-tool-entries .home-tool-search input::placeholder { color: #9d94ab; }
.home-tool-entries .home-tool-search button { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex-shrink: 0; padding: 0; border: 0; border-radius: 50%; background: #fe6d84; color: #fff; font-size: 23px; cursor: pointer; }
.home-tool-entries .home-tool-search:focus-within { border-color: #85719f; }
.home-tool-entries a:focus-visible, .home-tool-entries button:focus-visible { outline: 3px solid #b29bd5; outline-offset: 3px; }
@media (max-width: 900px) {
    .home-tool-entries.wrap { grid-template-columns: 1fr; gap: 16px; }
    .home-tool-entries .home-tool-card { min-height: 210px; }
    .home-tool-entries .home-tool-copy { width: 66%; padding: 26px 30px; }
    .home-tool-entries .home-tool-art { width: 36%; height: 96%; }
}
@media (max-width: 480px) {
    .home-tool-entries .home-tool-card { min-height: 200px; border-radius: 18px; }
    .home-tool-entries .home-tool-copy { padding: 22px 20px; width: 70%; }
    .home-tool-entries h2 { font-size: 27px; margin-bottom: 10px; }
    .home-tool-entries p { font-size: 12px; min-height: 40px; margin-bottom: 14px; }
    .home-tool-entries .home-tool-art { right: 0; width: 34%; height: 88%; }
    .home-tool-entries .home-tool-search { padding-left: 10px; }
    .home-tool-entries .home-tool-search input { font-size: 11px; }
}

/* 桌面双卡片：文字与配图向卡片中央收拢。 */
@media (min-width: 901px) {
    .home-tool-entries .home-tool-copy { padding-left: clamp(40px, 4vw, 64px); }
    .home-tool-entries .home-tool-art { right: clamp(24px, 3vw, 48px); width: 36%; }
}

/* 宠物图以底部为基准等比例放大，保持卡片高度。 */
.home-tool-entries .home-tool-art img { transform: scale(1.15); transform-origin: bottom center; }

/* 症状检查配图单独加高，继续等比例缩放并贴齐底部。 */
.home-tool-entries .home-tool-card--symptom .home-tool-art img { transform: scale(1.28); }

/* 手机端独立布局：收紧文案，避免配图裁切及搜索区域拥挤。 */
@media (max-width: 600px) {
    .home-tool-entries .home-tool-card { min-height: 190px; border-radius: 18px; }
    .home-tool-entries .home-tool-copy { width: 65%; padding: 24px 20px; }
    .home-tool-entries h2 { font-size: 25px; margin-bottom: 8px; }
    .home-tool-entries p { font-size: 12px; line-height: 1.7; min-height: 0; margin-bottom: 18px; }
    .home-tool-entries .home-tool-action { height: 40px; padding: 0 18px; gap: 14px; font-size: 13px; }
    .home-tool-entries .home-tool-art { right: 8px; width: 39%; height: 92%; }
    .home-tool-entries .home-tool-art img,
    .home-tool-entries .home-tool-card--symptom .home-tool-art img { transform: none; }
    .home-tool-entries .home-tool-card--risk { align-items: stretch; min-height: 190px; }
    .home-tool-entries .home-tool-card--risk .home-tool-copy { width: 100%; padding: 20px 20px 72px; }
    .home-tool-entries .home-tool-card--risk h2,
    .home-tool-entries .home-tool-card--risk p { max-width: 64%; }
    .home-tool-entries .home-tool-card--risk p { margin-bottom: 0; }
    .home-tool-entries .home-tool-card--risk .home-tool-art { bottom: -1px; right: 10px; width: 44%; height: 100%; }
    .home-tool-entries .home-tool-search { position: absolute; left: 20px; right: 20px; bottom: 20px; width: auto; max-width: none; height: 44px; padding-left: 14px; }
    .home-tool-entries .home-tool-search input { font-size: 16px; }
    .home-tool-entries .home-tool-search input::placeholder { font-size: 16px; }
}

/* 手机端只放大配图，绝对定位和 transform 不影响卡片高度。 */
@media (max-width: 600px) {
    .home-tool-entries .home-tool-card--risk .home-tool-art img { transform: scale(1.24); transform-origin: bottom right; }
    .home-tool-entries .home-tool-card--symptom .home-tool-art img { transform: scale(1.25); transform-origin: bottom right; }
}

@media (max-width: 600px) {
    .home-tool-entries .home-tool-card--risk h2,
    .home-tool-entries .home-tool-card--risk p { transform: translateY(14px); }
}

/* 移动设备输入及聚焦状态保持 16px，避免小字号触发自动放大。 */
@media (max-width: 900px), (hover: none) and (pointer: coarse) {
    .home-tool-entries .home-tool-search input,
    .home-tool-entries .home-tool-search input:focus { font-size: 16px !important; }
    .home-tool-entries .home-tool-search input::placeholder { font-size: 16px; }
}

/* 对齐轮播版块的实际底部留白；桌面编辑推荐同样是20px内边距+50px外边距。 */
.home-tool-entries.wrap { padding-bottom: 40px; }
@media (min-width: 768px) {
    .home-tool-entries.wrap { padding-bottom: 50px; }
}
@media (min-width: 1200px) {
    .home-tool-entries.wrap { padding-bottom: 70px; }
}
