/* famgrow.css — familiar growth (run-only jade window, permanent gold/violet perks) */
.fg-back { position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; background: rgba(5,2,8,.72); animation: fadeIn .15s both; }
.fg-back.out { opacity: 0; transition: opacity .15s; pointer-events: none; }
.fg-panel { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; box-sizing: border-box;
  border: 22px solid transparent; border-image: url("../assets/ui-panel.webp") 22% fill / 22px stretch; background: rgba(14,7,22,.6); background-clip: padding-box; animation: popIn .24s cubic-bezier(.2,1.4,.4,1) both; }
.fg-title { font-size: clamp(20px, 4vh, 30px); white-space: nowrap; }
.fg-tag { font-size: 13px; padding: 1px 12px; border-radius: 10px; text-align: center; color: #0c0814; text-shadow: none; max-width: 100%; }
.fg-tag-jade { background: #5dffa8; } .fg-tag-gold { background: #e8c66a; }
/* run window */
.fg-runpanel { width: min(94%, 760px); max-height: 94%; padding: 4px 6px; box-shadow: 0 0 26px rgba(93,255,168,.35); }
.fg-rhead { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; justify-content: center; }
.fg-title { color: #5dffa8; }
.fg-lv { font-size: 18px; } .fg-pts { font-size: 18px; color: #5dffa8; }
.fg-cards { display: flex; gap: 8px; width: 100%; justify-content: center; }
.btn.fg-card { flex: 1 1 0; min-width: 0; min-height: 132px; flex-direction: column; gap: 3px; padding: 6px 4px; white-space: normal; text-align: center; border-width: 12px; border-image-width: 12px; animation: popIn .26s cubic-bezier(.2,1.4,.4,1) both; }
.fg-glyph { width: 44px; height: 44px; flex: none; filter: drop-shadow(0 0 6px rgba(93,255,168,.7)); }
.fg-cname { font-size: 17px; color: #5dffa8; }
.fg-cdesc { font-size: 13px; line-height: 1.15; font-weight: 400; }
.fg-cnt { font-size: 18px; }
.btn.fg-card:hover, .btn.fg-card.focus { transform: scale(1.04); filter: drop-shadow(0 0 8px rgba(93,255,168,.7)); }
.btn.fg-card.hit { animation: fgHit .3s ease; }
@keyframes fgHit { 0% { transform: scale(1); filter: brightness(1); } 40% { transform: scale(1.1); filter: brightness(1.8) drop-shadow(0 0 14px #5dffa8); } 100% { transform: scale(1); } }
.fg-rbar { display: flex; gap: 12px; justify-content: center; }
.btn.fg-later, .btn.fg-auto { min-height: 48px; min-width: 120px; font-size: 16px; padding: 0 10px; }
.btn.fg-auto.on { color: #5dffa8; filter: drop-shadow(0 0 8px rgba(93,255,168,.7)); }
/* perks */
.fg-perkpanel { width: min(96%, 900px); height: min(94%, 600px); padding: 4px 8px; box-shadow: 0 0 26px rgba(232,198,106,.3), 0 0 40px rgba(140,90,220,.25); }
.fg-perkpanel .fg-title.gold { color: #e8c66a; }
.fg-phead { display: flex; align-items: center; gap: 16px; justify-content: center; padding-right: 50px; }
.fg-bal { display: flex; align-items: center; gap: 6px; font-size: 20px; padding: 2px 12px; border: 2px solid var(--violet, #8a5cc8); border-radius: 12px; background: rgba(22,12,34,.8); }
.fg-bal img { width: 24px; height: 24px; object-fit: contain; }
.btn.fg-x { position: absolute; top: 0; right: 0; width: 44px; height: 44px; min-height: 44px; min-width: 44px; padding: 0; font-size: 20px; border-width: 12px; border-image-width: 12px; }
.fg-tabs { display: flex; gap: 8px; justify-content: center; width: 100%; }
.btn.fg-tab { min-height: 48px; flex: 0 1 190px; gap: 6px; padding: 0 6px; font-size: 15px; border-width: 12px 14px; border-image-width: 12px 14px; min-width: 0; }
.fg-tab img { width: 32px; height: 32px; border-radius: 6px; object-fit: cover; object-position: 50% 22%; flex: none; }
.fg-tab.locked img { filter: grayscale(1) brightness(.5); }
.fg-tab.on { color: #e8c66a; filter: drop-shadow(0 0 8px rgba(232,198,106,.7)); }
.fg-perklist { flex: 1; min-height: 0; width: 100%; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; scrollbar-width: none; padding: 2px 4px; }
.fg-perklist::-webkit-scrollbar { display: none; }
.fg-locked { text-align: center; color: var(--ink-dim); font-size: 16px; }
.fg-perk-row { display: flex; align-items: center; gap: 10px; background: rgba(14,8,22,.75); border: 2px solid var(--violet, #8a5cc8); border-radius: 10px; padding: 6px 10px; animation: slideUp .28s ease both; }
.fg-perk-row.dim { opacity: .55; }
.fg-ptx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fg-pname { font-size: 18px; color: #e8c66a; }
.fg-pdesc { font-size: 14px; line-height: 1.2; font-weight: 400; color: var(--ink-dim); }
.fg-pips { display: flex; align-items: center; gap: 4px; font-size: 13px; }
.fg-pips i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid #b98cff; }
.fg-pips i.on { background: #e8c66a; border-color: #e8c66a; box-shadow: 0 0 6px #e8c66a; }
.fg-pips span { margin-left: 6px; }
.btn.fg-buy { min-height: 48px; min-width: 104px; gap: 4px; font-size: 15px; padding: 0 6px; flex: none; flex-wrap: wrap; border-width: 12px 16px; border-image-width: 12px 16px; }
.fg-buy img { width: 20px; height: 20px; }
.fg-bc { font-size: 17px; } .fg-bl { font-size: 13px; }
.fg-buy.dim { filter: grayscale(.6) brightness(.75); }
.fg-buy.shake { animation: fgShake .4s; }
@keyframes fgShake { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
.fg-msg { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); padding: 3px 14px; border-radius: 10px; background: rgba(10,4,16,.92); color: #ff7a8a; font-size: 15px; opacity: 0; pointer-events: none; white-space: nowrap; }
.fg-msg.on { animation: fpMsg 1.8s ease both; }
@media (max-height: 460px) {
  .fg-panel { border-width: 14px; border-image-width: 14px; gap: 3px; }
  .fg-runpanel { max-height: 98%; }
  .fg-title { font-size: 20px; } .fg-tag { font-size: 12px; }
  .btn.fg-card { min-height: 104px; gap: 1px; } .fg-glyph { width: 32px; height: 32px; }
  .fg-cname { font-size: 15px; } .fg-cdesc { font-size: 12px; }
  .fg-perkpanel { height: 98%; }
  .fg-pdesc { font-size: 12px; } .fg-pname { font-size: 16px; }
  .fg-perk-row { padding: 3px 8px; } .fg-perklist { gap: 5px; }
  .btn.fg-tab { min-height: 44px; }
}
@media (max-width: 560px) { .fg-cards { flex-wrap: wrap; } .btn.fg-card { flex: 1 1 44%; } }
