/* ===== 班宠乐园页 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --ink: #2c3e50;
    --muted: #8a94a6;
    --line: #e9ecf5;
    --grad: linear-gradient(135deg, #667eea 0%, #a05ce0 100%);
    --ok: #23a55a;
    --err: #e05b5b;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(1200px 500px at 8% -10%, #fff0e6 0%, transparent 60%),
        radial-gradient(1000px 500px at 95% 0%, #eef1ff 0%, transparent 55%),
        #f7f5fd;
    color: var(--ink);
    min-height: 100vh;
}
button { cursor: pointer; font-family: inherit; border: none; }

/* ---------- 顶部 ---------- */
.page-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 24px 4px; gap: 16px; flex-wrap: wrap;
}
.head-left h1 {
    font-size: 24px;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.head-left p { font-size: 13px; color: var(--muted); margin-top: 4px; }
.head-right { display: flex; gap: 10px; align-items: center; }
.scope-select {
    padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line);
    background: #fff; font-size: 14px; color: var(--ink); outline: none;
    box-shadow: 0 3px 10px rgba(44,62,80,.05);
}
.btn-primary {
    background: var(--grad); color: #fff; padding: 10px 18px; border-radius: 12px;
    font-size: 14px; box-shadow: 0 6px 16px rgba(102,126,234,.35); transition: transform .15s;
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-ghost {
    background: #fff; color: #667eea; border: 1px solid #d9dff0;
    padding: 9px 18px; border-radius: 12px; font-size: 14px; transition: all .15s;
}
.btn-ghost:hover { border-color: #667eea; background: #f4f6ff; }
.sound-toggle {
    background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px;
    font-size: 15px; color: var(--ink); cursor: pointer; box-shadow: 0 3px 10px rgba(44,62,80,.05);
    transition: transform .15s;
}
.sound-toggle:hover { transform: translateY(-1px); }

/* ---------- 老师筛选 + 宠物墙分页 ---------- */
.pagination {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    margin: 22px 0 8px; flex-wrap: wrap;
}
.page-btn {
    min-width: 36px; padding: 7px 12px; border: 1px solid #e2e7f1; background: #fff;
    color: #4a5568; border-radius: 8px; font-size: 13px; transition: all .15s;
}
.page-btn:hover:not(:disabled) { border-color: #667eea; color: #667eea; }
.page-btn.on { background: var(--grad); border-color: transparent; color: #fff; }
.page-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- 今日之星 ---------- */
.today-banner {
    display: flex; align-items: center; gap: 16px;
    margin: 16px 24px 0; padding: 14px 20px; border-radius: 18px;
    background: linear-gradient(120deg, #fff7e0, #ffeef6);
    border: 1px solid #ffe3b3; box-shadow: 0 6px 18px rgba(255,180,60,.15);
}
.today-avatar {
    width: 56px; height: 56px; border-radius: 50%; font-size: 26px; flex: none;
    display: flex; align-items: center; justify-content: center;
    box-shadow: inset 0 0 0 3px rgba(255,255,255,.7);
}
.today-info { flex: 1; min-width: 0; }
.today-label { font-size: 13px; font-weight: 700; color: #d98324; }
.today-text { font-size: 15px; color: #7a5a26; margin-top: 3px; }
.today-text b { color: #e0612f; }
.today-actions { display: flex; gap: 8px; align-items: center; }
.star-chip {
    background: #fff; border: 1px solid #ffdba8; color: #c96a1d;
    padding: 5px 12px; border-radius: 20px; font-size: 13px; white-space: nowrap;
}

/* ---------- 统计 ---------- */
.stats-cards {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px; padding: 16px 24px 4px;
}
.stat-card {
    background: #fff; border-radius: 16px; padding: 15px 18px;
    display: flex; align-items: center; gap: 14px;
    box-shadow: 0 6px 18px rgba(44,62,80,.06);
}
.stat-icon { font-size: 28px; }
.stat-title { font-size: 13px; color: var(--muted); }
.stat-value { font-size: 24px; font-weight: 800; margin-top: 2px; }
.stat-value small { font-size: 12px; color: #b6bfce; font-weight: 600; }

/* ---------- 视图切换 ---------- */
.tabs { display: flex; gap: 8px; padding: 18px 24px 0; }
.tab {
    padding: 9px 20px; border-radius: 24px; background: #fff; color: #7a86a0;
    font-size: 14px; border: 1px solid var(--line); transition: all .15s;
}
.tab.active {
    background: var(--grad); color: #fff; border-color: transparent;
    box-shadow: 0 6px 14px rgba(124,104,224,.35);
}
/* ---------- 宠物墙 ---------- */
.wall-wrap { padding: 16px 24px 30px; }
.empty-state { text-align: center; padding: 70px 20px; color: var(--muted); }
.empty-icon { font-size: 56px; margin-bottom: 12px; }
.empty-state h3 { color: var(--ink); font-size: 18px; }
.empty-state p { font-size: 13px; margin-top: 6px; }
.pet-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
    gap: 18px;
}
.pet-card {
    background: #fff; border-radius: 20px; overflow: hidden;
    box-shadow: 0 8px 24px rgba(44,62,80,.08); transition: transform .18s, box-shadow .18s;
}
.pet-card:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(124,104,224,.18); }

.no-pet {
    padding: 34px 18px; text-align: center; cursor: pointer;
    background: linear-gradient(180deg, #fbfcff, #f2f4ff);
    border: 2px dashed #cfd6ea; border-radius: 20px; margin: 10px;
}
.no-pet-avatar { font-size: 46px; animation: bob 2.4s ease-in-out infinite; }
.no-pet-name { font-size: 15px; font-weight: 700; margin: 10px 0 2px; color: var(--ink); }
.no-pet-name span { color: var(--muted); font-weight: 400; font-size: 13px; }
.adopt-btn {
    margin-top: 12px; padding: 8px 18px; border-radius: 20px; font-size: 14px;
    background: var(--grad); color: #fff; box-shadow: 0 5px 12px rgba(124,104,224,.3);
}
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* 已领养卡片 */
.pet-body { padding: 14px 14px 12px; position: relative; }
.pet-body.theme-sweet { background: linear-gradient(180deg, #fff5f2 0%, #fff 45%); }
.pet-body.theme-ocean { background: linear-gradient(180deg, #eaf7ff 0%, #fff 45%); }
.pet-body.theme-forest { background: linear-gradient(180deg, #eefaf0 0%, #fff 45%); }
.pet-body.theme-night { background: linear-gradient(180deg, #f0ecff 0%, #fff 45%); }
.pet-body.theme-sunset { background: linear-gradient(180deg, #fff0e2 0%, #fff 45%); }

.pet-topline { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.stage-badge { font-size: 12px; padding: 3px 10px; border-radius: 20px; font-weight: 700; }
.stage-badge.st0 { background: #ffe8d6; color: #d97b2d; }
.stage-badge.st1 { background: #fff0cf; color: #c98a12; }
.stage-badge.st2 { background: #dcf5d9; color: #3d9a48; }
.stage-badge.st3 { background: linear-gradient(90deg,#ffe28a,#ffb35c); color: #7a4a00; }
.today-badge {
    font-size: 12px; background: #ffe8e2; color: #e0612f; font-weight: 700;
    padding: 3px 9px; border-radius: 20px;
}
.score-chip {
    margin-left: auto; cursor: pointer; font-weight: 800; font-size: 15px;
    background: #fff3dd; color: #d97b1d; padding: 3px 12px; border-radius: 20px;
    transition: transform .12s;
}
.score-chip:hover { transform: scale(1.08); }

.pet-img-box { display: flex; justify-content: center; cursor: pointer; }
.pet-img {
    width: 120px; height: 120px; object-fit: contain;
    filter: drop-shadow(0 8px 14px rgba(124,104,224,.25));
}
.pet-emoji {
    width: 96px; height: 96px; border-radius: 30px; font-size: 54px;
    display: flex; align-items: center; justify-content: center; color: #fff;
    box-shadow: inset 0 -8px 14px rgba(0,0,0,.12);
}
.pet-emoji.big { width: 160px; height: 160px; border-radius: 44px; font-size: 90px; }
.pet-name { text-align: center; font-weight: 800; font-size: 18px; margin-top: 8px; cursor: pointer; }
.pet-kind { text-align: center; font-size: 12px; color: var(--muted); margin-top: 2px; }
.pet-personality { text-align: center; font-size: 12px; color: #a05ce0; margin-top: 5px; }
.growth-bar {
    height: 8px; border-radius: 10px; background: #f0eef8; margin: 10px 4px 0; overflow: hidden;
}
.growth-fill {
    height: 100%; border-radius: 10px;
    background: linear-gradient(90deg, #ffb35c, #a05ce0); transition: width .5s ease;
}
.growth-info { font-size: 11px; color: var(--muted); margin: 4px 4px 0; text-align: center; }
.pet-actions { display: flex; gap: 6px; margin-top: 10px; }
.award-btn {
    flex: 1; padding: 7px 0; border-radius: 12px; font-size: 14px; font-weight: 800;
    background: #fff3dd; color: #d97b1d; transition: transform .12s;
}
.award-btn:hover { transform: translateY(-1px); background: #ffe6b8; }
.award-btn.loading { opacity: .5; pointer-events: none; }
.care-btn {
    flex: 1.5; padding: 7px 0; border-radius: 12px; font-size: 13px; font-weight: 700;
    background: linear-gradient(135deg,#ff9a8b,#ff7eb3); color: #fff;
}
.care-btn:hover { transform: translateY(-1px); }

/* ---------- 排行榜 ---------- */
.board-wrap { padding: 16px 24px 30px; }
.board-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.board-title { font-size: 17px; font-weight: 800; }
.board-range { display: flex; gap: 6px; background: #fff; padding: 4px; border-radius: 24px; }
.range-btn { padding: 7px 18px; border-radius: 20px; font-size: 13px; background: transparent; color: #7a86a0; }
.range-btn.active { background: var(--grad); color: #fff; }
.board-list {
    margin-top: 14px; background: #fff; border-radius: 20px; padding: 6px 16px;
    box-shadow: 0 8px 24px rgba(44,62,80,.06);
}
.board-row {
    display: flex; align-items: center; gap: 12px; padding: 11px 6px;
    border-bottom: 1px solid #f3f4fb; flex-wrap: wrap;
}
.board-row:last-child { border-bottom: none; }
.rank-num {
    width: 34px; height: 34px; border-radius: 12px; font-weight: 800; font-size: 15px; flex: none;
    display: flex; align-items: center; justify-content: center; background: #f0f1f8; color: #9aa3b8;
}
.rank-num.r1 { background: linear-gradient(135deg,#ffe28a,#ffb35c); color: #fff; }
.rank-num.r2 { background: linear-gradient(135deg,#d7dce6,#aab2c4); color: #fff; }
.rank-num.r3 { background: linear-gradient(135deg,#f0c3a5,#d9966b); color: #fff; }
.board-img-box { flex: none; width: 48px; display: flex; justify-content: center; }
.board-img { width: 46px; height: 46px; object-fit: contain; }
.board-emoji { font-size: 30px; width: 46px; text-align: center; }
.board-name { width: 170px; min-width: 0; }
.bn1 { font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.stage-mini { font-size: 11px; background: #f0ecff; color: #a05ce0; padding: 2px 8px; border-radius: 12px; }
.bn2 { font-size: 12px; color: var(--muted); margin-top: 2px; }
.board-bar { flex: 1; min-width: 90px; height: 10px; background: #f0eef8; border-radius: 10px; overflow: hidden; }
.board-fill {
    height: 100%; min-width: 6px; border-radius: 10px;
    background: linear-gradient(90deg, #ffd76e, #ff8a5c); transition: width .5s ease;
}
.board-num { width: 64px; text-align: right; font-weight: 800; font-size: 18px; color: #e0612f; }
.board-num small { font-size: 12px; color: var(--muted); }
.board-sub { width: 120px; font-size: 12px; color: #a6aec0; }
.board-award { padding: 6px 14px; border-radius: 12px; font-weight: 800; background: #fff3dd; color: #d97b1d; }
.board-award:hover { background: #ffe6b8; }
.empty-cell { text-align: center; color: #a9b2c4; padding: 36px; }

/* ---------- 商店管理 ---------- */
.store-wrap { padding: 16px 24px 30px; }
.store-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin-top: 16px; }
.store-card {
    background: #fff; border-radius: 18px; padding: 18px; text-align: center;
    box-shadow: 0 8px 22px rgba(44,62,80,.07); transition: transform .15s;
}
.store-card:hover { transform: translateY(-3px); }
.store-card.off { opacity: .55; }
.store-emoji { font-size: 40px; }
.store-name { font-weight: 800; font-size: 16px; margin-top: 8px; }
.store-desc { font-size: 12px; color: var(--muted); margin-top: 4px; min-height: 16px; }
.store-price { margin-top: 10px; font-weight: 800; color: #e0612f; }
.store-stock { font-size: 12px; color: var(--muted); margin-top: 2px; }
.store-actions { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 10px; }
.off-tag { font-size: 12px; color: #e05b5b; background: #ffe9e7; padding: 3px 9px; border-radius: 12px; }
.btn-mini { background: #f0f1f8; color: #5a6b8c; padding: 5px 12px; border-radius: 10px; font-size: 13px; }
.btn-mini:hover { background: #e4e7f4; }
.btn-mini.danger { background: #ffe9e7; color: #e05b5b; }
.btn-mini.danger:hover { background: #ffdcd9; }
/* ---------- 弹窗 ---------- */
.modal-overlay, .detail-overlay {
    position: fixed; inset: 0; background: rgba(22, 22, 42, .55);
    display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px;
    backdrop-filter: blur(2px);
}
/* 发积分/改名/领养等二级弹窗要在宠物详情(同屏)之上，避免被压在下面 */
.modal-overlay { z-index: 200; }
.modal {
    background: #fff; border-radius: 20px; width: 560px; max-width: 100%;
    max-height: 90vh; display: flex; flex-direction: column;
    box-shadow: 0 24px 70px rgba(0,0,0,.3); overflow: hidden;
}
.small-modal { width: 460px; }
.modal-head {
    display: flex; justify-content: space-between; align-items: center; padding: 17px 22px;
    background: linear-gradient(135deg, #faf7ff, #fff); border-bottom: 1px solid var(--line);
}
.modal-head h3 { font-size: 17px; }
.modal-close { background: transparent; font-size: 24px; color: #9aa5bb; line-height: 1; }
.modal-body { padding: 8px 22px 16px; overflow-y: auto; }
.modal-foot {
    display: flex; justify-content: flex-end; align-items: center; gap: 10px;
    padding: 12px 22px; border-top: 1px solid var(--line); background: #fbfbfe;
}
.modal-foot .hint { font-size: 12px; color: var(--muted); margin-right: auto; }
.form-label { font-size: 13px; font-weight: 700; color: #6b7689; margin: 14px 0 6px; }
.form-label:first-child { margin-top: 10px; }
.form-input {
    width: 100%; padding: 10px 12px; border: 1px solid #dde3ee;
    border-radius: 12px; font-size: 14px; outline: none;
}
.form-input:focus { border-color: #a05ce0; box-shadow: 0 0 0 3px rgba(160,92,224,.14); }
.form-row { display: flex; gap: 10px; }
.form-row > div { flex: 1; }
.toggle-row { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 14px; color: #5a6b8c; cursor: pointer; }

.species-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.species-item {
    background: #fafbff; border: 2px solid transparent; border-radius: 14px;
    padding: 10px 4px; text-align: center; cursor: pointer; transition: all .13s;
}
.species-item:hover { transform: translateY(-2px); }
.species-item.sel { border-color: #a05ce0; background: #f6efff; box-shadow: 0 4px 12px rgba(160,92,224,.2); }
.species-img-box { height: 64px; display: flex; align-items: center; justify-content: center; }
.species-img { max-width: 62px; max-height: 62px; object-fit: contain; }
.species-emoji { font-size: 40px; }
.species-name { font-size: 13px; font-weight: 700; margin-top: 4px; }

.personality-row { display: flex; flex-wrap: wrap; gap: 8px; }
.personality-item {
    background: #f5f6fc; border: 1px solid transparent; border-radius: 20px;
    padding: 6px 13px; font-size: 13px; cursor: pointer; transition: all .12s; color: #5a6b8c;
}
.personality-item:hover { background: #f0ecff; }
.personality-item.sel { background: #a05ce0; color: #fff; border-color: #a05ce0; }

.amount-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.amount-btn {
    width: 52px; height: 46px; border-radius: 12px; font-size: 16px; font-weight: 800;
    background: #f3f5fb; color: #5a6b8c; transition: all .12s;
}
.amount-btn:hover { transform: translateY(-1px); }
.amount-btn.pos.sel { background: #ffe9c2; color: #d97b1d; box-shadow: inset 0 0 0 2px #ffb35c; }
.amount-btn.neg { color: #e0615b; }
.amount-btn.neg.sel { background: #ffe3e1; box-shadow: inset 0 0 0 2px #e0615b; color: #d6403a; }
.scope-note { font-size: 13px; color: var(--muted); background: #fafbff; border-radius: 12px; padding: 10px 14px; margin-top: 10px; }

/* ---------- 详情 ---------- */
.detail-overlay { align-items: stretch; padding: 26px 30px; }
.detail-sheet {
    background: #fff; border-radius: 24px; width: 980px; max-width: 100%;
    margin: auto; max-height: calc(100vh - 52px); overflow-y: auto;
    display: flex; gap: 8px; box-shadow: 0 30px 80px rgba(0,0,0,.3);
    position: relative;
}
.detail-close {
    position: absolute; top: 12px; right: 14px; z-index: 20;
    width: 34px; height: 34px; border-radius: 50%; font-size: 22px;
    background: rgba(255,255,255,.92); color: #9aa5bb;
    box-shadow: 0 4px 12px rgba(0,0,0,.12); display: flex;
    align-items: center; justify-content: center;
}
.detail-close:hover { color: #e05b5b; }
.detail-left {
    flex: 0 0 340px; padding: 28px 20px 22px; text-align: center;
    background: linear-gradient(180deg, #fdf3ff, #eef4ff 130%);
    border-radius: 24px 0 0 24px;
}
.detail-img-box { position: relative; display: flex; justify-content: center; padding: 8px 0 0; }
.detail-img-box.bounce { animation: bounce .7s ease; }
@keyframes bounce { 0%,100% { transform: translateY(0);} 30% { transform: translateY(-22px);} 60% { transform: translateY(4px);} 80% { transform: translateY(-6px);} }
.detail-img {
    width: 180px; height: 180px; object-fit: contain;
    filter: drop-shadow(0 12px 18px rgba(124,104,224,.3));
}
.detail-stage {
    position: absolute; right: 8px; bottom: 6px; background: var(--grad); color: #fff;
    padding: 4px 12px; border-radius: 16px; font-size: 12px; font-weight: 700;
}
.detail-cname { font-size: 24px; font-weight: 800; margin-top: 6px; }
.detail-sname { font-size: 13px; color: var(--muted); margin-top: 4px; }
.detail-personality {
    display: inline-block; margin-top: 8px; background: #f0ecff; color: #a05ce0;
    padding: 4px 14px; border-radius: 20px; font-size: 13px;
}
.detail-nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 18px 0 10px; }
.num-cell { background: #fff; border-radius: 14px; padding: 10px 4px; box-shadow: 0 4px 12px rgba(44,62,80,.06); }
.num-cell b { font-size: 16px; }
.num-cell span { display: block; font-weight: 800; font-size: 15px; margin-top: 2px; }
.num-cell span.date { font-size: 12px; }
.num-cell em { font-style: normal; font-size: 11px; color: var(--muted); }

.detail-right { flex: 1; min-width: 0; padding: 24px 22px 26px; position: relative; }
.speech-bubble {
    position: absolute; top: 14px; right: 22px; left: 22px; z-index: 5;
    background: #fff7ea; border: 1px solid #ffdfae; color: #8a5a1c;
    border-radius: 16px; padding: 12px 16px; font-size: 14px; line-height: 1.6;
    box-shadow: 0 8px 20px rgba(255,180,60,.2); animation: pop-in .35s ease;
}
.bubble-emoji { margin-right: 6px; font-size: 18px; }
@keyframes pop-in { from { opacity: 0; transform: translateY(8px) scale(.96);} to { opacity: 1; transform: none;} }
.detail-section { margin-top: 22px; }
.detail-section:first-child { margin-top: 4px; }
.ds-title { font-size: 14px; font-weight: 800; margin-bottom: 10px; }
.interact-row { display: flex; gap: 10px; flex-wrap: wrap; }
.interact-btn {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    min-width: 108px; padding: 12px 14px; border-radius: 16px;
    background: #f6f4ff; border: 1px solid transparent; transition: all .13s;
}
.interact-btn:hover { transform: translateY(-2px); border-color: #cbb6ff; background: #f3edff; }
.interact-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.ib-emoji { font-size: 26px; }
.ib-name { font-weight: 700; font-size: 14px; }
.ib-cost { font-size: 12px; color: #e0612f; font-weight: 700; }
.ib-left { font-size: 11px; color: var(--muted); }
.signin-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.signin-btn {
    padding: 10px 22px; border-radius: 16px; font-size: 14px; font-weight: 800;
    background: linear-gradient(135deg, #ffd76e, #ffb35c); color: #7a4a00;
    box-shadow: 0 6px 14px rgba(255,179,92,.35);
}
.signin-btn.done, .signin-btn:disabled { background: #e8ecd0; color: #7c8a4a; box-shadow: none; }
.streak-chip { background: #ffe9e2; color: #e0612f; font-weight: 700; padding: 6px 14px; border-radius: 20px; font-size: 13px; }
.ds-actions { display: flex; gap: 10px; }
.mini-act { padding: 9px 16px; border-radius: 12px; font-weight: 700; font-size: 13px; }
.act-award { background: #fff3dd; color: #d97b1d; }
.act-lucky { background: #ffe9f7; color: #d23f9f; }
.act-edit { background: #eaf1ff; color: #4c6fff; }
.mini-act:hover { transform: translateY(-1px); }

.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.shop-item {
    display: flex; align-items: center; gap: 8px; background: #fafbff;
    border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px;
    cursor: pointer; transition: all .12s;
}
.shop-item:hover { transform: translateY(-2px); border-color: #ffb35c; background: #fffaf2; }
.shop-item.disabled { opacity: .5; cursor: not-allowed; transform: none; }
.si-emoji { font-size: 24px; }
.si-name { font-size: 13px; font-weight: 700; }
.si-price { font-size: 12px; color: #e0612f; font-weight: 700; margin-top: 2px; }

.ledger-list { max-height: 240px; overflow-y: auto; }
.ledger-row {
    display: flex; align-items: center; gap: 10px; padding: 7px 4px;
    border-bottom: 1px dashed #f0f1f8; font-size: 13px;
}
.lg-reason {
    flex: 1; color: #4a5568; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lg-time { color: #a9b2c4; font-size: 12px; }
.lg-points { font-weight: 800; min-width: 40px; text-align: right; }
.lg-points.pos { color: #23a55a; }
.lg-points.neg { color: #e05b5b; }

/* ---------- 庆祝动画 ---------- */
.celebrate-overlay {
    position: fixed; inset: 0; z-index: 300; background: rgba(40, 20, 70, .55);
    display: flex; align-items: center; justify-content: center; backdrop-filter: blur(3px);
}
.celebrate-box {
    background: #fff; border-radius: 26px; padding: 34px 44px; text-align: center;
    box-shadow: 0 30px 90px rgba(0,0,0,.35); animation: pop-in .45s ease;
}
.celebrate-badge {
    display: inline-block; background: linear-gradient(135deg,#ffd76e,#ff9a8b); color: #fff;
    font-size: 18px; font-weight: 800; padding: 8px 24px; border-radius: 30px;
}
.celebrate-pet { font-size: 92px; margin: 18px 0 6px; animation: bob 2s ease-in-out infinite; }
.celebrate-name { font-size: 22px; font-weight: 800; }
.celebrate-stage { color: #a05ce0; font-size: 15px; margin: 6px 0 18px; }
.pop-enter-active { transition: all .3s ease; }
.pop-enter-from { opacity: 0; transform: scale(.85); }
.pop-leave-to { opacity: 0; transition: all .2s ease; }

/* ---------- 抽奖层 / 随机抽人层 ---------- */
.lottery-overlay {
    position: fixed; inset: 0; z-index: 260; background: rgba(24, 16, 46, .62);
    display: flex; align-items: center; justify-content: center; padding: 20px;
    backdrop-filter: blur(3px);
}
.lottery-box {
    position: relative; width: 520px; max-width: 100%; background: #fff; border-radius: 24px;
    padding: 26px 26px 20px; text-align: center;
    box-shadow: 0 26px 80px rgba(0, 0, 0, .35); animation: pop-in .32s ease;
}
.lottery-close { position: absolute; top: 12px; right: 16px; }
.lottery-title { font-size: 22px; font-weight: 900; }
.lottery-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }

.lottery-slot {
    margin: 20px auto 14px; width: 240px; height: 130px; border-radius: 20px;
    display: flex; align-items: baseline; justify-content: center; gap: 6px;
    background: linear-gradient(135deg, #fff6e0, #ffe9f2);
    border: 3px dashed #ffcf6b; color: #d97b1d;
}
.lottery-slot.rolling { animation: slot-shake .16s linear infinite; }
.lottery-slot.won {
    border-style: solid; border-color: #ffb01f;
    background: linear-gradient(135deg, #fff1c9, #ffd9ea);
    box-shadow: 0 12px 30px rgba(255, 176, 31, .38);
    animation: slot-pop .5s cubic-bezier(.2, .9, .3, 1.4);
}
.slot-num { font-size: 66px; font-weight: 900; line-height: 1; }
.slot-unit { font-size: 18px; font-weight: 800; }

.lottery-pool { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 14px; }
.pool-chip {
    font-size: 12px; font-weight: 800; color: #a58a5f; background: #f8f4ec;
    padding: 4px 11px; border-radius: 999px; border: 1px solid transparent; transition: all .18s;
}
.pool-chip.on { background: #ff9a8b; color: #fff; border-color: #ff7a67; transform: scale(1.12); }

.lottery-result { font-size: 14px; color: #3b3070; min-height: 22px; }
.lottery-result b { color: #d97b1d; font-size: 17px; }
.lottery-result.muted { color: var(--muted); }

.lottery-foot { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.draw-stage {
    margin: 22px auto 16px; padding: 18px; border-radius: 20px; min-height: 158px;
    background: linear-gradient(135deg, #eef3ff, #f7efff); border: 2px dashed #b9c8ff;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.draw-stage.rolling { animation: slot-shake .16s linear infinite; }
.draw-stage.won {
    border-style: solid; border-color: #7f9bff;
    box-shadow: 0 12px 30px rgba(127, 155, 255, .3);
    animation: slot-pop .5s cubic-bezier(.2, .9, .3, 1.4);
}
.draw-emoji { font-size: 42px; }
.draw-name { font-size: 30px; font-weight: 900; color: #3b3070; }
.draw-meta { font-size: 13px; color: var(--muted); }

@keyframes slot-shake {
    0% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
    100% { transform: translateY(0); }
}
@keyframes slot-pop {
    0% { transform: scale(1); }
    40% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* ---------- 提示 ---------- */
.toast {
    position: fixed; top: 24px; left: 50%; transform: translateX(-50%);
    background: #2c3e50; color: #fff; padding: 11px 24px; border-radius: 24px;
    font-size: 14px; z-index: 400; box-shadow: 0 8px 24px rgba(0,0,0,.2);
    max-width: 80vw; text-align: center;
}
.toast.err { background: #e05b5b; }
@media (max-width: 760px) {
    .detail-sheet { flex-direction: column; }
    .detail-left { flex: none; border-radius: 24px 24px 0 0; }
    .species-grid { grid-template-columns: repeat(3, 1fr); }
    .board-name, .board-sub { width: auto; flex: 1 1 120px; }
    .detail-overlay { padding: 12px; }
}

/* ---------- 全屏互动特效（喂食/玩耍/摸摸/签到/发积分/进化） ---------- */
.fx-layer {
    position: fixed; inset: 0; z-index: 320; pointer-events: none; overflow: hidden;
}
.fx-hero {
    position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%);
    font-size: 132px; line-height: 1; filter: drop-shadow(0 12px 30px rgba(0, 0, 0, .28));
    animation: fx-hero .95s cubic-bezier(.2, .9, .3, 1.2) forwards;
}
.fx-text {
    position: absolute; left: 50%; top: 62%; transform: translateX(-50%);
    background: rgba(255, 255, 255, .94); color: #3b3070; font-weight: 700; font-size: 18px;
    padding: 10px 22px; border-radius: 999px; white-space: nowrap;
    box-shadow: 0 12px 30px rgba(60, 40, 120, .25); animation: fx-text 1.5s ease forwards;
}
.fx-ring {
    position: absolute; left: 50%; top: 44%; width: 120px; height: 120px; margin: -60px 0 0 -60px;
    border: 4px solid rgba(255, 255, 255, .75); border-radius: 50%;
    animation: fx-ring .9s ease-out forwards;
}
.fx-ring-2 { animation-delay: .12s; border-color: rgba(255, 214, 102, .85); }
.fx-particle {
    position: absolute; transform: translate(-50%, -50%); will-change: transform, opacity;
    animation: fx-fly 1.25s cubic-bezier(.15, .7, .3, 1) forwards;
}
.fx-evolve .fx-hero { font-size: 156px; }
.fx-evolve .fx-particle { animation-duration: 1.9s; }
.fx-evolve .fx-ring { border-color: rgba(255, 214, 102, .9); }
@keyframes fx-hero {
    0% { transform: translate(-50%, -50%) scale(.2) rotate(-18deg); opacity: 0; }
    35% { transform: translate(-50%, -50%) scale(1.18) rotate(6deg); opacity: 1; }
    70% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; }
    100% { transform: translate(-50%, -58%) scale(1.05); opacity: 0; }
}
@keyframes fx-text {
    0% { transform: translate(-50%, 18px); opacity: 0; }
    18% { transform: translate(-50%, 0); opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translate(-50%, -10px); opacity: 0; }
}
@keyframes fx-ring {
    0% { transform: scale(.2); opacity: .9; }
    100% { transform: scale(7); opacity: 0; }
}
@keyframes fx-fly {
    0% { transform: translate(-50%, -50%) scale(.3) rotate(0deg); opacity: 0; }
    15% { opacity: 1; }
    100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.15) rotate(var(--rot)); opacity: 0; }
}
