/* f-home: added 2026-11-21 */
/* Compact pet card on 首頁 (taps through to the pet tab) */
.hm-pet { width: 100%; text-align: left; font: inherit; color: inherit; position: relative; align-items: center; }
.hm-pet:active { transform: scale(.99); }
.hm-pet-art { position: relative; flex: 0 0 auto; }
.hm-lv { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); background: var(--navy); color: #fff;
  font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.hm-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.hm-name b { font-size: 1.05rem; }
.hm-name small { font-size: .72rem; }
.hm-title { display: inline-block; margin: 4px 0 2px; font-size: .78rem; font-weight: 700; color: var(--gold-ink);
  background: #fff3d6; border: 1px solid #f3dca0; border-radius: 999px; padding: 1px 8px; }
.hm-xp { display: flex; align-items: center; gap: 6px; margin: 4px 0; }
.hm-xp .bar { flex: 1; margin: 0; }
.hm-xp small { font-size: .7rem; white-space: nowrap; }
.hm-stats { display: flex; justify-content: space-between; gap: 8px; font-size: .82rem; margin: 2px 0 4px; }
.hm-stats em { font-style: normal; font-size: .72rem; margin-left: 4px; }
.hm-stats em.up { color: var(--ok); } .hm-stats em.down { color: var(--no); }
.hm-medals { display: flex; gap: 6px; align-items: center; min-height: 30px; }
.hm-go { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 1.4rem; }
.hm-pet .pet-info { padding-right: 12px; }
.hm-pet-note { margin: -6px 4px 12px; }

/* Medal badge: ring colour by tier (0 = one-off medal) */
.hm-medal { --mc: var(--accent); display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  font-size: .95rem; background: #fff; border: 2px solid var(--mc); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.hm-medal.sm { width: 24px; height: 24px; font-size: .8rem; }
.hm-medal.t1 { border-color: #c27c3a; background: #fbefe3; }
.hm-medal.t2 { border-color: #9aa5b1; background: #f1f3f5; }
.hm-medal.t3 { border-color: #e0a82e; background: #fff4d6; }
.hm-medal.t4 { border-color: #4fb8d8; background: #e4f6fb; }

/* 弱項重溫 */
.hm-review h4 { margin: 0; }
.hm-review p { margin: 6px 0; }

/* 五科能力值 */
.hm-ability h4 { margin: 0; }
.hm-index { font-size: 1.5rem; font-weight: 800; color: var(--navy); }
.hm-index small { font-size: .75rem; font-weight: 400; color: var(--muted); }
.hm-radar { display: flex; justify-content: center; margin: 4px 0; }
.hm-radar .radar { max-width: 100%; height: auto; overflow: visible; }

/* Session summary gains */
.hm-levelup { margin: 6px 0; }
.hm-unlock { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 8px 0; }
.hm-gain { margin: 10px 0; padding: 8px 10px; background: #fffaf0; border: 1px solid var(--line); border-radius: 12px; }
.hm-gain-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 10px; margin-top: 6px; }
.hm-gain-item { display: inline-flex; align-items: center; gap: 4px; font-size: .82rem; }
.hm-title-chip { background: #fff3d6; color: var(--gold-ink); font-weight: 700; border-radius: 999px; padding: 2px 10px; }

/* Global PetArt styles (header, home card, summary, leaderboard, profiles). The pet tab refines these under .pet-screen. */
.pet-art { display: inline-block; flex-shrink: 0; object-fit: contain; }
.pet-art.sleeping { filter: grayscale(.35) brightness(.92); }
.pet-art.locked:not(.pet-sil) { filter: brightness(0) opacity(.3); }
.pet-sil { display: inline-grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #efe9dd, #ddd3c0); color: #8c826f; line-height: 1; }
.pet-sil.locked { background: #d9d2c4; color: #f4f1ea; font-weight: 800; }
/* drawn medal art (2026-11-21) */
.hm-medal.has-img { background: none; border: 0; box-shadow: none; }
.hm-medal .medal-img { width: 100%; height: 100%; object-fit: contain; }
