/* ============================================================================
   🐾 [전투 화면] 유저 호위 3대 펫 포메이션 (유저 좌측 호위)
   ============================================================================ */
.hero-pets-formation {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

/* 펫은 영웅(--hero-x)을 뒤따라 이동함: --pet-x 는 pets.js 의 따라가기 루프가 매 프레임 갱신
   (CSS transition 을 쓰면 매 프레임 값 갱신과 충돌하므로 사용하지 않음) */
.combat-pet-unit {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  will-change: transform;
}

/* 3개 슬롯별 영웅 "바로 뒤" 위치.
   left 는 영웅 몸통 중심(154px = hero left 118 + 폭 72/2)에서 뒤로 떨어진 펫의 중심점이고,
   translateX(-50%) 로 이름표 폭과 무관하게 중심 정렬. 영웅이 화면 왼쪽 18% 지점에 서는
   원거리일 때도 세 마리가 모두 보이도록 간격을 좁게 잡음. */
.combat-pet-unit.pet-slot-pos-0 {
  left: 122px;
  bottom: 18px;
  transform: translateX(calc(-50% + var(--pet-x, 0px))) scale(0.78);
  z-index: 5;
}

.combat-pet-unit.pet-slot-pos-1 {
  left: 104px;
  bottom: 27px;
  transform: translateX(calc(-50% + var(--pet-x, 0px))) scale(0.72);
  z-index: 4;
}

.combat-pet-unit.pet-slot-pos-2 {
  left: 88px;
  bottom: 14px;
  transform: translateX(calc(-50% + var(--pet-x, 0px))) scale(0.66);
  z-index: 3;
}

/* 원거리 무기 착용 시: 영웅이 화면 왼쪽 18% 지점에 서서 뒤쪽 공간이 좁으므로, 펫 3마리를 영웅 "뒤-위쪽"에 계단식으로 배치
   (left = 영웅 중심 154px + 가로 오프셋. 3번째 펫이 화면 밖으로 잘리지 않게 오프셋을 영웅 중심 기준 약 -34 / -14 / -36 으로 좁히고 y 를 위로 쌓음) */
.hero-pets-formation.ranged .combat-pet-unit.pet-slot-pos-0 { left: 126px; bottom: 14px; transform: translateX(calc(-50% + var(--pet-x, 0px))) scale(0.76); }
.hero-pets-formation.ranged .combat-pet-unit.pet-slot-pos-1 { left: 149px; bottom: 98px; transform: translateX(calc(-50% + var(--pet-x, 0px))) scale(0.68); }
.hero-pets-formation.ranged .combat-pet-unit.pet-slot-pos-2 { left: 130px; bottom: 56px; transform: translateX(calc(-50% + var(--pet-x, 0px))) scale(0.64); }

.pet-sprite-box {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 48px;
  width: 48px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.6));
}

.pet-sprite-box.walking-bob {
  animation: petStepBob 0.34s infinite alternate ease-in-out;
}

@keyframes petStepBob {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-3.5px) rotate(-2deg); }
}

.pet-sprite-box.pet-casting {
  animation: petCastJump 0.35s ease-out;
}

@keyframes petCastJump {
  0% { transform: scale(1) translateY(0); }
  50% { transform: scale(1.3) translateY(-14px); filter: drop-shadow(0 0 12px #fde047) brightness(1.3); }
  100% { transform: scale(1) translateY(0); }
}

.pet-img {
  height: 42px;
  width: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  transform: scaleX(-1); /* 🐾 펫이 우측(전방 몬스터 방향)을 바라보도록 수평 반전 */
}

.pet-shadow {
  position: absolute;
  bottom: 8px;
  width: 32px;
  height: 7px;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0) 70%);
  border-radius: 50%;
}

.pet-name-tag {
  font-size: 0.52rem;
  font-weight: 900;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  white-space: nowrap;
  margin-top: -4px;
  display: flex;
  gap: 3px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.pet-tag-lvl {
  color: #fde047;
}


/* ============================================================================
   🐾 [펫 탭] 상단: 획득 펫 도감 / 중단: 3칸 장착 슬롯 / 하단: 알 부화기
   ============================================================================ */
#tab-pets {
  flex-direction: column;
  height: 100%;
  gap: 6px;
  overflow: hidden;
  padding: 6px 8px;
}

/* 1. 🐾 [상단] 획득 펫 도감 섹션 (가장 크게 확장) */
.pets-catalog-section {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 6px;
}

.pets-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

/* 2. ⚔️ [중단] 3대 장착 펫 슬롯 패널 (세로 높이 컴팩트 축소) */
.pets-loadout-panel {
  flex-shrink: 0;
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid rgba(56, 189, 248, 0.25);
  border-radius: 10px;
  padding: 4px 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.pets-loadout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.pets-equipped-slots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.pet-loadout-col-card {
  background: rgba(30, 41, 59, 0.75);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 3px 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  position: relative;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pet-loadout-col-card:hover {
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

.pet-loadout-col-card.locked {
  border-style: dashed;
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(15, 23, 42, 0.6);
  opacity: 0.75;
}

.pet-loadout-col-card.empty {
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.35);
}

.pet-loadout-col-card.active-pet.tier-1 { border-color: #6b7280; box-shadow: 0 0 6px rgba(107, 114, 128, 0.3); }
.pet-loadout-col-card.active-pet.tier-2 { border-color: #22c55e; box-shadow: 0 0 6px rgba(34, 197, 94, 0.3); }
.pet-loadout-col-card.active-pet.tier-3 { border-color: #3b82f6; box-shadow: 0 0 8px rgba(59, 130, 246, 0.35); }
.pet-loadout-col-card.active-pet.tier-4 { border-color: #a855f7; box-shadow: 0 0 10px rgba(168, 85, 247, 0.4); }
.pet-loadout-col-card.active-pet.tier-5 { border-color: #f59e0b; box-shadow: 0 0 12px rgba(245, 158, 11, 0.5); }
.pet-loadout-col-card.active-pet.tier-6 { border-color: #ef4444; box-shadow: 0 0 14px rgba(239, 68, 68, 0.6); }

.col-slot-badge {
  font-size: 0.46rem;
  font-weight: 900;
  color: #94a3b8;
  background: rgba(0, 0, 0, 0.5);
  padding: 1px 3px;
  border-radius: 3px;
  line-height: 1;
  position: absolute;
  top: 2px;
  left: 3px;
}

.col-slot-badge.active {
  color: #fde047;
}

.col-card-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  margin-top: 8px;
}

.col-lock-icon, .col-empty-icon {
  font-size: 0.85rem;
}

.col-lock-text {
  font-size: 0.5rem;
  font-weight: 800;
  color: #f87171;
}

.col-empty-text {
  font-size: 0.52rem;
  font-weight: 800;
  color: #94a3b8;
}

.col-thumb-wrap {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1px 0;
  margin-top: 6px;
}

.col-thumb-wrap img {
  height: 22px;
  width: auto;
  image-rendering: pixelated;
  transform: scaleX(-1);
}

.col-pet-name-line {
  display: flex;
  align-items: center;
  gap: 2px;
  max-width: 100%;
}

.col-tier-dot {
  font-size: 0.44rem;
}

.col-pet-name {
  font-size: 0.56rem;
  font-weight: 900;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 58px;
}

.col-pet-lvl {
  font-size: 0.5rem;
  font-weight: 800;
  color: #fde047;
}

.btn-col-unequip {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  font-size: 0.46rem;
  font-weight: 800;
  padding: 0px 4px;
  border-radius: 3px;
  cursor: pointer;
  margin-top: 1px;
}

.btn-col-unequip:hover {
  background: rgba(239, 68, 68, 0.4);
  color: #fff;
}

/* 3. 🥚 [최하단] 펫 알 부화기 (세로 높이 컴팩트 축소) */
.pet-incubator-banner {
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  border-radius: 10px;
  padding: 5px 8px;
  margin-bottom: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.pet-incubator-title-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 3px;
}

.pet-incubator-badge {
  font-size: 0.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  padding: 1px 4px;
  border-radius: 4px;
}

.pet-incubator-title {
  font-size: 0.74rem;
  font-weight: 900;
  color: #fff;
}

.pet-ticket-chip {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.52rem;
  font-weight: 800;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(251, 191, 36, 0.5);
  color: #fef08a;
  padding: 1px 6px;
  border-radius: 8px;
}

.btn-egg-pull {
  font-size: 0.5rem;
  font-weight: 900;
  color: #0f172a;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  border: none;
  border-radius: 6px;
  padding: 2px 6px;
  cursor: pointer;
  white-space: nowrap;
}

.btn-egg-pull:active {
  transform: scale(0.95);
}

/* 🥚 뽑기로 등급이 확정된 알 보관함 (등급별 묶음 필 목록) */
.pet-egg-inventory-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 4px 0 2px;
  min-height: 18px;
}

.egg-inventory-empty-tip {
  font-size: 0.5rem;
  color: var(--text-muted, #94a3b8);
  font-weight: 600;
}

.egg-inventory-pill {
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(15, 23, 42, 0.7);
  border: 1.5px solid;
  border-radius: 8px;
  padding: 2px 6px;
  cursor: pointer;
  transition: transform 0.1s;
}

.egg-inventory-pill:active {
  transform: scale(0.95);
}

.egg-inventory-pill-icon {
  font-size: 0.65rem;
}

.egg-inventory-pill-name {
  font-size: 0.5rem;
  font-weight: 900;
}

.egg-inventory-pill-count {
  font-size: 0.5rem;
  font-weight: 800;
  color: #cbd5e1;
}

/* 3개 알 부화 슬롯 그리드 (가로 3칸) */
.pet-incubator-slots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 3px;
}

.incubator-slot-col-card {
  background: rgba(30, 41, 59, 0.75);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 3px 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  position: relative;
  cursor: pointer;
  transition: all 0.15s ease;
}

.incubator-slot-col-card:hover {
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

.incubator-slot-col-card.empty {
  border-style: dashed;
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.08);
}

.incubator-slot-col-card.empty:hover {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.18);
}

.incubator-slot-col-card.locked {
  border-style: dashed;
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(15, 23, 42, 0.6);
  opacity: 0.75;
  cursor: not-allowed;
}

.incubator-slot-col-card.incubating {
  border-color: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
}

.incubator-slot-col-card.ready {
  border-color: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.7) 0%, rgba(15, 23, 42, 0.9) 100%);
}

.inc-card-badge {
  font-size: 0.46rem;
  font-weight: 900;
  color: #94a3b8;
  background: rgba(0, 0, 0, 0.5);
  padding: 1px 3px;
  border-radius: 3px;
  line-height: 1;
  position: absolute;
  top: 2px;
  left: 3px;
}

.inc-card-badge.active {
  color: #fde047;
}

.inc-card-badge.ready {
  color: #4ade80;
}

.inc-col-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  margin-top: 8px;
}

.inc-lock-icon, .inc-empty-icon {
  font-size: 0.95rem;
}

.inc-lock-text {
  font-size: 0.5rem;
  font-weight: 800;
  color: #f87171;
}

.inc-empty-plus {
  font-size: 0.55rem;
  font-weight: 900;
  color: #fef08a;
}

.inc-empty-tip {
  font-size: 0.44rem;
  color: #94a3b8;
}

.inc-egg-anim-box {
  font-size: 1.05rem;
  margin: 1px 0;
  margin-top: 8px;
}

.inc-egg-anim-box.wobble {
  animation: eggWobble 1.2s infinite ease-in-out;
}

.inc-egg-anim-box.pulse {
  animation: eggBurstPulse 1s infinite alternate;
}

.inc-slot-egg-name {
  font-size: 0.52rem;
  font-weight: 900;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 58px;
}

.inc-slot-progress-bar {
  width: 90%;
  height: 4px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 2px;
  overflow: hidden;
  margin: 1px 0;
}

.inc-slot-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.inc-slot-timer-txt {
  font-size: 0.46rem;
  font-weight: 800;
  color: #fde047;
}

.btn-inc-speedup {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  border: 1px solid #c4b5fd;
  color: #fff;
  font-size: 0.46rem;
  font-weight: 800;
  padding: 0px 4px;
  border-radius: 3px;
  cursor: pointer;
  margin-top: 1px;
}

.btn-inc-claim {
  background: linear-gradient(135deg, #10b981, #059669);
  border: 1px solid #6ee7b7;
  color: #fff;
  font-size: 0.48rem;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 1px;
}

/* 성능: 그림자 크기 대신 빛 겹(::after)의 투명도 + 버튼 크기만 움직임 */
.btn-inc-claim.pulse-glow {
  position: relative;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.4);
  animation: claimPulse 1.2s infinite alternate;
  will-change: transform;
}
.btn-inc-claim.pulse-glow::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 14px rgba(16, 185, 129, 0.8); opacity: 0; animation: claimGlow 1.2s infinite alternate; pointer-events: none; will-change: opacity; }

@keyframes claimPulse {
  0% { transform: scale(0.96); }
  100% { transform: scale(1.04); }
}
@keyframes claimGlow { 0% { opacity: 0; } 100% { opacity: 1; } }

/* ============================================================================
   🥚 [알 선택 모달창]
   ============================================================================ */
.pet-egg-select-sheet {
  max-width: 360px;
}

.egg-select-modal-body {
  padding: 10px 0;
}

.egg-select-modal-tip {
  font-size: 0.68rem;
  color: #94a3b8;
  margin-bottom: 10px;
}

.egg-select-modal-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.egg-modal-card {
  background: rgba(30, 41, 59, 0.8);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.egg-modal-card:hover {
  border-color: #f59e0b;
  transform: translateY(-2px);
  background: rgba(30, 41, 59, 0.95);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25);
}

.egg-modal-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.egg-modal-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.egg-modal-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.egg-modal-name {
  font-size: 0.78rem;
  font-weight: 900;
  color: #fff;
}

.egg-modal-tier-tag {
  font-size: 0.52rem;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 4px;
}

.egg-modal-desc {
  font-size: 0.58rem;
  color: #cbd5e1;
  line-height: 1.25;
}

.egg-modal-cost-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.58rem;
  margin-top: 2px;
}

.egg-modal-cost {
  color: #fef08a;
  font-weight: 800;
}

.egg-modal-time {
  color: #94a3b8;
}

.btn-egg-select-action {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: 1px solid #fde047;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

.btn-egg-select-action:hover {
  filter: brightness(1.1);
}

.pet-incubate-btn-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
}

.pet-incubate-btn-title {
  font-size: 0.84rem;
  font-weight: 900;
}

.pet-incubate-btn-sub {
  font-size: 0.62rem;
  font-weight: 700;
  color: #fef08a;
}

/* 3. 펫 도감 필터 */
.pet-filter-bar {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 8px;
  scrollbar-width: none;
}

.pet-filter-bar::-webkit-scrollbar {
  display: none;
}

.pet-filter-chip {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #94a3b8;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 5px 8px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pet-filter-chip.active {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border-color: #38bdf8;
  color: #fff;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
}

/* 4. 펫 도감 그리드 */
/* 4. 펫 도감 그리드 (보관함) */
.pets-catalog-scroll {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 8px;
}

.pets-catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
}

.pet-catalog-card {
  background: var(--bg-card);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  min-height: 44px;
  transition: all 0.15s ease;
}

.pet-catalog-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.pet-catalog-card.locked {
  opacity: 0.6;
  filter: grayscale(0.5);
}

.pet-catalog-card.equipped {
  border-color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.35);
}

.pet-catalog-thumb {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pet-catalog-thumb img {
  height: 26px;
  width: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  transform: scaleX(-1);
}

.pet-catalog-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
}

.pet-catalog-title-row {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  overflow: hidden;
}

.pet-name {
  font-size: 0.66rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
  line-height: 1.2;
}

.pet-catalog-lvl-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.52rem;
  color: #94a3b8;
  line-height: 1;
}

.pet-lvl-text {
  color: #fde047;
  font-weight: 800;
}

.upgrade-dot-badge {
  position: absolute;
  top: 3px;
  left: 3px;
  background: #ef4444;
  color: #fff;
  font-size: 0.44rem;
  font-weight: 900;
  padding: 1px 3px;
  border-radius: 3px;
  animation: pulseDot 1s infinite alternate;
  z-index: 2;
}

.equipped-ribbon {
  position: absolute;
  top: 2px;
  right: 3px;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border: 1px solid #38bdf8;
  color: #fff;
  font-size: 0.44rem;
  font-weight: 900;
  padding: 1px 3px;
  border-radius: 3px;
  line-height: 1;
  z-index: 2;
}

/* 티어별 색상 */
.tier-1 { color: #9ca3af; }
.tier-2 { color: #22c55e; }
.tier-3 { color: #3b82f6; }
.tier-4 { color: #a855f7; }
.tier-5 { color: #f59e0b; }
.tier-6 { color: #ef4444; }

.pet-tier-tag {
  font-size: 0.46rem;
  font-weight: 900;
  padding: 1px 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  line-height: 1.2;
}

.pet-tier-tag.tier-1 { background: #374151; color: #9ca3af; }
.pet-tier-tag.tier-2 { background: #14532d; color: #4ade80; }
.pet-tier-tag.tier-3 { background: #1e3a8a; color: #60a5fa; }
.pet-tier-tag.tier-4 { background: #581c87; color: #c084fc; }
.pet-tier-tag.tier-5 { background: #78350f; color: #fbbf24; border: 1px solid #f59e0b; }
.pet-tier-tag.tier-6 { background: #7f1d1d; color: #f87171; border: 1px solid #ef4444; }

/* ============================================================================
   🐾 [펫 모달창] 펫 상세 & 강화 및 알 부화 결과
   ============================================================================ */
.pet-detail-sheet {
  max-width: 360px;
}

.pet-modal-top-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.pet-modal-thumb-box {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.pet-modal-img {
  height: 50px;
  width: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  transform: scaleX(-1);
}

.pet-modal-info {
  flex: 1;
  min-width: 0;
}

.pet-modal-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.pet-modal-name-row h4 {
  font-size: 0.95rem;
  font-weight: 900;
  color: #fff;
  margin: 0;
}

.pet-level-badge {
  font-size: 0.65rem;
  font-weight: 900;
  color: #fde047;
  background: rgba(253, 224, 71, 0.15);
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid rgba(253, 224, 71, 0.3);
}

.pet-modal-skill-header {
  font-size: 0.72rem;
  font-weight: 800;
  color: #38bdf8;
  margin-bottom: 2px;
}

.pet-modal-skill-desc {
  font-size: 0.65rem;
  color: #cbd5e1;
  line-height: 1.35;
}

.stat-highlight {
  color: #fde047;
  font-weight: 900;
}

.next-lvl-preview {
  font-size: 0.6rem;
  color: #34d399;
  font-weight: 700;
}

.pet-passive-box {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.passive-icon {
  font-size: 1.1rem;
}

.passive-desc {
  font-size: 0.65rem;
  font-weight: 800;
  color: #fef08a;
}

.pet-cards-progress-box {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.cards-icon {
  font-size: 1.1rem;
}

.cards-text {
  font-size: 0.68rem;
  font-weight: 800;
  color: #cbd5e1;
}

.pet-modal-actions {
  display: flex;
  gap: 8px;
}

.pet-modal-actions .btn-equip {
  flex: 1;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border: 1.5px solid #38bdf8;
  color: #fff;
  border-radius: 10px;
  padding: 10px;
  font-weight: 900;
  cursor: pointer;
}

.pet-modal-actions .btn-unequip {
  flex: 1;
  background: rgba(239, 68, 68, 0.2);
  border: 1.5px solid #f87171;
  color: #f87171;
  border-radius: 10px;
  padding: 10px;
  font-weight: 900;
  cursor: pointer;
}

.pet-modal-actions .btn-upgrade {
  flex: 1.5;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: 1.5px solid #fde047;
  color: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.pet-modal-actions .btn-upgrade span {
  font-size: 0.78rem;
  font-weight: 900;
}

.pet-modal-actions .btn-upgrade small {
  font-size: 0.6rem;
  color: #fef08a;
  font-weight: 700;
}

/* 🐣 알 부화 결과 모달 */
.pet-hatch-result-sheet {
  max-width: 350px;
  text-align: center;
}

.pet-hatch-result-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 0 6px 0;
  position: relative;
}

.hatch-egg-burst-halo {
  position: absolute;
  top: 8px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.4) 0%, rgba(245, 158, 11, 0) 70%);
  border-radius: 50%;
  animation: eggBurstPulse 1s infinite alternate;
}

@keyframes eggBurstPulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  100% { transform: scale(1.3); opacity: 1; }
}

.hatch-pet-avatar-wrap {
  width: 84px;
  height: 84px;
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.75);
  border: 2.5px solid #f59e0b;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.6);
  position: relative;
  z-index: 2;
  animation: bouncePetIn 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28) both;
}

@keyframes bouncePetIn {
  0% { transform: scale(0.4) translateY(20px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.hatch-pet-img {
  height: 68px;
  width: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  transform: scaleX(-1);
}

.hatch-pet-badge-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.hatch-pet-title-sub {
  font-size: 0.65rem;
  color: #94a3b8;
  font-weight: 600;
}

.hatch-pet-name {
  font-size: 1.15rem;
  font-weight: 900;
  color: #fff;
  margin: 0;
}

.hatch-pet-status-pill {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

.hatch-pet-status-pill.is-new {
  background: rgba(74, 222, 128, 0.15);
  border-color: rgba(74, 222, 128, 0.4);
  color: #4ade80;
}

.hatch-pet-status-pill.is-duplicate {
  background: rgba(251, 191, 36, 0.15);
  border-color: rgba(251, 191, 36, 0.4);
  color: #fbbf24;
}

/* 🔥 펫 보유 스킬 전용 정보 카드 */
.hatch-pet-skill-card {
  width: 100%;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: left;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  margin-top: 4px;
}

.hatch-skill-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 6px;
}

.hatch-skill-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hatch-skill-icon {
  font-size: 1.3rem;
  width: 32px;
  height: 32px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hatch-skill-name-box {
  display: flex;
  flex-direction: column;
}

.hatch-skill-label {
  font-size: 0.55rem;
  color: #38bdf8;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hatch-skill-name {
  font-size: 0.82rem;
  font-weight: 900;
  color: #fff;
}

.hatch-skill-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.hatch-skill-category {
  font-size: 0.58rem;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 6px;
  border-radius: 6px;
}

.hatch-skill-cd {
  font-size: 0.62rem;
  color: #fbbf24;
  font-weight: 700;
}

.hatch-skill-desc {
  font-size: 0.72rem;
  color: #cbd5e1;
  line-height: 1.45;
}

.hatch-val-highlight {
  color: #fde047;
  font-weight: 900;
}

/* ✨ 영구 패시브 카드 */
.hatch-pet-passive-card {
  width: 100%;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: 10px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  text-align: left;
}

.hatch-passive-icon {
  font-size: 0.95rem;
  color: #c084fc;
}

.hatch-passive-desc {
  font-size: 0.68rem;
  color: #e9d5ff;
  font-weight: 700;
  line-height: 1.35;
}

/* 🐣 알 부화 결과 확인 버튼 (하단 중앙 배치 & 완벽 터치) */
.hatch-modal-actions,
.summon-result-actions {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  margin-top: 12px !important;
  position: relative;
  z-index: 50;
}

.btn-confirm-pet-hatch {
  width: 100% !important;
  max-width: 240px !important;
  height: 42px !important;
  margin: 0 auto !important;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  border: 1.5px solid rgba(56, 189, 248, 0.6) !important;
  border-radius: 12px !important;
  color: #fff !important;
  font-size: 0.88rem !important;
  font-weight: 900 !important;
  cursor: pointer !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.5) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.15s ease !important;
  user-select: none;
}

.btn-confirm-pet-hatch:hover {
  filter: brightness(1.15);
  box-shadow: 0 6px 18px rgba(56, 189, 248, 0.6);
  transform: translateY(-1px);
}

.btn-confirm-pet-hatch:active {
  transform: scale(0.96) !important;
}

.equip-slot-btns-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.btn-equip-slot-choice {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 8px 4px;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: all 0.15s ease;
}

.btn-equip-slot-choice:hover:not(:disabled) {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
}

.btn-equip-slot-choice.equipped {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #a7f3d0;
}

.btn-equip-slot-choice:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.slot-req-sub, .action-sub {
  font-size: 0.52rem;
  font-weight: 700;
  color: #94a3b8;
}

/* 레벨업 버튼 */
.btn-skill-upgrade {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

.btn-skill-upgrade:hover:not(:disabled) {
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.6);
  transform: translateY(-1px);
}


/* ♻️ 펫 회수 */
.pet-recycle-row { display: flex; justify-content: flex-end; margin: -2px 0 6px; }
.btn-pet-recycle-bulk {
  background: rgba(56, 189, 248, 0.14); color: #7dd3fc; border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 8px; font-size: 0.62rem; font-weight: 800; padding: 4px 9px; cursor: pointer;
}
.pet-modal-actions .btn-recycle {
  background: linear-gradient(135deg, #475569, #334155); border: 1px solid rgba(255, 255, 255, 0.2); color: #e2e8f0;
  display: flex; flex-direction: column; align-items: center; line-height: 1.2;
}
.pet-modal-actions .btn-recycle small { color: #fde68a; font-weight: 700; }


/* 알 부화기 / 마법 재봉틀 뽑기 레벨 칩 + 확률 ⓘ 버튼 */
.summon-lvl-chip {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 9999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.45);
  white-space: nowrap;
}
.pet-incubator-title-row .btn-prob-info {
  position: static;
  flex-shrink: 0;
}
#summon-rates-modal { z-index: 1210; }
