/* Compact spacing: Available Chao grid (left column only) */
#party-status #party-chao-grid {
  display: grid;
  grid-template-columns: repeat(3, 94px);
  justify-content: start;
  align-content: start;
  gap: 5px;
  padding: 4px;
  background: rgba(0,0,0,0.25);
  border: 1px solid #415a77;
  border-radius: 6px;
  max-height: 320px;
  overflow-y: auto;
}

#party-status #party-chao-grid .chao-slot {
  width: 90px;
  height: 88px;
  padding: 4px;
  border: 1px solid #415a77;
  border-radius: 6px;
  background: rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border 0.2s;
}

#party-status #party-chao-grid .chao-slot.selected {
  border: 2px solid #00ff88;
  box-shadow: 0 0 6px #00ff88;
  background-color: rgba(0,255,136,0.1);
}

#party-status #party-chao-grid .sprite-wrap {
  width: 42px;
  height: 42px;
  margin-bottom: 2px;
}
#party-status #party-chao-grid .sprite-wrap img {
  width: 100%;
  height: auto;
  object-fit: none;          /* ✅ */
  object-position: 0 0;      /* ✅ */
  image-rendering: pixelated;
}

/* ============================
   Party Formation Grid (Fixed 3x2 Boxes)
   ============================ */
#party-slot-grid {
  display: grid;
  grid-template-columns: repeat(3, 94px); /* match Available Chao grid columns */
  grid-template-rows: repeat(2, 94px);     /* force 2 rows, same vertical size */
  justify-content: start;
  align-content: start;
  gap: 5px; /* same spacing as Available Chao */
  padding: 4px;
  background: rgba(0,0,0,0.25);
  border: 1px solid #415a77;
  border-radius: 6px;
  width: 310px;
  height: auto;
}

/* Empty box (slot) visuals — identical to Available Chao boxes */
#party-slot-grid .slot {
  width: 90px;
  height: 88px;
  border: 1px solid #415a77;
  border-radius: 6px;
  background: rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border 0.2s;
  position: relative;
}

/* Hover only shows highlight (no selection color) */
#party-slot-grid .slot:hover {
  background: rgba(91, 99, 255, 0.25);
  border-color: #5b63ff;
}

/* Ensure image fits within the slot, identical to Available Chao */
#party-slot-grid .sprite-wrap {
  width: 42px;
  height: 42px;
  margin-bottom: 2px;
}

#party-slot-grid .sprite-wrap img {
  width: 100%;
  height: auto;
  object-fit: none;          /* ✅ */
  object-position: 0 0;      /* ✅ */
  image-rendering: pixelated;
}

/* Empty slot text style (optional, can remove) */
#party-slot-grid .slot.empty::after {
  content: "—";
  color: rgba(255,255,255,0.2);
  font-size: 14px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Send button alignment */
#send-party-btn {
  display: block;
  margin: 10px auto 0 auto;
  padding: 8px 16px;
  background: #00ccff;
  border: none;
  border-radius: 6px;
  color: #000;
  font-weight: bold;
  transition: background 0.2s;
}
#send-party-btn:hover {
  background: #00e6ff;
}

/* ============================
   Minigame Banners (Party Status)
   ============================ */
#party-status-minigames {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  min-height: 0;
  max-height: 420px;
  overflow: auto;
  padding: 14px;
  padding-right: 4px;
  border-radius: 18px;
  border: 1px solid rgba(112, 151, 193, 0.18);
  background: linear-gradient(180deg, rgba(18, 28, 43, 0.9), rgba(10, 16, 26, 0.95));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
#party-status-minigames .minigame-banner {
  border: 1px solid rgba(116, 156, 198, 0.18);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(18, 28, 43, 0.94), rgba(10, 16, 26, 0.97));
  text-align: center;
  overflow: hidden;
  height: 64px;
  transition: border 0.2s, box-shadow 0.2s, background 0.2s;
  box-shadow: 0 10px 20px rgba(0,0,0,0.16), inset 0 1px 0 rgba(255,255,255,0.04);
}
#party-status-minigames .minigame-banner:hover {
  background: rgba(255,214,10,0.1);
  border-color: #ffd60a;
}
#party-status-minigames .minigame-banner.selected {
  border: 4px solid #ffd60a;
  box-shadow: 0 0 10px #ffd60a;
  background: rgba(255,214,10,0.15);
}
#party-status-minigames .minigame-banner img {
  height: 100%;
  width: auto;
  object-fit: contain;
  image-rendering: pixelated;
}

/* ============================
   Party Move Page
   ============================ */
#party-move {
  width: 1000px;
  max-width: 95%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
#party-move .party-tabs {
  margin-bottom: 10px;
}

/* 🔹 FIX: Add tab button styling back */
.party-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 10px;
}
.party-tabs .tab {
  padding: 6px 12px;
  background: #415a77;
  border: 2px solid #ffd60a;
  border-radius: 6px;
  color: #fff;
  font-weight: bold;
  transition: background 0.2s, transform 0.1s;
}
.party-tabs .tab:hover {
  background: #5b63ff;
  transform: scale(1.05);
}
.party-tabs .tab.active {
  background: #ffd60a;
  color: #000;
}
/* 🔹 END FIX */

#party-move .party-scroll-grid {
  max-height: 300px;
}
#party-move .move-center-slot {
  width: 120px;
  height: 120px;
  margin: 0 auto;
  border: 2px dashed #ffd60a;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
}
#party-move .move-center-slot .chao-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
}
#party-move .move-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}
#party-move .move-buttons button {
  padding: 6px 12px;
  background: #415a77;
  border: 2px solid #ffd60a;
  border-radius: 6px;
  color: #fff;
}
#party-move .move-buttons button:hover {
  background: #5b63ff;
}

/* ============================
   Solo-Party Maker (Standalone, Final Fixed)
   ============================ */
#party-status-panel {
  background: rgba(25, 35, 60, 0.9);
  border: 2px solid #415a77;
  border-radius: 12px;
  color: white;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

#party-status-panel .panel-title {
  color: #ffee66;
}

#party-status-panel .panel-body {
  overflow: auto;
  overscroll-behavior: contain;
  padding: 10px;
  background:
    radial-gradient(circle at top center, rgba(61, 100, 139, 0.12), transparent 48%),
    linear-gradient(180deg, rgba(14, 22, 35, 0.94), rgba(8, 13, 21, 0.97));
}

