/* ===== 宠物起名 — 马卡龙暖色系 (与 pet-age/pet-personality 一致) ===== */

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(132, 190, 136); opacity: 0.75; }
.tab-back {
    position: absolute; left: 0.16rem; 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;
}

/* 简介卡片 */
.intro-card {
    display: flex; align-items: center; gap: 0.31rem;
    background: linear-gradient(135deg, #EBF5EB, #F2F8F2);
    border: 0.02rem solid #C5E3C8;
    border-radius: 0.47rem; padding: 0.31rem;
}
.intro-text h2 { margin: 0 0 0.1rem; font-size: 0.42rem; color: #4E8F54; }
.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; }
.intro-text .intro-brand { margin: 0.31rem 0 0; font-size: 0.28rem; color: #4E8F54; 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; border: 0.02rem solid #e8e8e8;
    background: #fff; font-size: 0.3rem; font-family: inherit;
    text-align: center; transition: all 0.2s; color: #888;
    white-space: nowrap; user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.pet-type-tab.active {
    background: linear-gradient(135deg, #84BE88, #A8D4AC);
    border-color: #A8D4AC; color: #fff; font-weight: 600;
}

/* 风格选择 */
.style-tabs {
    display: flex; flex-wrap: wrap; gap: 0.12rem;
}
.style-tab {
    flex: 1 1 auto; text-align: center;
    padding: 0.18rem 0.26rem; border-radius: 999px;
    border: 0.02rem solid #e8e8e8; background: #fafafa;
    font-size: 0.28rem; font-family: inherit; cursor: pointer;
    color: #888; transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.style-tab.active {
    background: #D9EEDB; border-color: #C5E3C8; color: #3E7A44; font-weight: 600;
}

/* 名字列表 */
.name-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.16rem;
    margin-top: 0.26rem;
}
.name-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.26rem 0.31rem; border-radius: 0.31rem;
    background: #F2F8F2; border: 0.02rem solid #D9EEDB;
    cursor: pointer; transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.name-item:active { transform: scale(0.97); background: #EBF5EB; }
.name-main { font-size: 0.34rem; font-weight: 600; color: #3E7A44; }
.name-sub { font-size: 0.24rem; color: #9E9E9E; margin-top: 0.04rem; }
.name-action {
    font-size: 0.24rem; color: #84BE88; opacity: 0;
    transition: opacity 0.2s;
}
.name-item:active .name-action { opacity: 1; }

/* 刷新按钮 */
.refresh-bar {
    display: flex; justify-content: center; margin-top: 0.42rem;
}
.refresh-btn {
    padding: 0.26rem 0.52rem; border-radius: 999px;
    border: 0.02rem solid #C5E3C8; background: #fff;
    font-size: 0.3rem; font-family: inherit; cursor: pointer;
    color: #4E8F54; transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.refresh-btn:active { background: #EBF5EB; transform: scale(0.97); }

/* 搜索框 */
.search-row {
    display: flex; gap: 0.12rem; margin-bottom: 0.26rem;
}
.search-input {
    flex: 1; padding: 0.24rem 0.31rem; border-radius: 9999px;
    border: 0.02rem solid #e0e0e0; background: #fafafa;
    font-size: 0.3rem; font-family: inherit; outline: none;
    -webkit-appearance: none; color: #333;
}
.search-input:focus { border-color: #C5E3C8; background: #fff; }
.search-btn {
    padding: 0.24rem 0.42rem; border-radius: 9999px;
    border: none; background: linear-gradient(135deg, #84BE88, #A8D4AC);
    color: #fff; font-size: 0.3rem; font-weight: 600;
    font-family: inherit; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.search-btn:active { transform: scale(0.97); opacity: 0.9; }

/* 收藏/喜欢 */
.fav-bar {
    display: flex; align-items: center; gap: 0.12rem; margin-top: 0.26rem;
    flex-wrap: wrap;
}
.fav-tag {
    display: inline-flex; align-items: center; gap: 0.08rem;
    padding: 0.14rem 0.26rem; border-radius: 999px;
    background: #EBF5EB; border: 0.02rem solid #D9EEDB;
    font-size: 0.26rem; color: #4E8F54; cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.fav-tag:active { background: #D9EEDB; }
.fav-del { font-size: 0.22rem; opacity: 0.6; margin-left: 0.04rem; }
.fav-empty { font-size: 0.26rem; color: #ccc; }

/* 知识卡片 */
.knowledge-card { padding: 0.37rem 0.31rem; border-radius: 0.47rem; }
.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: #84BE88; border-radius: 0.04rem; display: inline-block;
}
.knowledge-card p { font-size: 0.28rem; color: #666; line-height: 1.7; margin: 0.1rem 0; }
.knowledge-card ul { padding-left: 0.42rem; margin: 0.1rem 0; }
.knowledge-card li { font-size: 0.28rem; color: #666; line-height: 1.7; }
.knowledge-ref { margin-top: 0.21rem !important; font-size: 0.26rem !important; color: #9E9E9E !important; }

/* toast 提示 */
.toast {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
    background: rgba(0,0,0,0.75); color: #fff; padding: 0.21rem 0.42rem;
    border-radius: 0.31rem; font-size: 0.3rem; z-index: 9999;
    pointer-events: none; opacity: 0; transition: opacity 0.3s;
}
.toast.show { opacity: 1; }
